diff options
author | Guy Pyrzak <guy.pyrzak@gmail.com> | 2010-10-03 01:50:02 +0200 |
---|---|---|
committer | Guy Pyrzak <guy.pyrzak@gmail.com> | 2010-10-03 01:50:02 +0200 |
commit | c465a2a38e87e3e638c48abe29470a5ec706b572 (patch) | |
tree | 8cb456af6f026d2ee389049b1c30f4eac36847e2 /template/en/default | |
parent | 45071f40f52131bc605130c40352d477f85d0f05 (diff) | |
download | bugzilla-c465a2a38e87e3e638c48abe29470a5ec706b572.tar.gz bugzilla-c465a2a38e87e3e638c48abe29470a5ec706b572.tar.xz |
Bug 414509: offer View All (non obsolete) attachments
r=LpSolit, a=LpSolit
Diffstat (limited to 'template/en/default')
-rw-r--r-- | template/en/default/attachment/list.html.tmpl | 8 | ||||
-rw-r--r-- | template/en/default/attachment/show-multiple.html.tmpl | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl index 33d9a6c04..4ad5e528a 100644 --- a/template/en/default/attachment/list.html.tmpl +++ b/template/en/default/attachment/list.html.tmpl @@ -25,6 +25,8 @@ <!-- function toggle_display(link) { var table = document.getElementById("attachment_table"); + var view_all = document.getElementById("view_all"); + var hide_obsolete_url_parameter = "&hide_obsolete=1"; // Store current height for scrolling later var originalHeight = table.offsetHeight; var rows = YAHOO.util.Dom.getElementsByClassName( @@ -36,9 +38,11 @@ function toggle_display(link) { if (YAHOO.util.Dom.hasClass(rows[0], 'bz_default_hidden')) { link.innerHTML = "Show Obsolete"; + view_all.href = view_all.href + hide_obsolete_url_parameter } else { link.innerHTML = "Hide Obsolete"; + view_all.href = view_all.href.replace(hide_obsolete_url_parameter,""); } var newHeight = table.offsetHeight; @@ -150,7 +154,9 @@ function toggle_display(link) { Obsolete</a> ([% obsolete_attachments %]) [% END %] [% IF Param("allow_attachment_display") %] - <a href="attachment.cgi?bugid=[% bugid %]&action=viewall">View All</a> + <a id="view_all" href="attachment.cgi?bugid= + [%- bugid %]&action=viewall + [%- "&hide_obsolete=1" IF obsolete_attachments %]">View All</a> [% END %] </span> [% END %] diff --git a/template/en/default/attachment/show-multiple.html.tmpl b/template/en/default/attachment/show-multiple.html.tmpl index 15e20e894..e238e5f49 100644 --- a/template/en/default/attachment/show-multiple.html.tmpl +++ b/template/en/default/attachment/show-multiple.html.tmpl @@ -33,7 +33,12 @@ subheader = filtered_summary style_urls = ['skins/standard/attachment.css'] %] - +[% IF hide_obsolete %] + <div id="hidden_obsolete_message"> + Obsolete attachments are hidden. To view all attachments (including obsolete) + <a href="attachment.cgi?bugid=[% bug.id FILTER html %]&action=viewall">click here</a>. + </div> +[% END %] <br> [% FOREACH a = attachments %] |