]> git.donarmstrong.com Git - debbugs.git/commitdiff
mousify bugreport and short status templates
authorDon Armstrong <don@donarmstrong.com>
Sun, 19 Aug 2018 20:31:42 +0000 (13:31 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sun, 19 Aug 2018 20:31:42 +0000 (13:31 -0700)
templates/en_US/cgi/bugreport.tx
templates/en_US/cgi/short_bug_status.tx

index ce72b3274afc318af43d7e231ac850f709c49371..6e7fef4378fbc423de5285b2ed19d55c8174f320 100644 (file)
@@ -1,5 +1,5 @@
-<: include "html/pre_title.tx" :>#<: $bug_num :> - <: $status.subject :> - <: $config.project :> <: $config.bug :> report logs<: include "html/post_title.tx" :>
-<link rel="canonical" href="<: bug_links(bug=>$bug_num,links_only=>1) :>">
+<: include "html/pre_title.tx" :>#<: $bug.id :> - <: $bug.subject :> - <: $config.project :> <: $config.bug :> report logs<: include "html/post_title.tx" :>
+<link rel="canonical" href="<: $bug.url :>">
 <script type="text/javascript">
 <!--
 function toggle_infmessages()
@@ -18,25 +18,31 @@ function toggle_infmessages()
 </head>
 <body>
     <div class="debbugs_install"><: $config.project :> <: $config.bug :> report logs</div>
-    <h1 class="bug_header"><a class="bug_email" href="mailto:<: $bug_num :>@<: $config.email_domain :>">#<: $bug_num :></a>
-        <span class="bug_subject"><: $status.subject :></span>
+    <h1 class="bug_header"><a class="bug_email" href="mailto:<: $bug.id :>@<: $config.email_domain :>">#<: $bug.id :></a>
+        <span class="bug_subject"><: $bug.subject :></span>
     </h1>
-<div class="versiongraph"><: raw($version_graph) :></div>
+: if $bug.has_found or $bug.has_fixed {
+    <div class="versiongraph">
+        <a href="<: $bug.version_url :>">
+            <img alt="version graph"
+                 src="<: $bug.version_url("width",2,"height",2) :>">
+        </a></div>
+: }
 <: include "cgi/bugreport_pkginfo.tx" :>
 <: include "cgi/bugreport_buginfo.tx" :>
 <div class="bugreport_operations">
 : if looks_like_number($msg) {
-    <span><a href="<: bug_links(bug => $bug_num, links_only => 1) :>">Full log</a></span>
+    <span><a href="<: $bug.url :>">Full log</a></span>
 : } else {
 : if ! $status.archived {
-<span><a href="mailto:<: $bug_num :>@<: $config.email_domain :>">Reply</a>
-or <a href="mailto:<: $bug_num :>-subscribe@<: $config.email_domain :>">subscribe</a>
+<span><a href="mailto:<: $bug.email :>">Reply</a>
+or <a href="mailto:<: $bug.subscribe_email :>">subscribe</a>
 to this <: $config.bug :>.</span>
 : }
 <span>View this <: $config.bug :> as an
-<a href="<: bug_links("bug",$bug_num,links_only=>1,options=>{mbox=>"yes"}) :>">mbox</a>,
-<a href="<: bug_links("bug",$bug_num,links_only=>1,options=>{mbox=>"yes",mboxstatus => "yes"}) :>">status mbox</a>, or
-<a href="<: bug_links("bug",$bug_num,links_only=>1,options=>{mbox=>"yes",mboxmaint => "yes"}) :>">maintainer mbox</a>
+    <a href="<: $bug.mbox_url :>">mbox</a>,
+    <a href="<: $bug.mbox_status_url :>">status mbox</a>, or
+    <a href="<: $bug.mbox_maint_url :>">maintainer mbox</a>
 </span>
 </div>
 : }
index 2dd6e9ef5292959ab225a24aea10ae95cd8ed6be..1e66da97275e5a480c6ac871162970611b184736 100644 (file)
         <:- if ! $~package.is_last { -:>, <: } else if ! $~package.is_first { -:>.<:- } -:>
         <:- } :>]
         <a href="<: $bug.url :>"><: $bug.subject :></a>
-  <div id="extra_status_<: $bug.bug :>" class="shortbugstatusextra">
-      <span>Reported by: <a href="<: $bug.submitter_url :>"><: $bug.submitter :></a>;</span>
-      <span>Date: <: $bug.created.stringify :>;</span>
+        <div id="extra_status_<: $bug.bug :>" class="shortbugstatusextra">
+            <table class="extra_status">
+                <tr><td>Reported by</td><td><a href="<: $bug.submitter_url :>"><: $bug.submitter :></a></td></tr>
+                <tr><td>Date</td><td><: $bug.created.stringify :></td></tr>
       <:- if $bug.is_owned { -:>
-      <span>Owned by: <a href="<: $bug.owner_url :>"><: $bug.owner :></a>;</span>
+                <tr><td>Owned by</td><td><a href="<: $bug.owner_url :>"><: $bug.owner :></a></td></tr>
       <:- } :>
