aboutsummaryrefslogtreecommitdiff
path: root/brep/page
diff options
context:
space:
mode:
Diffstat (limited to 'brep/page')
-rw-r--r--brep/page36
1 files changed, 26 insertions, 10 deletions
diff --git a/brep/page b/brep/page
index 309caa9..c968389 100644
--- a/brep/page
+++ b/brep/page
@@ -22,21 +22,29 @@ namespace brep
class CSS_LINKS
{
public:
- CSS_LINKS (const char* u): url_ (u) {}
+ CSS_LINKS (const path& p, const dir_path& r):
+ path_ (p), root_ (r) {}
void
operator() (xml::serializer& s) const;
private:
- const char* url_;
+ const path& path_;
+ const dir_path& root_;
};
// Generates page header element.
//
- struct DIV_HEADER
+ class DIV_HEADER
{
+ public:
+ DIV_HEADER (const dir_path& r): root_ (r) {}
+
void
operator() (xml::serializer& s) const;
+
+ private:
+ const dir_path& root_;
};
// Generates package search form element.
@@ -79,8 +87,8 @@ namespace brep
class TR_NAME
{
public:
- TR_NAME (const std::string& n, const std::string& q)
- : name_ (n), query_param_ (q) {}
+ TR_NAME (const std::string& n, const std::string& q, const dir_path& r)
+ : name_ (n), query_param_ (q), root_ (r) {}
void
operator() (xml::serializer& s) const;
@@ -88,6 +96,7 @@ namespace brep
private:
const std::string& name_;
const std::string& query_param_;
+ const dir_path& root_;
};
// Generates package version element.
@@ -97,12 +106,15 @@ namespace brep
public:
// Display the version as a link to the package version details page.
//
- TR_VERSION (const std::string& p, const std::string& v)
- : package_ (&p), version_ (v) {}
+ TR_VERSION (const std::string& p,
+ const std::string& v,
+ const dir_path& r)
+ : package_ (&p), version_ (v), root_ (&r) {}
// Display the version as a regular text.
//
- TR_VERSION (const std::string& v): package_ (nullptr), version_ (v) {}
+ TR_VERSION (const std::string& v)
+ : package_ (nullptr), version_ (v), root_ (nullptr) {}
void
operator() (xml::serializer& s) const;
@@ -110,6 +122,7 @@ namespace brep
private:
const std::string* package_;
const std::string& version_;
+ const dir_path* root_;
};
// Generates package summary element.
@@ -160,13 +173,14 @@ namespace brep
class TR_TAGS
{
public:
- TR_TAGS (const strings& ts): tags_ (ts) {}
+ TR_TAGS (const strings& ts, const dir_path& r): tags_ (ts), root_ (r) {}
void
operator() (xml::serializer& s) const;
private:
const strings& tags_;
+ const dir_path& root_;
};
// Generates package dependencies element.
@@ -174,13 +188,15 @@ namespace brep
class TR_DEPENDS
{
public:
- TR_DEPENDS (const dependencies& d): dependencies_ (d) {}
+ TR_DEPENDS (const dependencies& d, const dir_path& r)
+ : dependencies_ (d), root_ (r) {}
void
operator() (xml::serializer& s) const;
private:
const dependencies& dependencies_;
+ const dir_path& root_;
};
// Generates package requirements element.