From a87a5b411b4f173a7b1de2b919e71335306349ed Mon Sep 17 00:00:00 2001 From: "myk%mozilla.org" <> Date: Fri, 26 Oct 2001 03:37:50 +0000 Subject: Fix for bug 98602: re-implementation of "create attachment" page. Patch by Myk Melez . r=gerv@mozilla.org,jake@acutex.net --- template/default/attachment/contenttypes | 6 ++ template/default/attachment/created.atml | 35 ++++++++++ template/default/attachment/edit.atml | 7 +- template/default/attachment/enter.atml | 108 +++++++++++++++++++++++++++++++ template/default/attachment/list.atml | 8 +-- template/default/attachment/viewall.atml | 6 +- 6 files changed, 160 insertions(+), 10 deletions(-) create mode 100644 template/default/attachment/contenttypes create mode 100644 template/default/attachment/created.atml create mode 100644 template/default/attachment/enter.atml (limited to 'template') diff --git a/template/default/attachment/contenttypes b/template/default/attachment/contenttypes new file mode 100644 index 000000000..0328da2ec --- /dev/null +++ b/template/default/attachment/contenttypes @@ -0,0 +1,6 @@ + + + + + + diff --git a/template/default/attachment/created.atml b/template/default/attachment/created.atml new file mode 100644 index 000000000..f58884fdd --- /dev/null +++ b/template/default/attachment/created.atml @@ -0,0 +1,35 @@ +[% INCLUDE global/header + title = "Changes Submitted" + style = "th { text-align: left; }" +%] + + + + + + +
+

+ Attachment #[% attachid %] + to Bug #[% bugid %] Created +

+ + [% mailresults %] + + [% IF contenttypemethod == 'autodetect' %] +

+ Note: Bugzilla automatically detected the content type + [% contenttype %] for this attachment. If this is + incorrect, correct the value by + editing the attachment. +

+ [% END %] +
+ Go back to bug #[% bugid %] +
+ +

+Create Another Attachment to Bug #[% bugid %] +

+ +[% INCLUDE global/footer %] diff --git a/template/default/attachment/edit.atml b/template/default/attachment/edit.atml index 5981a692f..ac9f327d0 100755 --- a/template/default/attachment/edit.atml +++ b/template/default/attachment/edit.atml @@ -19,6 +19,7 @@
+ @@ -29,7 +30,7 @@
MIME Type:
-
+
Flags:
patch @@ -100,8 +101,8 @@ // If this is a plaintext document, remove cruft that Mozilla adds // because it treats it as an HTML document with a big PRE section. // http://bugzilla.mozilla.org/show_bug.cgi?id=86012 - var mimeType = '[% mimetype %]'; - if ( mimeType == 'text/plain' ) + var contentType = '[% contenttype %]'; + if ( contentType == 'text/plain' ) { theContent = theContent.replace( /^
/ , "" );
           theContent = theContent.replace( /<\/pre><\/body><\/html>$/ , "" );
diff --git a/template/default/attachment/enter.atml b/template/default/attachment/enter.atml
new file mode 100644
index 000000000..8bbdd3a3a
--- /dev/null
+++ b/template/default/attachment/enter.atml
@@ -0,0 +1,108 @@
+[%# Define strings that will serve as the title and header of this page %]
+[% title = BLOCK %]Create New Attachment for Bug #[% bugid %][% END %]
+[% h1 = BLOCK %]Create New Attachment for Bug #[% bugid %][% END %]
+[% h2 = BLOCK %][% bugsummary FILTER html %][% END %]
+
+[% INCLUDE global/header 
+  title = title
+  h1 = h1
+  h2 = h2
+  style = "
+    th { text-align: right; vertical-align: baseline; white-space: nowrap; }
+    td { text-align: left; vertical-align: baseline; padding-bottom: 5px; }
+  "
+%]
+
+
+  
+  
+   
+  
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
File: + Enter the path to the file on your computer.
+ +
Description: + Describe the attachment briefly.
+ +
+
Content Type: + If the attachment is a patch, check the box below.
+ patch

+ + Otherwise, choose a method for determining the content type.
+ + auto-detect
+ + select from list:
+ + enter manually: +
Obsoletes: + (optional) Check each existing attachment made obsolete by your new attachment.
+ [% IF attachments.size %] + [% FOREACH attachment = attachments %] + + [% attachment.id %]: [% attachment.description FILTER html %]
+ [% END %] + [% ELSE %] + [no attachments can be made obsolete] + [% END %] +
Comment: + (optional) Add a comment about this attachment to the bug.
+ +
 
+ +
+ + + +[% INCLUDE global/footer %] + + + diff --git a/template/default/attachment/list.atml b/template/default/attachment/list.atml index 3086c8dc0..9dd3931d0 100755 --- a/template/default/attachment/list.atml +++ b/template/default/attachment/list.atml @@ -12,9 +12,9 @@ [% IF attachment.isobsolete %] - [% attachment.description %] + [% attachment.description FILTER html %] [% ELSE %] - [% attachment.description %] + [% attachment.description FILTER html %] [% END %] @@ -22,7 +22,7 @@ [% IF attachment.ispatch %] patch [% ELSE %] - [% attachment.mimetype %] + [% attachment.contenttype %] [% END %] @@ -48,7 +48,7 @@ - Create a new attachment (proposed patch, testcase, etc.) + Create a New Attachment (proposed patch, testcase, etc.) View All diff --git a/template/default/attachment/viewall.atml b/template/default/attachment/viewall.atml index 9a22b716a..f7284b431 100755 --- a/template/default/attachment/viewall.atml +++ b/template/default/attachment/viewall.atml @@ -24,9 +24,9 @@ [% IF a.isobsolete %] - [% a.description %] + [% a.description FILTER html %] [% ELSE %] - [% a.description %] + [% a.description FILTER html %] [% END %] @@ -34,7 +34,7 @@ [% IF a.ispatch %] patch [% ELSE %] - [% a.mimetype %] + [% a.contenttype FILTER html %] [% END %] -- cgit v1.2.3-24-g4f1b