summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/bug')
-rw-r--r--template/en/default/bug/show.xml.tmpl34
1 files changed, 21 insertions, 13 deletions
diff --git a/template/en/default/bug/show.xml.tmpl b/template/en/default/bug/show.xml.tmpl
index 05e52256b..9964cd800 100644
--- a/template/en/default/bug/show.xml.tmpl
+++ b/template/en/default/bug/show.xml.tmpl
@@ -53,20 +53,11 @@
[% PROCESS section_flags obj => bug %]
[% IF displayfields.long_desc %]
+ [% sort_order = user.settings.comment_sort_order.value %]
+ <comment_sort_order>[% sort_order FILTER xml %]</comment_sort_order>
+
[% FOREACH c = bug.comments %]
- [% NEXT IF c.is_private && !user.is_insider %]
- <long_desc isprivate="[% c.is_private FILTER xml %]">
- <commentid>[% c.id FILTER xml %]</commentid>
- [% IF c.is_about_attachment %]
- <attachid>[% c.extra_data FILTER xml %]</attachid>
- [% END %]
- <who name="[% c.author.name FILTER xml %]">[% c.author.email FILTER email FILTER xml %]</who>
- <bug_when>[% c.creation_ts FILTER time("%Y-%m-%d %T %z") FILTER xml %]</bug_when>
- [% IF user.is_timetracker && (c.work_time - 0 != 0) %]
- <work_time>[% PROCESS formattimeunit time_unit = c.work_time FILTER xml %]</work_time>
- [% END %]
- <thetext>[% c.body_full FILTER xml %]</thetext>
- </long_desc>
+ [% PROCESS a_comment %]
[% END %]
[% END %]
@@ -150,3 +141,20 @@
/>
[% END %]
[% END %]
+
+[% BLOCK a_comment %]
+ [% RETURN IF c.is_private && !user.is_insider %]
+ <long_desc isprivate="[% c.is_private FILTER xml %]" >
+ <commentid>[% c.id FILTER xml %]</commentid>
+ <comment_count>[% c.count FILTER xml %]</comment_count>
+ [% IF c.is_about_attachment %]
+ <attachid>[% c.extra_data FILTER xml %]</attachid>
+ [% END %]
+ <who name="[% c.author.name FILTER xml %]">[% c.author.email FILTER email FILTER xml %]</who>
+ <bug_when>[% c.creation_ts FILTER time("%Y-%m-%d %T %z") FILTER xml %]</bug_when>
+ [% IF user.is_timetracker && (c.work_time - 0 != 0) %]
+ <work_time>[% PROCESS formattimeunit time_unit = c.work_time FILTER xml %]</work_time>
+ [% END %]
+ <thetext>[% c.body_full FILTER xml %]</thetext>
+ </long_desc>
+[% END %]