From 2df35fc7a5139c4c478e1989b7122672f68f7be6 Mon Sep 17 00:00:00 2001 From: Guy Pyrzak Date: Tue, 2 Mar 2010 22:13:28 -0800 Subject: 101770 --- template/en/default/attachment/create.html.tmpl | 2 +- .../en/default/attachment/diff-header.html.tmpl | 4 +- template/en/default/attachment/edit.html.tmpl | 327 +++++++++++---------- .../en/default/attachment/show-multiple.html.tmpl | 2 +- 4 files changed, 180 insertions(+), 155 deletions(-) (limited to 'template/en/default/attachment') diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl index f00a0ade4..f440f4583 100644 --- a/template/en/default/attachment/create.html.tmpl +++ b/template/en/default/attachment/create.html.tmpl @@ -33,7 +33,7 @@ title = title header = header subheader = subheader - style_urls = [ 'skins/standard/create_attachment.css' ] + style_urls = [ 'skins/standard/attachment.css' ] javascript_urls = [ "js/attachment.js", "js/util.js" ] doc_section = "attachments.html" %] diff --git a/template/en/default/attachment/diff-header.html.tmpl b/template/en/default/attachment/diff-header.html.tmpl index 663d9b766..30b8e98e9 100644 --- a/template/en/default/attachment/diff-header.html.tmpl +++ b/template/en/default/attachment/diff-header.html.tmpl @@ -53,11 +53,11 @@ Interdiff of #[% oldid %] and #[% newid %] for [% terms.bug %] #[% bugid %] [% END %] [% PROCESS global/header.html.tmpl doc_section = "attachments.html#patchviewer" javascript_urls = "js/attachment.js" - style_urls = ['skins/standard/create_attachment.css'] %] + style_urls = ['skins/standard/attachment.css'] %] [% ELSE %] - + diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl index fa8a53a4a..5407c0aa2 100644 --- a/template/en/default/attachment/edit.html.tmpl +++ b/template/en/default/attachment/edit.html.tmpl @@ -17,6 +17,7 @@ # # Contributor(s): Myk Melez # Frédéric Buclin + # Guy Pyrzak #%] [% PROCESS global/variables.none.tmpl %] @@ -37,7 +38,8 @@ subheader = subheader doc_section = "attachments.html" javascript_urls = ['js/attachment.js'] - style_urls = ['skins/standard/create_attachment.css'] + style_urls = ['skins/standard/attachment.css'] + bodyclasses = "no_javascript" %] [%# No need to display the Diff button and iframe if the attachment is not a patch. %] @@ -54,12 +56,38 @@ [% END %] - - - - - - [% IF !attachment.datasize %] - - [% ELSIF attachment.isurl %] - - [% ELSIF !Param("allow_attachment_display") %] - - [% ELSIF attachment.is_viewable %] - - [% ELSE %] - + + [% END %] + [% IF attachment.flag_types.size > 0 %] +
+ [% PROCESS "flag/list.html.tmpl" bug_id = attachment.bug_id + attach_id = attachment.id + flag_types = attachment.flag_types + read_only_flags = !can_edit + %] +
[% END %] - -
+
+
+
+
+ [% "[patch]" IF attachment.ispatch%] + + [% attachment.description FILTER html %] + + [% IF can_edit %] + (edit) + [% END %] +
+ [% IF NOT attachment.isurl %] +
+ [% attachment.filename FILTER html %] ([% attachment.contenttype FILTER html %]) + [% IF attachment.datasize %] + [%+ attachment.datasize FILTER unitconvert %] + [% ELSE %] + deleted + [% END %], created by [%+ INCLUDE global/user.html.tmpl who = attachment.attacher %] + [% IF attachment.isprivate %] + Only visible to [% Param('insidergroup') FILTER html %] + [% END %] +
+ [% END %] +
+
+ + (hide) +
- +   [% INCLUDE global/textarea.html.tmpl id = 'description' name = 'description' @@ -68,38 +96,34 @@ wrap = 'soft' classes = 'block' _ editable_or_hide defaultcontent = attachment.description - %] - [% IF !can_edit %] - [%+ attachment.description FILTER wrap_comment(25) FILTER html %] - [% END %] + %]
[% IF attachment.isurl %] - - + + [% ELSE %]
- - [% IF !can_edit %] - [%+ attachment.filename FILTER truncate(25) FILTER html %] - [% END %] + value="[% attachment.filename FILTER html %]">
- - [% IF !can_edit %] - [%+ attachment.contenttype FILTER truncate(25) FILTER html %] - [% END %] + value="[% attachment.contenttype FILTER html %]">
- + +
+ Creator: + [%+ INCLUDE global/user.html.tmpl who = attachment.attacher %] +
+
Size: [% IF attachment.datasize %] @@ -109,154 +133,148 @@ [% END %]
-
- Creator: - [%+ INCLUDE global/user.html.tmpl who = attachment.attacher %] -
-
- [% IF can_edit %] - - [% ELSE %] - Is Patch: - [%+ attachment.ispatch ? "yes" : "no" %] - [% END %] +
[% END %] +
+
+
+ + +
-
- - [% IF can_edit %] - - [% ELSE %] - Is Obsolete: - [%+ attachment.isobsolete ? "yes" : "no" %] - [% END %] -
- - [% IF user.is_insider %] -
- - [% IF can_edit %] - - [% ELSE %] - Is Private: - [%+ attachment.isprivate ? "yes" : "no" %] + [% IF user.is_insider %] +
+ + [% IF can_edit %] + + [% ELSE %] + Is Private: + [%+ attachment.isprivate ? "yes" : "no" %] + [% END %] +
[% END %]
- [% END %] +
+
- [% IF attachment.flag_types.size > 0 %] -
- [% PROCESS "flag/list.html.tmpl" bug_id = attachment.bug_id - attach_id = attachment.id - flag_types = attachment.flag_types - read_only_flags = !can_edit - %] +
+ [% IF !attachment.datasize %] +
The content of this attachment has been deleted.
+ [% ELSIF attachment.isurl %] + - [% END %] - - [% IF user.id %] -
- + [% ELSIF !Param("allow_attachment_display") %] +
+

