diff options
Diffstat (limited to 'extensions/BugModal/template/en')
-rw-r--r-- | extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl | 16 | ||||
-rw-r--r-- | extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl | 10 |
2 files changed, 19 insertions, 7 deletions
diff --git a/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl index f9209d3bf..8e04392d8 100644 --- a/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl @@ -8,11 +8,18 @@ [%# # bug: (bug object) the main bug object + # active_attachments: array of active attachment objects + # obsolete_attachments: array of obsolete attachment objects #%] <table class="layout-table" id="attachments"> [% FOREACH attachment IN bug.attachments %] - [% NEXT IF attachment.isprivate && !(user.is_insider || attachment.attacher.id == user.id) %] + [% + NEXT IF attachment.isprivate && !(user.is_insider || attachment.attacher.id == user.id); + attachment_rendered = 0; + Hook.process("row"); + NEXT IF attachment_rendered; + %] <tr class=" [%~ " bz_private" IF attachment.isprivate %] [%~ " attach-obsolete" IF attachment.isobsolete %] @@ -67,3 +74,10 @@ </tr> [% END %] </table> + +<div id="attachments-actions"> + [% IF obsolete_attachments %] + <button type="button" id="attachments-obsolete-btn" class="minor">Show Obsolete Attachments</button> + [% END %] + [% Hook.process('actions') %] +</div> diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl index f9c93efd1..54ae9bec0 100644 --- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl @@ -922,12 +922,10 @@ subtitle = sub.join(", ") collapsed = active_attachments == 0 %] - [% INCLUDE bug_modal/attachments.html.tmpl %] - [% IF obsolete_attachments %] - <div id="attachments-actions"> - <button type="button" id="attachments-obsolete-btn" class="minor">Show Obsolete Attachments</button> - </div> - [% END %] + [% INCLUDE bug_modal/attachments.html.tmpl + active_attachments = active_attachments + obsolete_attachments = obsolete_attachments + %] [% END %] [% END %] |