diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/mod-package-details.cxx | 2 | ||||
-rw-r--r-- | mod/mod-package-version-details.cxx | 2 | ||||
-rw-r--r-- | mod/page | 21 | ||||
-rw-r--r-- | mod/page.cxx | 13 |
4 files changed, 29 insertions, 9 deletions
diff --git a/mod/mod-package-details.cxx b/mod/mod-package-details.cxx index 1ee7a7a..7821b69 100644 --- a/mod/mod-package-details.cxx +++ b/mod/mod-package-details.cxx @@ -211,7 +211,7 @@ handle (request& rq, response& rs) s << TABLE(CLASS="proplist version") << TBODY - << TR_VERSION (name, p->version.string (), root) + << TR_VERSION (name, p->version, root) // @@ Shouldn't we skip low priority row ? Don't think so, why? // diff --git a/mod/mod-package-version-details.cxx b/mod/mod-package-version-details.cxx index ccd81c5..b2172ce 100644 --- a/mod/mod-package-version-details.cxx +++ b/mod/mod-package-version-details.cxx @@ -169,7 +169,7 @@ handle (request& rq, response& rs) // Repeat version here since it can be cut out in the header. // - << TR_VERSION (pkg->version.string ()) + << TR_VERSION (pkg->version) << TR_PRIORITY (pkg->priority) << TR_LICENSES (pkg->license_alternatives) @@ -114,20 +114,31 @@ namespace brep public: // Display the version as a link to the package version details page. // - TR_VERSION (const string& p, const string& v, const dir_path& r) - : package_ (&p), version_ (v), root_ (&r) {} + TR_VERSION (const string& p, const version& v, const dir_path& r) + : package_ (&p), + version_ (v.string ()), + stub_ (v.compare (wildcard_version, true) == 0), + root_ (&r) + { + } // Display the version as a regular text. // - TR_VERSION (const string& v) - : package_ (nullptr), version_ (v), root_ (nullptr) {} + TR_VERSION (const version& v) + : package_ (nullptr), + version_ (v.string ()), + stub_ (v.compare (wildcard_version, true) == 0), + root_ (nullptr) + { + } void operator() (xml::serializer&) const; private: const string* package_; - const string& version_; + string version_; + bool stub_; const dir_path* root_; }; diff --git a/mod/page.cxx b/mod/page.cxx index 79b5da5..aba7581 100644 --- a/mod/page.cxx +++ b/mod/page.cxx @@ -144,14 +144,23 @@ namespace brep << SPAN(CLASS="value"); if (package_ == nullptr) + { s << version_; + + if (stub_) + s << " (stub)"; + } else { assert (root_ != nullptr); s << A(HREF=*root_ / dir_path (mime_url_encode (*package_)) / path (version_)) - << version_ - << ~A; + << version_; + + if (stub_) + s << " (stub)"; + + s << ~A; } s << ~SPAN |