diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-10-04 17:05:53 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-10-04 17:36:00 +0300 |
commit | 5275715ea7ba476af67ee293b242021b45306638 (patch) | |
tree | 09b70d9dfb62d6d21511f84964e876fa08f9e075 | |
parent | b9240918720e15263ca6fbf55d639e9ddef01fb3 (diff) |
Don't propagate search criteria from package search page to package details page
-rw-r--r-- | mod/mod-builds.cxx | 4 | ||||
-rw-r--r-- | mod/mod-packages.cxx | 2 | ||||
-rw-r--r-- | mod/page.cxx | 12 | ||||
-rw-r--r-- | mod/page.hxx | 11 |
4 files changed, 9 insertions, 20 deletions
diff --git a/mod/mod-builds.cxx b/mod/mod-builds.cxx index 7ad5fc7..f260b72 100644 --- a/mod/mod-builds.cxx +++ b/mod/mod-builds.cxx @@ -681,7 +681,7 @@ handle (request& rq, response& rs) s << TABLE(CLASS="proplist build") << TBODY - << TR_NAME (b.package_name, string (), root, b.tenant) + << TR_NAME (b.package_name, root, b.tenant) << TR_VERSION (b.package_name, b.package_version, root, b.tenant) << TR_VALUE ("toolchain", b.toolchain_name + '-' + @@ -1077,7 +1077,7 @@ handle (request& rq, response& rs) s << TABLE(CLASS="proplist build") << TBODY - << TR_NAME (id.name, string (), root, id.tenant) + << TR_NAME (id.name, root, id.tenant) << TR_VERSION (id.name, p->version, root, id.tenant) << TR_VALUE ("toolchain", string (ct.toolchain_name) + '-' + diff --git a/mod/mod-packages.cxx b/mod/mod-packages.cxx index f09d7fa..cee3806 100644 --- a/mod/mod-packages.cxx +++ b/mod/mod-packages.cxx @@ -167,7 +167,7 @@ handle (request& rq, response& rs) s << TABLE(CLASS="proplist package") << TBODY - << TR_NAME (p->name, equery, root, p->tenant) + << TR_NAME (p->name, root, p->tenant) << TR_SUMMARY (p->summary) << TR_LICENSE (p->license_alternatives) << TR_DEPENDS (p->dependencies, root, p->tenant); diff --git a/mod/page.cxx b/mod/page.cxx index 331f919..d844a89 100644 --- a/mod/page.cxx +++ b/mod/page.cxx @@ -237,15 +237,9 @@ namespace brep << A << HREF << tenant_dir (root_, tenant_) / - path (mime_url_encode (name_.string (), false)); - - // Propagate search criteria to the package details page. - // - if (!query_.empty ()) - s << "?q=" << query_; - - s << ~HREF - << name_ + path (mime_url_encode (name_.string (), false)) + << ~HREF + << name_ << ~A << ~SPAN << ~TD diff --git a/mod/page.hxx b/mod/page.hxx index dc85230..f3c27d5 100644 --- a/mod/page.hxx +++ b/mod/page.hxx @@ -193,24 +193,19 @@ namespace brep const string& tenant_; }; - // Generate package name element with an optional search criteria. The - // search string should be url-encoded, if specified. + // Generate package name element. // class TR_NAME { public: - TR_NAME (const package_name& n, - const string& q, - const dir_path& r, - const string& t) - : name_ (n), query_ (q), root_ (r), tenant_ (t) {} + TR_NAME (const package_name& n, const dir_path& r, const string& t) + : name_ (n), root_ (r), tenant_ (t) {} void operator() (xml::serializer&) const; private: const package_name& name_; - const string& query_; const dir_path& root_; const string& tenant_; }; |