From: Guy Pyrzak Date: Sat, 2 Oct 2010 23:50:02 +0000 (-0700) Subject: Bug 414509: offer View All (non obsolete) attachments X-Git-Tag: bugzilla-4.1.1~242 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c465a2a38e87e3e638c48abe29470a5ec706b572;p=thirdparty%2Fbugzilla.git Bug 414509: offer View All (non obsolete) attachments r=LpSolit, a=LpSolit --- diff --git a/attachment.cgi b/attachment.cgi index 8117131b37..8f8004b071 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 dbf136730c..c05cfe2dac 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 33d9a6c044..4ad5e528af 100644 --- a/template/en/default/attachment/list.html.tmpl +++ b/template/en/default/attachment/list.html.tmpl @@ -25,6 +25,8 @@