aboutsummaryrefslogtreecommitdiff
path: root/mod/page
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-08-30 00:50:08 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-08-30 00:57:07 +0300
commit665057a9c4bb0d2ea5ca35d81cb1c22244fa7002 (patch)
tree35c9c6f50801a19ab4824647ab8921b9234f6003 /mod/page
parent321fa79e78c17bdb1e3e27f6e8b9d019201584a1 (diff)
Support stubs on package and package version details pages
Diffstat (limited to 'mod/page')
-rw-r--r--mod/page21
1 files changed, 16 insertions, 5 deletions
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_;
};