diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-08-30 00:50:08 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2016-08-30 00:57:07 +0300 |
commit | 665057a9c4bb0d2ea5ca35d81cb1c22244fa7002 (patch) | |
tree | 35c9c6f50801a19ab4824647ab8921b9234f6003 /mod/page | |
parent | 321fa79e78c17bdb1e3e27f6e8b9d019201584a1 (diff) |
Support stubs on package and package version details pages
Diffstat (limited to 'mod/page')
-rw-r--r-- | mod/page | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -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_; }; |