From 7f94705675428a544f82d485f79f60f052e67fdf Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 4 Nov 2006 07:16:46 +0000 Subject: Bug 352403: Create an object for saved searches, and have Bugzilla::User use it Patch By Max Kanat-Alexander r=LpSolit, a=myk --- .../default/account/prefs/saved-searches.html.tmpl | 19 +++++++------- .../en/default/global/per-bug-queries.html.tmpl | 2 +- .../en/default/global/site-navigation.html.tmpl | 8 ++++++ template/en/default/global/useful-links.html.tmpl | 29 +++++++++++----------- template/en/default/global/user-error.html.tmpl | 2 +- 5 files changed, 33 insertions(+), 27 deletions(-) (limited to 'template/en') diff --git a/template/en/default/account/prefs/saved-searches.html.tmpl b/template/en/default/account/prefs/saved-searches.html.tmpl index 0e2fdfba1..e4bbc51ae 100644 --- a/template/en/default/account/prefs/saved-searches.html.tmpl +++ b/template/en/default/account/prefs/saved-searches.html.tmpl @@ -20,8 +20,6 @@ #%] [%# INTERFACE: - # queries: list of the named queries visible to the user, both own and shared - # by others. Cleaned-up result of Bugzilla::User::queries. # queryshare_groups: list of groups the user may share queries with # (id, name). #%] @@ -81,18 +79,18 @@ — - [% FOREACH q = queries %] - [% NEXT UNLESS q.userid == user.id %] + [% FOREACH q = user.queries %] [% q.name FILTER html %] Run - Edit + Edit - [% IF q.usedinwhine %] + [% IF q.used_in_whine %] Remove from whining first [% ELSE %] Don't share [% FOREACH group = queryshare_groups %] + [% ' selected="selected"' + IF q.shared_with_group.id == group.id %] + >[% group.name FILTER html %] [% END %] [% ELSE %] @@ -144,8 +144,7 @@ [% found_shared_query = 0 %] - [% FOREACH q = queries %] - [% NEXT IF q.userid == user.id %] + [% FOREACH q = user.queries_available %] [% found_shared_query = 1 %] [% q.name FILTER html %] @@ -153,7 +152,7 @@ Run + [% q.user.id FILTER url_quote %]">Run [% END %] + [% FOREACH q = user.queries_subscribed %] + + [% END %] + [%# *** Bugzilla Administration Tools *** %] [% IF user.login %] [% '
- Saved Searches: + Saved Searches:
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index eebefa927..df5f767ea 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -1537,7 +1537,7 @@ [% FOREACH q = Bugzilla.user.queries %] [% IF q.name == namedcmd %] - or edit + or edit [% END %] [% END %] -- cgit v1.2.3-24-g4f1b