diff options
author | mkanat%bugzilla.org <> | 2006-11-04 08:16:46 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-11-04 08:16:46 +0100 |
commit | 7f94705675428a544f82d485f79f60f052e67fdf (patch) | |
tree | fce95d9d62f4db3d7a267b4c0d6c0d5ab43b3567 /template/en/default/global | |
parent | 9162305edb319289526f4503f5839bb21ea82724 (diff) | |
download | bugzilla-7f94705675428a544f82d485f79f60f052e67fdf.tar.gz bugzilla-7f94705675428a544f82d485f79f60f052e67fdf.tar.xz |
Bug 352403: Create an object for saved searches, and have Bugzilla::User use it
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'template/en/default/global')
4 files changed, 24 insertions, 17 deletions
diff --git a/template/en/default/global/per-bug-queries.html.tmpl b/template/en/default/global/per-bug-queries.html.tmpl index a9b4e44db..c70d59e7e 100644 --- a/template/en/default/global/per-bug-queries.html.tmpl +++ b/template/en/default/global/per-bug-queries.html.tmpl @@ -54,7 +54,7 @@ [%# Get existing lists of bugs for this user %] [% lists_of_bugs = [] %] [% FOREACH q = user.queries %] - [% NEXT UNLESS q.query_type == constants.LIST_OF_BUGS %] + [% NEXT UNLESS q.bug_ids_only %] [% lists_of_bugs.push(q.name) %] [% END %] diff --git a/template/en/default/global/site-navigation.html.tmpl b/template/en/default/global/site-navigation.html.tmpl index ffe9fe799..cb57df610 100644 --- a/template/en/default/global/site-navigation.html.tmpl +++ b/template/en/default/global/site-navigation.html.tmpl @@ -97,6 +97,14 @@ href="buglist.cgi?cmdtype=runnamed&namedcmd=[% q.name FILTER url_quote %]"> [% END %] + [% FOREACH q = user.queries_subscribed %] + <link rel="Saved Search" + title="[% q.name FILTER html %] ([% q.user.login FILTER html %])" + href="buglist.cgi?cmdtype=dorem&remaction=run&namedcmd= + [% q.name FILTER url_quote %]&sharer_id= + [% q.user.id FILTER url_quote %]"> + [% END %] + [%# *** Bugzilla Administration Tools *** %] [% IF user.login %] [% '<link rel="Administration" title="Parameters" diff --git a/template/en/default/global/useful-links.html.tmpl b/template/en/default/global/useful-links.html.tmpl index 9439c2b8b..079269b1b 100644 --- a/template/en/default/global/useful-links.html.tmpl +++ b/template/en/default/global/useful-links.html.tmpl @@ -86,10 +86,12 @@ [%# Saved searches %] - [% IF user.showmybugslink OR user.queries.size %] + [% IF user.showmybugslink OR user.queries.size + OR user.queries_subscribed.size + %] <li id="links-saved"> <div class="label"> - Saved Searches: + Saved Searches: </div> <ul class="links"> [% IF user.showmybugslink %] @@ -99,7 +101,6 @@ [% END %] [% FOREACH q = user.queries %] - [% NEXT IF q.userid != user.id %] [% IF q.link_in_footer %] <li>[% '<span class="separator">| </span>' IF print_pipe %] <a href="buglist.cgi?cmdtype=runnamed&namedcmd=[% q.name FILTER url_quote %]">[% q.name FILTER html %]</a></li> @@ -108,22 +109,20 @@ [% END %] [% new_line = print_pipe %] [% print_pipe = 0 %] - [% FOREACH q = user.queries %] - [% NEXT IF q.userid == user.id %] - [% IF q.link_in_footer %] - [% IF new_line %] - <br> - [% new_line = 0 %] - [% END %] - <li> + [% FOREACH q = user.queries_subscribed %] + [% IF new_line %] + <br> + [% new_line = 0 %] + [% END %] + <li> [% '<span class="separator">| </span>' IF print_pipe %] <a href="buglist.cgi?cmdtype=dorem&remaction=run&namedcmd= [% q.name FILTER url_quote %]&sharer_id= - [% q.userid FILTER url_quote %]" + [% q.user.id FILTER url_quote %]" class="shared" - title="Shared by [% q.user.identity FILTER html %]">[% q.name FILTER html FILTER no_break %]</a></li> - [% print_pipe = 1 %] - [% END %] + title="Shared by [% q.user.identity FILTER html %]" + >[% q.name FILTER html FILTER no_break %]</a></li> + [% print_pipe = 1 %] [% END %] </ul> </li> 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 <a href="query.cgi?[% q.query FILTER html %]">edit</a> + or <a href="query.cgi?[% q.url FILTER html %]">edit</a> [% END %] [% END %] |