diff options
Diffstat (limited to 'template')
-rw-r--r-- | template/en/default/bug/comments.html.tmpl | 22 | ||||
-rw-r--r-- | template/en/default/bug/edit.html.tmpl | 136 |
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 %]&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 %]&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 #%] [%############################################################################%] |