From c465a2a38e87e3e638c48abe29470a5ec706b572 Mon Sep 17 00:00:00 2001 From: Guy Pyrzak Date: Sat, 2 Oct 2010 16:50:02 -0700 Subject: Bug 414509: offer View All (non obsolete) attachments r=LpSolit, a=LpSolit --- attachment.cgi | 5 +++++ skins/standard/attachment.css | 7 +++++++ template/en/default/attachment/list.html.tmpl | 8 +++++++- template/en/default/attachment/show-multiple.html.tmpl | 7 ++++++- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/attachment.cgi b/attachment.cgi index 8117131b3..8f8004b07 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -381,6 +381,11 @@ sub viewall { # Ignore deleted attachments. @$attachments = grep { $_->datasize } @$attachments; + if ($cgi->param('hide_obsolete')) { + @$attachments = grep { !$_->isobsolete } @$attachments; + $vars->{'hide_obsolete'} = 1; + } + # Define the variables and functions that will be passed to the UI template. $vars->{'bug'} = $bug; $vars->{'attachments'} = $attachments; diff --git a/skins/standard/attachment.css b/skins/standard/attachment.css index dbf136730..c05cfe2da 100644 --- a/skins/standard/attachment.css +++ b/skins/standard/attachment.css @@ -239,4 +239,11 @@ div#update_container { .no_javascript .bz_hide, .no_javascript .bz_edit { display: none; +} + +#hidden_obsolete_message { + text-align: left; + width: 75%; + margin: 0 auto; + font-weight: bold } \ No newline at end of file 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 @@