summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-12-13 23:47:33 +0100
committermkanat%bugzilla.org <>2009-12-13 23:47:33 +0100
commitfb364fe62e0733e9c593db8dd826be94c7d980db (patch)
tree9156517c8845f5fe6a04ce3bab996bb7dfd69db9 /template/en/default/bug
parent28f6d6593ebd0d0e9d1d01e8de701a68c82854e6 (diff)
downloadbugzilla-fb364fe62e0733e9c593db8dd826be94c7d980db.tar.gz
bugzilla-fb364fe62e0733e9c593db8dd826be94c7d980db.tar.xz
Bug 524254: Make the comment box in bug/edit.html.tmpl into a BLOCK
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'template/en/default/bug')
-rw-r--r--template/en/default/bug/comments.html.tmpl22
-rw-r--r--template/en/default/bug/edit.html.tmpl136
2 files changed, 87 insertions, 71 deletions
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" %]
- <a href="#" onclick="toggle_all_comments('collapse'); return false;">Collapse All Comments</a> -
- <a href="#" onclick="toggle_all_comments('expand'); return false;">Expand All Comments</a>
- <hr>
-[% END %]
+<!-- This auto-sizes the comments and positions the collapse/expand links
+ to the right. -->
+<table class="bz_comment_table" cellpadding="0" cellspacing="0"><tr>
+<td>
[% FOREACH comment = comments %]
[% IF count >= start_at %]
@@ -139,6 +138,19 @@
#%]
[% Hook.process("aftercomments") %]
+</td>
+<td>
+ [% IF mode == "edit" %]
+ <ul class="bz_collapse_expand_comments">
+ <li><a href="#" onclick="toggle_all_comments('collapse');
+ return false;">Collapse All Comments</a></li>
+ <li><a href="#" onclick="toggle_all_comments('expand');
+ return false;">Expand All Comments</a></li>
+ </ul>
+ [% END %]
+</td>
+</tr></table>
+
[%############################################################################%]
[%# 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 *** %]
+ <div id="comments">
+ [% PROCESS bug/comments.html.tmpl
+ comments = bug.comments
+ mode = user.id ? "edit" : "show"
+ %]
+ </div>
- <br>
- <table cellpadding="1" cellspacing="1">
- <tr>
- <td id="comment_status_commit">
- <!-- The table keeps the commit button aligned with the box. -->
- <a name="add_comment"></a>
- [% IF user.id %]
- <label for="comment" accesskey="c"><b>Additional <u>C</u>omments</b></label>:
- [% IF user.is_insider %]
- <input type="checkbox" name="commentprivacy" value="1"
- id="newcommentprivacy"
- onClick="updateCommentTagControl(this, form)">
- <label for="newcommentprivacy">
- Make comment private (visible only to members of the
- <strong>[% Param('insidergroup') FILTER html %]</strong>
- group)
- </label>
- [% END %]
- <table><tr><td>
- [% INCLUDE global/textarea.html.tmpl
- name = 'comment'
- id = 'comment'
- minrows = 10
- maxrows = 25
- cols = constants.COMMENT_COLS
- %]
- [% Hook.process("after_comment_textarea") %]
- <br>
- [% PROCESS commit_button id=""%]
- <table class="status" cellspacing="0" cellpadding="0">
- <tr>
- <td class="field_label">
- <b><a href="page.cgi?id=fields.html#status">Status</a></b>:
- </td>
- <td>
- <a name="bug_status_bottom"></a>
- [% PROCESS bug/knob.html.tmpl %]
- </td>
- </tr>
- </table>
- </td></tr></table>
- [% ELSE %]
- <fieldset>
- <legend>Note</legend>
- <p>
- You need to
- <a href="show_bug.cgi?id=
- [%- bug.bug_id %]&amp;GoAheadAndLogIn=1">log in</a>
- before you can comment on or make changes to this [% terms.bug %].
- </p>
- </fieldset>
- [% END %]
- [%# *** Additional Comments *** %]
- <hr>
- <div id="comments">
- [% PROCESS bug/comments.html.tmpl
- comments = bug.comments
- mode = user.id ? "edit" : "show"
- %]
- </div>
-
- </td>
- </tr>
- </table>
</form>
[%############################################################################%]
@@ -1099,6 +1043,66 @@
[% END %]
[%############################################################################%]
+[%# Block for the Additional Comments box #%]
+[%############################################################################%]
+
+[% BLOCK comment_box %]
+ <div class="bz_section_additional_comments">
+ <a name="add_comment"></a>
+ [% IF user.id %]
+ <label for="comment" accesskey="c"><b>Additional
+ <u>C</u>omments</b></label>:
+
+ [% IF user.is_insider %]
+ <input type="checkbox" name="commentprivacy" value="1"
+ id="newcommentprivacy"
+ onClick="updateCommentTagControl(this, form)">
+ <label for="newcommentprivacy">
+ Make comment private (visible only to members of the
+ <strong>[% Param('insidergroup') FILTER html %]</strong> group)
+ </label>
+ [% END %]
+
+ <!-- This table keeps the submit button aligned with the box. -->
+ <table><tr><td>
+ [% 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') %]
+ <br>
+ [% PROCESS commit_button id=""%]
+
+ <table class="status" cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="field_label">
+ <b><a href="page.cgi?id=fields.html#status">Status</a></b>:
+ </td>
+ <td>
+ <a name="bug_status_bottom"></a>
+ [% PROCESS bug/knob.html.tmpl %]
+ </td>
+ </tr>
+ </table>
+ </td></tr></table>
+
+ [%# For logged-out users %]
+ [% ELSE %]
+ <table><tr><td><fieldset>
+ <legend>Note</legend>
+ You need to
+ <a href="show_bug.cgi?id=
+ [%- bug.bug_id %]&amp;GoAheadAndLogIn=1">log in</a>
+ before you can comment on or make changes to this [% terms.bug %].
+ </fieldset></table><tr></td>
+ [% END %]
+ </div>
+[% END %]
+
+[%############################################################################%]
[%# Block for SELECT fields #%]
[%############################################################################%]