diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-05-22 14:15:44 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-05-22 16:40:04 +0300 |
commit | 7e4c92e29954c14f9c1dd51aff95fff25d3ced32 (patch) | |
tree | 2434a56ce3ebc84bbaca5267b5afecda8a523fba /mod/page.cxx | |
parent | aae2024a1bdce3ffcb9e638d4a949a71ecdef4c0 (diff) |
Add support for package manifest upstream-version value
Diffstat (limited to 'mod/page.cxx')
-rw-r--r-- | mod/page.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/mod/page.cxx b/mod/page.cxx index 228a137..0c4c257 100644 --- a/mod/page.cxx +++ b/mod/page.cxx @@ -153,8 +153,8 @@ namespace brep if (!value_.empty ()) s << VALUE(value_); - if (!placeholder_.empty ()) - s << PLACEHOLDER(placeholder_); + if (placeholder_ != nullptr) + s << PLACEHOLDER(*placeholder_); if (autofocus_) s << AUTOFOCUS(""); @@ -249,7 +249,9 @@ namespace brep { s << version_; - if (stub_) + if (upstream_version_ != nullptr) + s << " (" << *upstream_version_ << ')'; + else if (stub_) s << " (stub)"; } else @@ -259,12 +261,13 @@ namespace brep s << A(HREF=tenant_dir (*root_, *tenant_) / dir_path (mime_url_encode (package_->string (), false)) / path (version_)) - << version_; + << version_ + << ~A; - if (stub_) + if (upstream_version_ != nullptr) + s << " (" << *upstream_version_ << ')'; + else if (stub_) s << " (stub)"; - - s << ~A; } s << ~SPAN |