Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
c465a2a3
Commit
c465a2a3
authored
Oct 02, 2010
by
Guy Pyrzak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 414509: offer View All (non obsolete) attachments
r=LpSolit, a=LpSolit
parent
45071f40
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
2 deletions
+26
-2
attachment.cgi
attachment.cgi
+5
-0
attachment.css
skins/standard/attachment.css
+8
-0
list.html.tmpl
template/en/default/attachment/list.html.tmpl
+7
-1
show-multiple.html.tmpl
template/en/default/attachment/show-multiple.html.tmpl
+6
-1
No files found.
attachment.cgi
View file @
c465a2a3
...
...
@@ -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
;
...
...
skins/standard/attachment.css
View file @
c465a2a3
...
...
@@ -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
template/en/default/attachment/list.html.tmpl
View file @
c465a2a3
...
...
@@ -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 %]
...
...
template/en/default/attachment/show-multiple.html.tmpl
View file @
c465a2a3
...
...
@@ -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 %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment