From 6a429a8d898d5f0789f5b5a3f2858c6578fa5227 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 7 Mar 2011 21:50:13 -0600 Subject: Clean up current_query and preserve multiple args When implementing search for multiple architectures or repositories, I didn't update this method to accomidate the new query parameters. Clean it up a bit by not appending/stripping the leading '?' anywhere but in the template itself, and ensure we can handle multiple of any parameter passed in. Fixes FS#23180. Signed-off-by: Dan McGee --- templates/packages/search.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'templates/packages/search.html') diff --git a/templates/packages/search.html b/templates/packages/search.html index dad05ffa..5d0de1f4 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -50,13 +50,13 @@

{% if page_obj.has_previous %} - {% else %} < Prev {% endif %} {% if page_obj.has_next %} - {% else %} Next > @@ -74,17 +74,17 @@ {% if perms.main.change_package %}   {% endif %} - Arch - Repo - Name Version Description - Last Updated - Flag Date @@ -118,13 +118,13 @@

{% if page_obj.has_previous %} - {% else %} < Prev {% endif %} {% if page_obj.has_next %} - {% else %} Next > -- cgit v1.2.3-2-g168b From 5abe0727bfa9a4fab24afcccb66da7d8832bf6b9 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 13 Mar 2011 11:41:36 -0500 Subject: Show epoch in package version if != 0 Add a full_version property method to our package object that does the version formatting, and switch all templates displaying package versions over to this new method. Signed-off-by: Dan McGee --- templates/packages/search.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/packages/search.html') diff --git a/templates/packages/search.html b/templates/packages/search.html index 5d0de1f4..8ea53b8e 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -99,9 +99,9 @@ {{ pkg.pkgname }} {% if pkg.flag_date %} - {{ pkg.pkgver }}-{{ pkg.pkgrel }} + {{ pkg.full_version }} {% else %} - {{ pkg.pkgver }}-{{ pkg.pkgrel }} + {{ pkg.full_version }} {% endif %} {{ pkg.pkgdesc }} {{ pkg.last_update|date }} -- cgit v1.2.3-2-g168b From a0ef88770f5fe318f38eaa7dc794727a507c797b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 15 Mar 2011 09:02:22 -0500 Subject: Ensure package search form correctly handles errors We were silently eating errors and just showing a normal package list if the form didn't validate. Rather than do that, make sure we return no packages at all and display the form errors back to the user in a sane fashion. Adjust the validation methods on the 'limit' parameter so any integer is acceptable. Signed-off-by: Dan McGee --- templates/packages/search.html | 52 ++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 22 deletions(-) (limited to 'templates/packages/search.html') diff --git a/templates/packages/search.html b/templates/packages/search.html index 8ea53b8e..381ebb01 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -14,28 +14,36 @@

Package Search

- + -- cgit v1.2.3-2-g168b