-      <span>Severity:
+                <tr><td>Severity</td><td>
           <: if $bug.strong_severity { -:>
           <em class="severity"><: $bug.severity :></em>
           <:- } else { -:>
           <: $bug.severity :>
-          <:- } -:></span>
-      <span>
-          <:- if $bug.tags.has_tags { -:>
-          Tags: <:  $bug.tags.join_all(', ') :>;
+          <:- } -:></td></tr>
+      <:- if $bug.tags.has_any_tags { -:>
+          <tr><td>Tags</td><td>
+          : if $bug.tags.has_tags {
+          <span class="tags"><:  $bug.tags.join_tags(', ') :></span>
+          : }
+          <: if $bug.tags.has_usertags  {
+              if $bug.tags.has_tags { :>, <: } -:>
+          <span class="usertags"><: $bug.tags.join_usertags(', ') :></span>
           <:- } -:>
-      </span>
-      <:- if $bug.is_merged > 0 { -:>
-      <span>Merged with 
+          </td></tr>
+          <: } :>
+          <:- if $bug.is_merged > 0 { -:>
+          <tr><td>Merged with </td><td>
           <: for $bug.mergedwith.members_ref -> $bug { -:>
           <:- bug_url_subject($bug) -:>
           <:- if ! $~bug.is_last {-:>, <: } else { -:>.<:- } -:>
           <:- } -:>
-      </span>
-      <:- } -:>
-      : if $bug.has_found or $bug.has_fixed {
-      <a href="<:
-                  version_url(package => $bug.package,
-                          found   => [$bug.found],
-                          fixed   => [$bug.fixed],
-                      ):>">
+          </td></tr>
           <:- } -:>
           <:- if $bug.has_found { -:>
-          <span>Found in version<: if $bug.found.count > 1 { :>s<: } :>
-              <:- $bug.found.join(', ') -:>;
-          </span>
+          <tr><td>Found in version<: if $bug.found.count > 1 { :>s<: } :></td>
+              <td><a href="<: $bug.version_url :>"><:- $bug.found.join(', ') -:></a></td></tr>
           <:- } -:>
-          <:- if $bug.has_fixed { :>
-          <span>Fixed in version<: if $bug.fixed.count > 1 { :>s<: } :>
-              <:- $bug.fixed.join(', ') -:>;
-          </span>
+              <:- if $bug.has_fixed { :>
+              <tr><td>Fixed in version<: if $bug.fixed.count > 1 { :>s<: } :></td><td>
+                  <a href="<: $bug.version_url :>"><:- $bug.fixed.join(', ') -:></a></td></tr>
           <:- } -:>
           <:- if $bug.has_found or $bug.has_fixed { -:>
       </a>
       <:- } -:>
       <:-  if $bug.is_forwarded { :>
-      <span><strong>Forwarded</strong> to 
-          <: $bug.forwarded.split('\,\s+').map(maybelink).join(', ') :>
-      </span>
+      <tr><td><strong>Forwarded</strong> to</td>
+          <td><: $bug.forwarded.split('\,\s+').map(maybelink).join(', ') :></td>
+      </tr>
       <:- } -:>
       <:- if $bug.is_done { -:>
-      <span><strong>Done:</strong>
-          <: $bug.done :>
-      </span>
+      <tr><td><strong>Done:</strong></td><td>
+          <: $bug.done :></td>
+      </tr>
       <:- } -:>
       <:- if  not $bug.archived and $bug.when_archiveable >= 0 { -:>
-      <span><strong>Can be archived
+      <tr><td><strong>Can be archived</strong></td><td><strong>
           <: if $bug.when_archiveable == 0 { :>
           today
           <: } else if $bug.when_archiveable == 1 { :>
           in 1 day
           <: } else { :>
           in <: $bug.when_archiveable :> days
-          <:- } :>;</strong></span>
+          <:- } :></strong></td></tr>
       <:- } else if $bug.archived { -:>
-      <span><strong>Archived</strong></span>
+      <tr><td><strong>Archived</strong></td></tr>
       <:- } -:>
       <:- if $bug.blockedby.count > 0 { :>
-      <span>Fix blocked by 
+      <tr><td>Fix blocked by</td><td>
           <: for $bug.blockedby -> $bug { :>
           <: bug_url_subject($bug) :>
           <:- if ! $~bug.is_last { -:>, <: } else { -:>.<:- } -:>
-          <:- } -:>
-      </span>
+          <:- } -:></td>
+      </tr>
       <:- } -:>
       <:- if $bug.blocks.count > 0 { :>
-      <span>Blocking fix for
+      <tr><td>Blocking fix for</td><td>
           <: for $bug.blocks -> $bug { :>
           <: bug_url_subject($bug) :>
           <:- if ! $~bug.is_last {-:>, <: } else { -:>.<:- } -:>
           <:- } -:>
-      </span>
+      </td></tr>
       <:- } -:>
       <:- macro days_ago->($what,$ago) {-:>
-      <span>
+      <tr>
           <:- if ($time - $ago) / 86400 > 60 { -:>
-          <strong><: $what :> <:  secs_to_english($time-$ago) :> ago.</strong>
+          <td class="ancient"><: $what :></td><td><:  secs_to_english($time-$ago) :> ago.</td>
           <:- } else if ($time - $ago) / 86400 > 30 { :>
-          <strong><: $what :> <:  secs_to_english($time-$ago) :> ago.</strong>
-          <:- } -:>;
-      </span>
+          <td class="old"><: $what :></td><td><:  secs_to_english($time-$ago) :> ago.</td>
+          <:- } -:>
+      </tr>
       <:- } -:>
       <: days_ago("Filed",$bug.created.epoch) :>
       <: days_ago("Modified",$bug.modified.epoch) :>
+            </table>
       <:- if $bug.archived {:>
       <span>Bug is archived. No further changes may be made.</span>
       <:- } -:>