diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-14 16:29:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-16 16:42:35 +0200 |
commit | 03905bcf1bcfd9e7932fcac4283c5817058a25ce (patch) | |
tree | b643d3bedf436bfcd8956b25133d5674b6b18e36 /brep/page | |
parent | 96281a6c4f818311a6df90c0d8b8f537a61e1090 (diff) |
Invent root path web interface configuration option
Diffstat (limited to 'brep/page')
-rw-r--r-- | brep/page | 36 |
1 files changed, 26 insertions, 10 deletions
@@ -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. |