From 665057a9c4bb0d2ea5ca35d81cb1c22244fa7002 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 30 Aug 2016 00:50:08 +0300 Subject: Support stubs on package and package version details pages --- mod/page | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'mod/page') diff --git a/mod/page b/mod/page index a01307c..f693e7c 100644 --- a/mod/page +++ b/mod/page @@ -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_; }; -- cgit v1.1