From 29e3eb8b03ba072fa4ce092b45fb98c2e2352744 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 28 Apr 2015 12:41:44 +0800 Subject: Bug 1153102: add hooks for bug bounty display and form --- .../template/en/default/bug_modal/attachments.html.tmpl | 16 +++++++++++++++- .../template/en/default/bug_modal/edit.html.tmpl | 10 ++++------ extensions/BugModal/web/bug_modal.css | 8 ++++++-- 3 files changed, 25 insertions(+), 9 deletions(-) (limited to 'extensions/BugModal') 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 #%] [% 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; + %] [% END %]
+ +
+ [% IF obsolete_attachments %] + + [% END %] + [% Hook.process('actions') %] +
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 %] -
- -
- [% END %] + [% INCLUDE bug_modal/attachments.html.tmpl + active_attachments = active_attachments + obsolete_attachments = obsolete_attachments + %] [% END %] [% END %] diff --git a/extensions/BugModal/web/bug_modal.css b/extensions/BugModal/web/bug_modal.css index b9e6817fc..f35ac415d 100644 --- a/extensions/BugModal/web/bug_modal.css +++ b/extensions/BugModal/web/bug_modal.css @@ -319,6 +319,10 @@ input[type="number"] { /* attachments */ +#module-attachments .module-content { + padding: 0; +} + #attachments { width: 100%; } @@ -379,8 +383,8 @@ input[type="number"] { display: inline; } -#attachments-actions { - padding: 2px; +#attachments-actions button { + margin: 2px; } #attachments .attach-flag .vcard { -- cgit v1.2.3-24-g4f1b