|
1017 | 1017 | [% IF user.id %] |
1018 | 1018 | <div id="top-actions"> |
1019 | 1019 | <button type="button" id="attachments-add-btn" class="minor">Attach File</button> |
1020 | | - <button type="button" class="comment-btn minor">Add Comment</button> |
| 1020 | + [% IF user.settings.comment_box_position.value == 'after_comments' %] |
| 1021 | + <button type="button" id="add-comment-btn" class="minor">Add Comment ↓</button> |
| 1022 | + [% ELSE %] |
| 1023 | + <button type="button" id="bottom-btn" class="minor">Bottom ↓</button> |
| 1024 | + [% END %] |
1021 | 1025 | [%+ Hook.process('top_actions') %] |
1022 | 1026 | <button type="submit" class="save-btn major" id="top-save-btn" style="display:none">Save Changes</button> |
1023 | 1027 | </div> |
|
1028 | 1032 | [%# === comments === %] |
1029 | 1033 |
|
1030 | 1034 | [% |
| 1035 | + IF user.settings.comment_box_position.value == 'before_comments'; |
| 1036 | + INCLUDE new_comment; |
| 1037 | + END; |
1031 | 1038 | INCLUDE bug_modal/activity_stream.html.tmpl stream=bug.activity_stream; |
1032 | | - IF user.id; |
1033 | | - INCLUDE bug_modal/new_comment.html.tmpl; |
1034 | | - ELSE; |
1035 | | - %] |
1036 | | - <div id="new-comment-notice"> |
1037 | | - You need to <a href="show_bug.cgi?id=[% bug.bug_id FILTER none %]&GoAheadAndLogIn=1">log in</a> |
1038 | | - before you can comment on or make changes to this [% terms.bug %]. |
1039 | | - </div> |
1040 | | - [% |
| 1039 | + IF user.settings.comment_box_position.value == 'after_comments'; |
| 1040 | + INCLUDE new_comment; |
1041 | 1041 | END; |
1042 | 1042 | %] |
1043 | 1043 |
|
1044 | 1044 | [%# === bottom actions === %] |
1045 | 1045 |
|
1046 | | -[% IF user.id %] |
1047 | | - <div id="bottom-actions"> |
1048 | | - <button type="submit" class="save-btn major" id="bottom-save-btn">Save Changes</button> |
1049 | | - [% |
1050 | | - IF bug.resolution == ""; |
1051 | | - seen_header = 0; |
1052 | | - FOREACH resolution IN ["FIXED", "INVALID", "DUPLICATE"]; |
1053 | | - NEXT UNLESS bug.choices.resolution.only("name", resolution).size; |
1054 | | - IF NOT seen_header; |
1055 | | - seen_header = 1; |
1056 | | - " Resolve as "; |
1057 | | - END; |
1058 | | - %] <button type="button" class="minor resolution-btn">[% resolution FILTER html %]</button> [% |
1059 | | - END; |
1060 | | - ELSIF bug.choices.bug_status.only("name", "REOPENED").size; |
1061 | | - %] <button type="button" class="minor status-btn" data-status="REOPENED">REOPEN</button> [% |
1062 | | - END; |
1063 | | - %] |
1064 | | - <div id="bottom-right-actions"> |
1065 | | - <button type="button" id="top-btn" class="minor">Top ↑</button> |
| 1046 | +<div id="bottom-actions"> |
| 1047 | + <div id="bottom-right-actions"> |
| 1048 | + <button type="button" id="top-btn" class="minor">Top ↑</button> |
| 1049 | + [% IF user.id %] |
1066 | 1050 | <button type="button" id="new-bug-btn" class="minor">New [% terms.Bug %] ▾</button> |
1067 | | - </div> |
| 1051 | + [% END %] |
1068 | 1052 | </div> |
| 1053 | +</div> |
| 1054 | + |
| 1055 | +[% IF user.id %] |
1069 | 1056 | </form> |
1070 | 1057 | [% END %] |
1071 | 1058 |
|
1072 | 1059 | [%# === blocks === %] |
1073 | 1060 |
|
| 1061 | +[% BLOCK new_comment %] |
| 1062 | + [%# === new comment === %] |
| 1063 | + [% |
| 1064 | + IF user.id; |
| 1065 | + INCLUDE bug_modal/new_comment.html.tmpl; |
| 1066 | + ELSE; |
| 1067 | + %] |
| 1068 | + <div id="new-comment-notice"> |
| 1069 | + You need to <a href="show_bug.cgi?id=[% bug.bug_id FILTER none %]&GoAheadAndLogIn=1">log in</a> |
| 1070 | + before you can comment on or make changes to this [% terms.bug %]. |
| 1071 | + </div> |
| 1072 | + [% |
| 1073 | + END; |
| 1074 | + %] |
| 1075 | + [%# === comment actions === %] |
| 1076 | + [% IF user.id %] |
| 1077 | + <div id="new-comment-actions"> |
| 1078 | + <button type="submit" class="save-btn major" id="bottom-save-btn">Save Changes</button> |
| 1079 | + [% |
| 1080 | + IF bug.resolution == ""; |
| 1081 | + seen_header = 0; |
| 1082 | + FOREACH resolution IN ["FIXED", "INVALID", "DUPLICATE"]; |
| 1083 | + NEXT UNLESS bug.choices.resolution.only("name", resolution).size; |
| 1084 | + IF NOT seen_header; |
| 1085 | + seen_header = 1; |
| 1086 | + " Resolve as "; |
| 1087 | + END; |
| 1088 | + %] <button type="button" class="minor resolution-btn">[% resolution FILTER html %]</button> [% |
| 1089 | + END; |
| 1090 | + ELSIF bug.choices.bug_status.only("name", "REOPENED").size; |
| 1091 | + %] <button type="button" class="minor status-btn" data-status="REOPENED">REOPEN</button> [% |
| 1092 | + END; |
| 1093 | + %] |
| 1094 | + </div> |
| 1095 | + [% END %] |
| 1096 | +[% END %] |
| 1097 | + |
1074 | 1098 | [% BLOCK fields_lhs %] |
1075 | 1099 | <div class="fields-lhs">[% content FILTER none %]</div> |
1076 | 1100 | [% END %] |
|
0 commit comments