diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-08-09 18:08:23 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-08-09 18:08:23 +0300 |
commit | 82f40b7c92f381df19404c8dae41a37fdaae0baf (patch) | |
tree | 7c98f9f636ff7105ae7e91bb2020be6c45e3b70d /mod/page.cxx | |
parent | 728ee46209b9add314fe1fec9bdf4a43b7d7eeb8 (diff) |
Some tweaks to advanced package search page
Also make project links on other pages to refer to advanced package search page
Diffstat (limited to 'mod/page.cxx')
-rw-r--r-- | mod/page.cxx | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/mod/page.cxx b/mod/page.cxx index 17fef91..afeea0d 100644 --- a/mod/page.cxx +++ b/mod/page.cxx @@ -302,15 +302,26 @@ namespace brep s << TR(CLASS="project") << TH << "project" << ~TH << TD - << SPAN(CLASS="value") - << A - << HREF - << tenant_dir (root_, tenant_) << "?packages=" - << mime_url_encode (project_.string ()) - << ~HREF - << project_ - << ~A - << ~SPAN + << SPAN(CLASS="value"); + + // Note that we currently don't support the advanced package search in the + // multi-tenant mode. Thus, we print the project as a plain text in such a + // mode, rather than as a link. + // + if (tenant_.empty ()) + { + s << A + << HREF + << tenant_dir (root_, tenant_) << "?advanced-search&pr=" + << mime_url_encode (project_.string ()) + << ~HREF + << project_ + << ~A; + } + else + s << project_; + + s << ~SPAN << ~TD << ~TR; } |