+ The attachment is not viewable in your browser due to security + restrictions enabled by your [% terms.Bugzilla %] administrator. +

+

+ In order to view the attachment, you first have to + download it. +

+
+ [% ELSIF attachment.is_viewable %] +
[% INCLUDE global/textarea.html.tmpl - id = 'comment' + id = 'editFrame' name = 'comment' - minrows = 5 - cols = 25 + classes = 'bz_default_hidden' + minrows = 10 + cols = 80 wrap = 'soft' - classes = 'block' + defaultcontent = (attachment.contenttype.match('^text\/')) ? + attachment.data.replace('(.*\n|.+)', '>$1') : undef %] + + +
+ [% ELSE %] +
+

+ Attachment is not viewable in your browser because its MIME type + ([% attachment.contenttype FILTER html %]) is not one that your browser is + able to display. +

+

+ Download the attachment. +

- -

[% END %] -
The content of this attachment has been deleted. - - [% IF attachment.datasize < 120 %] - [% attachment.data FILTER html %] - [% ELSE %] - [% attachment.data FILTER truncate(80) FILTER html %] -  ... - [% attachment.data.match(".*(.{20})$").0 FILTER html %] - [% END %] - - -

- The attachment is not viewable in your browser due to security - restrictions enabled by [% terms.Bugzilla %]. -

-

- In order to view the attachment, you first have to - download it. -

-
+ +
+ [% IF user.id %] +
+ + [% classNames = 'block' %] + [% classNames = "$classes bz_private" IF attachment.isprivate %] [% INCLUDE global/textarea.html.tmpl - id = 'editFrame' + id = 'comment' name = 'comment' - style = 'height: 400px; width: 100%; display: none' minrows = 10 cols = 80 wrap = 'soft' - defaultcontent = (attachment.contenttype.match('^text\/')) ? - attachment.data.replace('(.*\n|.+)', '>$1') : undef + classes = classNames %] - - -
-

- Attachment is not viewable in your browser because its MIME type - ([% attachment.contenttype FILTER html %]) is not one that your browser is - able to display. -

-

- Download the attachment. -

-
+ [% IF user.id %] +
+ +
+ [% END %] + + +
@@ -283,7 +301,14 @@ [% " |" UNLESS loop.last() %] [% END %]
- +[% IF can_edit %] + +[% END %] [% Hook.process('end') %] [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/attachment/show-multiple.html.tmpl b/template/en/default/attachment/show-multiple.html.tmpl index bcc297713..15e20e894 100644 --- a/template/en/default/attachment/show-multiple.html.tmpl +++ b/template/en/default/attachment/show-multiple.html.tmpl @@ -31,7 +31,7 @@ title = title header = header subheader = filtered_summary - style_urls = ['skins/standard/create_attachment.css'] + style_urls = ['skins/standard/attachment.css'] %]
-- cgit v1.2.3-24-g4f1b