[%# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. #%] [% RETURN UNLESS attachments.size || Param("maxattachmentsize") || Param("maxlocalattachment") %]
[% count = 0 %] [% obsolete_attachments = 0 %] [% user_cache = template_cache.users %] [% FOREACH attachment = attachments %] [% count = count + 1 %] [% IF !attachment.isprivate || user.is_insider || attachment.attacher.id == user.id %] [% IF attachment.isobsolete %] [% obsolete_attachments = obsolete_attachments + 1 %] [% END %] [% IF show_attachment_flags %] [% END %] [% END %] [% END %]
Attachments
[% IF attachment.datasize %] [% END %] [% IF attachment.isobsolete %] [% END %] [% attachment.description FILTER html %] [% IF attachment.isobsolete %] [% END %] [% "" IF attachment.datasize %] [% IF attachment.datasize %] ([% attachment.datasize FILTER unitconvert %], [% IF attachment.ispatch %] patch) [% ELSE %] [%+ attachment.contenttype FILTER html %]) [% END %] [% ELSE %] (deleted) [% END %]
[%- attachment.attached FILTER time("%Y-%m-%d %H:%M %Z") %], [%# No need to recreate the exact same template if we already have it. %] [% attacher_id = attachment.attacher.id %] [% UNLESS user_cache.$attacher_id %] [% user_cache.$attacher_id = BLOCK %] [% INCLUDE global/user.html.tmpl who = attachment.attacher %] [% END %] [% END %] [% user_cache.$attacher_id FILTER none %]
[% IF attachment.flags.size == 0 %] no flags [% ELSE %] [% FOREACH flag = attachment.flags %] [% IF user.id %] [% flag.setter.nick FILTER html %]: [% ELSIF flag.setter.name %] [% flag.setter.nick FILTER html %]: [% ELSE %] [% flag.setter.nick FILTER html %]: [% END %] [%+ flag.type.name FILTER html %][% flag.status %] [%+ IF flag.status == "?" && flag.requestee %] [% IF user.id %] ([% flag.requestee.nick FILTER html %]) [% ELSIF flag.requestee.name %] ([% flag.requestee.nick FILTER html %]) [% ELSE %] ([% flag.requestee.nick FILTER html %]) [% END %] [% END %]
[% END %] [% END %]
Details [% IF attachment.ispatch && feature_enabled('patch_viewer') %] | Diff [% END %] [% Hook.process("action") %]