]> git.donarmstrong.com Git - debbugs.git/blobdiff - templates/en_US/cgi/bugreport.tmpl
abstract out toggle_elements
[debbugs.git] / templates / en_US / cgi / bugreport.tmpl
index 070005abdd1e40517e1449e4269ff029054c993b..f814790b395095947983e53e456f114af5e4d3c8 100644 (file)
@@ -1,23 +1,38 @@
 {include(q(html/pre_title))}#{$bug_num} - {html_escape($status{subject})} - {html_escape($config{project})} {html_escape($config{bug})} report logs{include(q(html/post_title.tmpl))}
+<link rel="canonical" href="{html_escape(bug_links{bug=>$bug_num})}">
 <script type="text/javascript">
 <!--
-function toggle_infmessages()
+function toggle_elements(cls,tag)
 \{
-        allDivs=document.getElementsByTagName("div");
+     if (!cls) \{
+        var cls = "infmessage";
+     \}
+     if (!tag) \{
+        var tag = "div";
+     \}
+        allDivs=document.getElementsByTagName(tag);
         for (var i = 0 ; i < allDivs.length ; i++ )
         \{
-                if (allDivs[i].className == "infmessage")
+                if (allDivs[i].className == cls)
                 \{
                         allDivs[i].style.display=(allDivs[i].style.display == 'none' | allDivs[i].style.display == '') ? 'block' : 'none';
                 \}
         \}
 \}
+function toggle_infmessage()
+\{
+     toggle_elements("infmessage","div");
+\}
+function toggle_spamreport()
+\{
+     toggle_elements("spamreport","div");
+\}     
 -->
 </script>
 </head>
 <body>
 <h1>{html_escape($config{project})} {html_escape($config{bug})} report logs - 
-<a href="mailto:{$bug_num}@{html_escape($config{email_domain})}">#{$bug_num}</a><br/>
+<a href="mailto:{$bug_num}@{html_escape($config{email_domain})}">#{$bug_num}</a><br>
 {html_escape($status{subject})}</h1>
 <div class="versiongraph">{$version_graph}</div>
 {include(q(cgi/bugreport_pkginfo))}
@@ -43,7 +58,7 @@ function toggle_infmessages()
 }
 {$log}
 <hr>
-<p class="msgreceived">Send a report that <a href="http://{$config{cgi_domain}}/bugspam.cgi">this bug log contains spam</a>.</p>
+<p class="msgreceived">Report that <a href="javascript:toggle_spamreport()">messages in this bug log are spam</a>.</p>
 <hr>
 {include(q(html/html_tail))}
 </body>