summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-08-14 19:34:45 +0200
committerlpsolit%gmail.com <>2007-08-14 19:34:45 +0200
commit1427884e689fa9c470f88bdefc7eabbb87b047c6 (patch)
treefc72d03fda088bea4d296b3188e214a7b568427d /template
parent62a6b26925e2e80a31fcfe618102cfabeb76f700 (diff)
downloadbugzilla-1427884e689fa9c470f88bdefc7eabbb87b047c6.tar.gz
bugzilla-1427884e689fa9c470f88bdefc7eabbb87b047c6.tar.xz
Bug 392175: Move isViewable out of attachment.cgi + some other minor cleanup - Patch by Frédéric Buclin <LpSolit@gmail.com>
Diffstat (limited to 'template')
-rw-r--r--template/en/default/attachment/edit.html.tmpl26
-rw-r--r--template/en/default/attachment/show-multiple.html.tmpl2
2 files changed, 14 insertions, 14 deletions
diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl
index d0a75b3fd..10438a7a5 100644
--- a/template/en/default/attachment/edit.html.tmpl
+++ b/template/en/default/attachment/edit.html.tmpl
@@ -286,7 +286,19 @@
[% IF !attachment.datasize %]
<td width="75%"><b>The content of this attachment has been deleted.</b></td>
- [% ELSIF isviewable %]
+ [% ELSIF attachment.isurl %]
+ <td width="75%">
+ <a href="[% attachment.data FILTER html %]">
+ [% IF attachment.datasize < 120 %]
+ [% attachment.data FILTER html %]
+ [% ELSE %]
+ [% attachment.data FILTER truncate(80) FILTER html %]
+ &nbsp;...
+ [% attachment.data.match(".*(.{20})$").0 FILTER html %]
+ [% END %]
+ </a>
+ </td>
+ [% ELSIF attachment.is_viewable %]
<td width="75%">
[% INCLUDE global/textarea.html.tmpl
id = 'editFrame'
@@ -317,18 +329,6 @@
//-->
</script>
</td>
- [% ELSIF attachment.isurl %]
- <td width="75%">
- <a href="[% attachment.data FILTER html %]">
- [% IF attachment.datasize < 120 %]
- [% attachment.data FILTER html %]
- [% ELSE %]
- [% attachment.data FILTER truncate(80) FILTER html %]
- &nbsp;...
- [% attachment.data.match(".*(.{20})$").0 FILTER html %]
- [% END %]
- </a>
- </td>
[% ELSE %]
<td id="noview" width="50%">
<p><b>
diff --git a/template/en/default/attachment/show-multiple.html.tmpl b/template/en/default/attachment/show-multiple.html.tmpl
index 9c0fc57b0..3d5b3b4e8 100644
--- a/template/en/default/attachment/show-multiple.html.tmpl
+++ b/template/en/default/attachment/show-multiple.html.tmpl
@@ -86,7 +86,7 @@
</tr>
</table>
- [% IF a.isviewable %]
+ [% IF a.is_viewable %]
<iframe src="attachment.cgi?id=[% a.id %]" width="75%" height="350">
<b>You cannot view the attachment on this page because your browser does not support IFRAMEs.
<a href="attachment.cgi?id=[% a.id %]">View the attachment on a separate page</a>.</b>