From fb364fe62e0733e9c593db8dd826be94c7d980db Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sun, 13 Dec 2009 22:47:33 +0000 Subject: Bug 524254: Make the comment box in bug/edit.html.tmpl into a BLOCK Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- template/en/default/bug/comments.html.tmpl | 22 +++-- template/en/default/bug/edit.html.tmpl | 136 +++++++++++++++-------------- 2 files changed, 87 insertions(+), 71 deletions(-) (limited to 'template') diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index 9a04b7147..41b91d79a 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -120,11 +120,10 @@ [% END %] [% END %] -[% IF mode == "edit" %] - Collapse All Comments - - Expand All Comments -
-[% END %] + + + + +
[% FOREACH comment = comments %] [% IF count >= start_at %] @@ -139,6 +138,19 @@ #%] [% Hook.process("aftercomments") %] + + [% IF mode == "edit" %] + + [% END %] +
+ [%############################################################################%] [%# Block for individual comments #%] [%############################################################################%] diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 401d71ca3..88952d11a 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -226,75 +226,19 @@ bugid = bug.bug_id num_attachment_flag_types = bug.num_attachment_flag_types show_attachment_flags = bug.show_attachment_flags - %] + %] -[%# *** Comments Groups *** %] + [% PROCESS comment_box %] + + [%# *** Additional Comments *** %] +
+ [% PROCESS bug/comments.html.tmpl + comments = bug.comments + mode = user.id ? "edit" : "show" + %] +
-
- - - - -
- - - [% IF user.id %] - : - [% IF user.is_insider %] - - - [% END %] -
- [% INCLUDE global/textarea.html.tmpl - name = 'comment' - id = 'comment' - minrows = 10 - maxrows = 25 - cols = constants.COMMENT_COLS - %] - [% Hook.process("after_comment_textarea") %] -
- [% PROCESS commit_button id=""%] - - - - - -
- Status: - - - [% PROCESS bug/knob.html.tmpl %] -
-
- [% ELSE %] -
- Note -

- You need to - log in - before you can comment on or make changes to this [% terms.bug %]. -

-
- [% END %] - [%# *** Additional Comments *** %] -
-
- [% PROCESS bug/comments.html.tmpl - comments = bug.comments - mode = user.id ? "edit" : "show" - %] -
- -
[%############################################################################%] @@ -1098,6 +1042,66 @@ [% END %] +[%############################################################################%] +[%# Block for the Additional Comments box #%] +[%############################################################################%] + +[% BLOCK comment_box %] +
+ + [% IF user.id %] + : + + [% IF user.is_insider %] + + + [% END %] + + +
+ [% INCLUDE global/textarea.html.tmpl + name = 'comment' + id = 'comment' + minrows = 10 + maxrows = 25 + cols = constants.COMMENT_COLS + %] + [% Hook.process("after_comment_textarea", 'bug/edit.html.tmpl') %] +
+ [% PROCESS commit_button id=""%] + + + + + + +
+ Status: + + + [% PROCESS bug/knob.html.tmpl %] +
+
+ + [%# For logged-out users %] + [% ELSE %] +
+ Note + You need to + log in + before you can comment on or make changes to this [% terms.bug %]. +
+ [% END %] +
+[% END %] + [%############################################################################%] [%# Block for SELECT fields #%] [%############################################################################%] -- cgit v1.2.3-24-g4f1b