diff options
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 %] |