| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 [define title]Spam Moderation Queue[end] | 
|  | 2 [define category_css]css/ph_list.css[end] | 
|  | 3 [define page_css]css/ph_detail.css[end][# needed for infopeek] | 
|  | 4 | 
|  | 5 [if-any projectname] | 
|  | 6   [include "../framework/master-header.ezt" "showtabs"] | 
|  | 7 [else] | 
|  | 8   [include "../framework/master-header.ezt" "hidetabs"] | 
|  | 9 [end] | 
|  | 10 [include "../framework/js-placeholders.ezt" "showtabs"] | 
|  | 11 | 
|  | 12 <h2>Spam Moderation Queue</h2> | 
|  | 13 [include "../framework/artifact-list-pagination-part.ezt"] | 
|  | 14 | 
|  | 15 <form method="POST" action="spamqueue.do"> | 
|  | 16 <button type="submit" vaue="mark_spam" disabled="true">Mark as Spam</button> | 
|  | 17 <button type="submit" value="mark_ham" disabled="true">Mark as Ham</button> | 
|  | 18 | 
|  | 19 <span style="margin:0 .7em">Select: | 
|  | 20   <a id="selectall" href="#">All</a> | 
|  | 21   <a id="selectnone" href="#">None</a> | 
|  | 22 </span> | 
|  | 23 | 
|  | 24 <table id='resultstable'> | 
|  | 25 <tr> | 
|  | 26   <td> | 
|  | 27   </td> | 
|  | 28   <td>ID</td> | 
|  | 29   <td>Author</td> | 
|  | 30   <td>Summary</td> | 
|  | 31   <td>Snippet</td> | 
|  | 32   <td>Opened at</td> | 
|  | 33   <td>Spam?</td> | 
|  | 34   <td>Verdict reason</td> | 
|  | 35   <td>Confidence</td> | 
|  | 36   <td>Verdict at</td> | 
|  | 37   <td>Flag count</td> | 
|  | 38 </tr> | 
|  | 39 [for spam_queue] | 
|  | 40 <tr> | 
|  | 41   <td><input type='checkbox' name='issue_local_id' value='[spam_queue.issue.loca
     l_id]'/></td> | 
|  | 42   <td><a href='/p/[projectname]/issues/detail?id=[spam_queue.issue.local_id]'>[s
     pam_queue.issue.local_id]</a></td> | 
|  | 43   <td><a href='/u/[spam_queue.reporter.email]'>[spam_queue.reporter.email]</a></
     td> | 
|  | 44   <td><a href='/p/[projectname]/issues/detail?id=[spam_queue.issue.local_id]'>[s
     pam_queue.summary]</a></td> | 
|  | 45   <td> | 
|  | 46   [spam_queue.comment_text] | 
|  | 47   </td> | 
|  | 48   <td>[spam_queue.issue.opened_timestamp]</td> | 
|  | 49   <td>[spam_queue.issue.is_spam]</td> | 
|  | 50 | 
|  | 51   <td>[spam_queue.reason]</td> | 
|  | 52   <td>[spam_queue.classifier_confidence]</td> | 
|  | 53   <td>[spam_queue.verdict_time]</td> | 
|  | 54   <td>[spam_queue.flag_count]</td> | 
|  | 55 </tr> | 
|  | 56 [end] | 
|  | 57 </table> | 
|  | 58 | 
|  | 59 [include "../framework/artifact-list-pagination-part.ezt"] | 
|  | 60 <input type="hidden" name="token" value="[moderate_spam_token]"> | 
|  | 61 <button type="submit" vaue="mark_spam" disabled="true">Mark as Spam</button> | 
|  | 62 <button type="submit" value="mark_ham" disabled="true">Mark as Ham</button> | 
|  | 63 | 
|  | 64 </form> | 
|  | 65 | 
|  | 66 <script type="text/javascript" nonce="[nonce]"> | 
|  | 67 runOnLoad(function() { | 
|  | 68   if ($("selectall")) { | 
|  | 69     $("selectall").addEventListener("click", function() { | 
|  | 70         _selectAllIssues(); | 
|  | 71         setDisabled(false); | 
|  | 72     }); | 
|  | 73   } | 
|  | 74   if ($("selectnone")) { | 
|  | 75     $("selectnone").addEventListener("click", function() { | 
|  | 76         _selectNoneIssues(); | 
|  | 77         setDisabled(true); | 
|  | 78     }); | 
|  | 79   } | 
|  | 80   var checkboxNodes = document.querySelectorAll("input[type=checkbox]"); | 
|  | 81   var checkboxes = Array(); | 
|  | 82   for (var i = 0; i < checkboxNodes.length; ++i) { | 
|  | 83     var checkbox = checkboxNodes.item(i); | 
|  | 84     checkboxes.push(checkbox); | 
|  | 85     checkbox.addEventListener("change", updateEnabled); | 
|  | 86   } | 
|  | 87 | 
|  | 88   function updateEnabled() { | 
|  | 89     var anySelected = checkboxes.some(function(checkbox) { | 
|  | 90       return checkbox.checked; | 
|  | 91     }); | 
|  | 92     setDisabled(!anySelected); | 
|  | 93    } | 
|  | 94 | 
|  | 95   function setDisabled(disabled) { | 
|  | 96     var buttons = document.querySelectorAll("button[type=submit]"); | 
|  | 97     for (var i = 0; i < buttons.length; ++i) { | 
|  | 98       buttons.item(i).disabled = disabled; | 
|  | 99     } | 
|  | 100   } | 
|  | 101 }); | 
|  | 102 </script> | 
|  | 103 | 
|  | 104 [include "../framework/footer-script.ezt"] | 
|  | 105 | 
|  | 106 [include "../framework/master-footer.ezt"] | 
| OLD | NEW | 
|---|