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
a6251f6f
Commit
a6251f6f
authored
Oct 24, 2006
by
lpsolit%gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 317409: Add an option to hide obsolete attachments - Patch by Frédéric…
Bug 317409: Add an option to hide obsolete attachments - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=myk
parent
c778484f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
2 deletions
+35
-2
list.html.tmpl
template/en/default/attachment/list.html.tmpl
+35
-2
No files found.
template/en/default/attachment/list.html.tmpl
View file @
a6251f6f
...
...
@@ -17,10 +17,36 @@
# Rights Reserved.
#
# Contributor(s): Myk Melez <myk@mozilla.org>
# Frédéric Buclin <LpSolit@gmail.com>
#%]
<script type="text/javascript">
<!--
function toggle_display(link) {
var table = document.getElementById("attachment_table");
var rows = table.getElementsByTagName("tr");
var toggle;
if (link.innerHTML == "Show Obsolete") {
toggle = ""; // This should be 'table-row', but IE 6 doesn't understand it.
link.innerHTML = "Hide Obsolete";
}
else {
toggle = "none";
link.innerHTML = "Show Obsolete";
}
for (var i = 0; i < rows.length; i++) {
if (rows[i].className.match('bz_tr_obsolete'))
rows[i].style.display = toggle;
}
return true;
}
//-->
</script>
<br>
<table cellspacing="0" cellpadding="4" border="1">
<table
id="attachment_table"
cellspacing="0" cellpadding="4" border="1">
<tr>
<th bgcolor="#cccccc" align="left"><a name="a0" id="a0">Attachment</a></th>
<th bgcolor="#cccccc" align="left">Type</th>
...
...
@@ -33,10 +59,14 @@
<th bgcolor="#cccccc" align="left">Actions</th>
</tr>
[% count = 0 %]
[% has_obsolete_attachments = 0 %]
[% FOREACH attachment = attachments %]
[% count = count + 1 %]
[% IF !attachment.isprivate || user.is_insider || attachment.attacher.id == user.id %]
<tr [% "class=\"bz_private\"" IF attachment.isprivate %]>
[% SET has_obsolete_attachments = 1 IF attachment.isobsolete %]
<tr class="[% "bz_private" IF attachment.isprivate %][%-%]
[%+ "bz_tr_obsolete" IF attachment.isobsolete %]">
<td valign="top">
<a name="a[% count %]" href="attachment.cgi?id=[% attachment.id %]">[% attachment.description FILTER html FILTER obsolete(attachment.isobsolete) %]</a>
</td>
...
...
@@ -99,6 +129,9 @@
[% IF attachments.size %]
<td>
<a href="attachment.cgi?bugid=[% bugid %]&action=viewall">View All</a>
[% IF has_obsolete_attachments %]
<br><a href="#a0" onClick="return toggle_display(this);">Hide Obsolete</a>
[% END %]
</td>
[% ELSE %]
<td class="bz_disabled">
...
...
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