aboutsummaryrefslogtreecommitdiff
path: root/mod/page.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-09-08 17:46:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-09-08 21:00:05 +0300
commitd63e34a7e8612dc69ae25f3d3903ba04cc808bf7 (patch)
treea70540d6d7ec2b9ce72eae52d83ff35bcf150c1c /mod/page.cxx
parent70c1cdfd8f34472761fe5ec97f0713990c1b4f5b (diff)
Add support for root global and tenant views
Diffstat (limited to 'mod/page.cxx')
-rw-r--r--mod/page.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/mod/page.cxx b/mod/page.cxx
index 46f4879..ce12da6 100644
--- a/mod/page.cxx
+++ b/mod/page.cxx
@@ -98,7 +98,8 @@ namespace brep
<< TBODY
<< TR
<< TD(ID="search-txt")
- << *INPUT(TYPE="search", NAME="q", VALUE=query_, AUTOFOCUS="")
+ << *INPUT(TYPE="search", NAME=name_, VALUE=query_,
+ AUTOFOCUS="")
<< ~TD
<< TD(ID="search-btn")
<< *INPUT(TYPE="submit", VALUE="Search")
@@ -192,14 +193,15 @@ namespace brep
<< SPAN(CLASS="value")
<< A
<< HREF
-
- // Propagate search criteria to the package details page.
- //
<< tenant_dir (root_, tenant_) /
- path (mime_url_encode (name_.string (), false))
- << query_param_
+ path (mime_url_encode (name_.string (), false));
- << ~HREF
+ // Propagate search criteria to the package details page.
+ //
+ if (!query_.empty ())
+ s << "?q=" << query_;
+
+ s << ~HREF
<< name_
<< ~A
<< ~SPAN
@@ -255,7 +257,7 @@ namespace brep
<< SPAN(CLASS="value")
<< A
<< HREF
- << tenant_dir (root_, tenant_) << "?q="
+ << tenant_dir (root_, tenant_) << "?packages="
<< mime_url_encode (project_.string ())
<< ~HREF
<< project_
@@ -356,7 +358,8 @@ namespace brep
{
s << A
<< HREF
- << tenant_dir (root_, tenant_) << "?q=" << mime_url_encode (t)
+ << tenant_dir (root_, tenant_) << "?packages="
+ << mime_url_encode (t)
<< ~HREF
<< t
<< ~A;
@@ -500,8 +503,8 @@ namespace brep
if (r.empty ())
{
- // If there is no requirement alternatives specified, then
- // print the comment first word.
+ // If there is no requirement alternatives specified, then print the
+ // comment first word.
//
const auto& c (r.comment);
if (!c.empty ())