]> git.donarmstrong.com Git - debbugs.git/blob - templates/en_US/cgi/short_bug_status.tx
call iso8601 instead of stringify
[debbugs.git] / templates / en_US / cgi / short_bug_status.tx
1 <:- macro bug_url_subject->($bug) {-:>
2 <a href="<: $bug.url :>"<:$bug.is_done?' style="text-decoration:line-through"':'':>>#
3     <:- $bug.bug :>: <: $bug.subject :></a>
4 <:- } -:>
5 <div class="shortbugstatus">
6     <a href="<: $bug.url :>"<:$bug.is_done?' style="text-decoration:line-through"':'':>>#<: $bug.bug :></a>
7     [<font face="fixed"><span class="link" onclick="javascript:extra_status_visible(<: $bug.bug :>)"><abbr title="<: $bug.severity :>">
8         <:- if $bug.strong_severity { -:><em class="severity"><: $bug.short_severity :></em>
9         <:- } else { -:>
10         <:- $bug.short_severity } -:></abbr>|
11         <:- for $bug.tags.short_tags -> $tag { -:>
12         <abbr title="<: $tag.long :>"><: $tag.short :></abbr>
13         <:- } else { -:>&nbsp;&nbsp;<: } :>|
14         <:- if $bug.is_merged > 0 { -:>
15         <abbr title="merged">=</abbr>
16         <:- } -:>
17         <:- if $bug.has_fixed { -:>
18         <abbr title="fixed versions">☺</abbr>
19         <:- } -:>
20         <:- if $bug.is_blocked { -:>
21         <abbr title="blocked by">♙</abbr>
22         <:- } -:>
23         <:- if $bug.is_blocking { -:>
24         <abbr title="blocks">♔</abbr>
25         <:- } -:>
26         <:- if $bug.is_forwarded { -:>
27         <abbr title="forwarded">↝</abbr>
28         <:- } -:>
29         <:- if $bug.archived { -:>
30         <abbr title="archived">♲</abbr>
31         <:- } -:>
32         <:- if $bug.is_affecting { -:>
33         <abbr title="affects">☣</abbr>
34         <:- } -:></span></font>]
35         [<: for $bug.packages.members_ref -> $package { -:>
36         <a href="<: $package.url :>"><: $package.name :></a>
37         <:- if ! $~package.is_last { -:>, <: } else if ! $~package.is_first { -:>.<:- } -:>
38         <:- } :>]
39         <a href="<: $bug.url :>"><: $bug.subject :></a>
40         <div id="extra_status_<: $bug.bug :>" class="shortbugstatusextra">
41             <table class="extra_status">
42                 <tr><td>Reported by</td><td><a href="<: $bug.submitter_url :>"><: $bug.submitter.name :></a></td></tr>
43                 <tr><td>Date</td><td><: $bug.created.iso8601 :></td></tr>
44       <:- if $bug.is_owned { -:>
45                 <tr><td>Owned by</td><td><a href="<: $bug.owner_url :>"><: $bug.owner.name :></a></td></tr>
46       <:- } :>
47                 <tr><td>Severity</td><td>
48           <: if $bug.strong_severity { -:>
49           <em class="severity"><: $bug.severity :></em>
50           <:- } else { -:>
51           <: $bug.severity :>
52           <:- } -:></td></tr>
53       <:- if $bug.tags.has_any_tags { -:>
54           <tr><td>Tags</td><td>
55           : if $bug.tags.has_tags {
56           <span class="tags"><:  $bug.tags.join_tags(', ') :></span>
57           : }
58           <: if $bug.tags.has_usertags  {
59               if $bug.tags.has_tags { :>, <: } -:>
60           <span class="usertags"><: $bug.tags.join_usertags(', ') :></span>
61           <:- } -:>
62           </td></tr>
63           <: } :>
64           <:- if $bug.is_merged > 0 { -:>
65           <tr><td>Merged with </td><td>
66           <: for $bug.mergedwith.members_ref -> $bug { -:>
67           <:- bug_url_subject($bug) -:>
68           <:- if ! $~bug.is_last {-:>, <: } else { -:>.<:- } -:>
69           <:- } -:>
70           </td></tr>
71           <:- } -:>
72           <:- if $bug.has_found { -:>
73           <tr><td>Found in version<: if $bug.status.found_count > 1 { :>s<: } :></td>
74               <td><a href="<: $bug.version_url :>"><:- $bug.status.found_join(', ') -:></a></td></tr>
75           <:- } -:>
76               <:- if $bug.has_fixed { :>
77               <tr><td>Fixed in version<: if $bug.status.fixed_count > 1 { :>s<: } :></td><td>
78                   <a href="<: $bug.version_url :>"><:- $bug.status.fixed_join(', ') -:></a></td></tr>
79           <:- } -:>
80           <:- if $bug.has_found or $bug.has_fixed { -:>
81       </a>
82       <:- } -:>
83       <:-  if $bug.is_forwarded { :>
84       <tr><td><strong>Forwarded</strong> to</td>
85           <td><: $bug.forwarded.split('\,\s+').map(maybelink).join(', ') :></td>
86       </tr>
87       <:- } -:>
88       <:- if $bug.is_done { -:>
89       <tr><td><strong>Done:</strong></td><td>
90           <: $bug.done.name :></td>
91       </tr>
92       <:- } -:>
93       <:- if  not $bug.archived and $bug.when_archiveable >= 0 { -:>
94       <tr><td><strong>Can be archived</strong></td><td><strong>
95           <: if $bug.when_archiveable == 0 { :>
96           today
97           <: } else if $bug.when_archiveable == 1 { :>
98           in 1 day
99           <: } else { :>
100           in <: $bug.when_archiveable :> days
101           <:- } :></strong></td></tr>
102       <:- } else if $bug.archived { -:>
103       <tr><td><strong>Archived</strong></td></tr>
104       <:- } -:>
105       <:- if $bug.is_blocked { :>
106       <tr><td>Fix blocked by</td><td>
107           <: for $bug.blocked_by -> $bug { :>
108           <: bug_url_subject($bug) :>
109           <:- if ! $~bug.is_last { -:>, <: } else { -:>.<:- } -:>
110           <:- } -:></td>
111       </tr>
112       <:- } -:>
113       <:- if $bug.blocks.count > 0 { :>
114       <tr><td>Blocking fix for</td><td>
115           <: for $bug.blocks -> $bug { :>
116           <: bug_url_subject($bug) :>
117           <:- if ! $~bug.is_last {-:>, <: } else { -:>.<:- } -:>
118           <:- } -:>
119       </td></tr>
120       <:- } -:>
121       <:- macro days_ago->($what,$ago) {-:>
122       <tr>
123           <:- if ($time - $ago) / 86400 > 60 { -:>
124           <td class="ancient"><: $what :></td><td><:  secs_to_english($time-$ago) :> ago.</td>
125           <:- } else if ($time - $ago) / 86400 > 30 { :>
126           <td class="old"><: $what :></td><td><:  secs_to_english($time-$ago) :> ago.</td>
127           <:- } -:>
128       </tr>
129       <:- } -:>
130       <: days_ago("Filed",$bug.created.epoch) :>
131       <: days_ago("Modified",$bug.modified.epoch) :>
132             </table>
133       <:- if $bug.archived {:>
134       <span>Bug is archived. No further changes may be made.</span>
135       <:- } -:>
136   </div>
137 </div>