[%# 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. #%]
[% IF user.id && user.settings.comment_box_position.value == 'after_comments' %] [% ELSE %] [% END %]
[% PROCESS bug/time.html.tmpl; FOREACH change_set IN bug.activity_stream; NEXT IF change_set.cc_only; extra_class = change_set.comment.collapsed ? " ca-" _ change_set.comment.author.id : ""; '
'; extra_class = ""; IF change_set.user_id == bug.assigned_to.id; extra_class = "assignee"; ELSIF change_set.user_id == bug.reporter.id; extra_class = "reporter"; END; IF change_set.comment; PROCESS comment_header comment=change_set.comment; ELSE; PROCESS activity_header activities=change_set.activity id=change_set.id; END; IF change_set.comment != ""; PROCESS comment_body comment=change_set.comment; END; FOREACH activity IN change_set.activity; PROCESS activity_body activity=activity change_set=change_set; END; '
'; END; %] [% IF user.can_tag_comments %] [% END %] [% BLOCK comment_header %]
[%# normal comment header %] [%# default-collapsed comment header %] [% IF comment.collapsed %] [% END %]
[% END %] [% BLOCK activity_header %] [% action = activities.0 %]
[% END %] [% BLOCK comment_body %] [% IF comment.type == constants.CMT_ATTACHMENT_CREATED %] [% att = comment.attachment; link = 'attachment.cgi?id=' _ att.id %] [% END %] [% IF comment.is_markdown AND Param('use_markdown') %] [% comment_tag = 'div' %] [% ELSE %] [% comment_tag = 'pre' %] [% END %] [%# Description (Comment 0) can be empty %] [% IF comment.body || comment.count == 0 %] <[% comment_tag FILTER none %] class="comment-text [%= "markdown-body" IF comment.is_markdown %] [%= "bz_private" IF comment.is_private %] [% "empty" IF comment.body == "" %]" id="ct-[% comment.count FILTER none %]" data-comment-id="[% comment.id FILTER none %]" [% IF comment.is_markdown +%] data-ismarkdown="true" [% END ~%] [% IF comment.collapsed +%] style="display:none"[% END ~%]> [%~ IF comment.body != "" ~%] [%~ comment.body_full({ exclude_attachment => 1 }) FILTER renderMarkdown(bug, comment) ~%] [%~ ELSE ~%] No description provided. [%~ END ~%] [% END %] [% END %] [% BLOCK activity_body; RETURN IF activity.cc_only && !change_set.cc_only; style = ""; IF change_set.comment && change_set.comment.collapsed; style = ' style="display:none"'; END; '
'; FOREACH change IN activity.changes; NEXT IF change.fieldname == 'cc'; '
'; IF change.attachid; %] Attachment #[% change.attachid FILTER none %] - [%+ END; IF change.buglist; IF change.fieldname == 'has_dupe'; label = "Duplicate of this " _ terms.bug; ELSIF change.fieldname == 'dupe_of'; label = "Duplicate of " _ terms.bug; ELSE; label = field_descs.${change.fieldname}; END; IF change.added != ''; label _ ": " FILTER html; PROCESS add_change value=change.added; END; IF change.removed != ''; IF change.added != ''; "
"; END; "No longer "; label FILTER lcfirst; ": "; PROCESS add_change value=change.removed; END; ELSE; IF change.fieldname == 'longdescs.isprivate'; # reference the comment that was made private/public in the field label %] Comment [% change.comment.count FILTER none %] is private: [%+ ELSIF change.fieldname == 'reporter_accessible'; ""; ELSIF change.fieldname.match('^cf_(status|tracking)_'); %] [%~ field_descs.${change.fieldname} FILTER html %]: [%+ ELSE; field_descs.${change.fieldname} _ ": " FILTER html; END; IF change.removed != ''; IF change.added == ''; ''; END; PROCESS add_change value=change.removed; IF change.added == ''; ''; ELSE; ' → '; END; END; IF change.fieldname == 'cf_user_story'; %](updated)[% ELSE; PROCESS add_change value=change.added; END; END; '
'; END; '
'; END; BLOCK add_change; SWITCH change.fieldname; CASE [ 'estimated_time', 'remaining_time', 'work_time' ]; PROCESS formattimeunit time_unit=value; CASE 'bug_file_loc'; %] [% value FILTER truncate(40) FILTER html %] [% CASE 'see_also'; FOREACH see_also IN value; IF see_also.bug_id; see_also.bug_id FILTER bug_link(see_also.bug_id, use_alias => 1); ELSE; %] [% see_also.url FILTER html %] [% END; ", " UNLESS loop.last; END; CASE [ 'assigned_to', 'reporter', 'qa_contact', 'cc', 'bug_mentor', 'flagtypes.name' ]; value FILTER email; CASE 'reporter_accessible'; IF value == 'true'; "Accessible to reporter"; ELSIF value == 'false'; "Not accessible to reporter"; END; CASE 'keywords'; FOREACH keyword IN value.split(', '); %] [%~ keyword FILTER html %][% ", " UNLESS loop.last %] [%+ END; CASE; IF change.fieldtype == constants.FIELD_TYPE_DATETIME; INCLUDE bug_modal/rel_time.html.tmpl ts=value; ELSIF change.buglist; value FILTER bug_list_link(use_alias => 1); ELSIF change.fieldname.match('^cf_(status|tracking)_') && value != '---'; %] [% value FILTER html %] [%+ ELSE; value FILTER truncate(256, '…') FILTER html; END; END; END; %]