Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3177)

Unified Diff: appengine/monorail/templates/tracker/spam-moderation-queue.ezt

Issue 1868553004: Open Source Monorail (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/monorail/templates/tracker/render-rich-text.ezt ('k') | appengine/monorail/testing/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/monorail/templates/tracker/spam-moderation-queue.ezt
diff --git a/appengine/monorail/templates/tracker/spam-moderation-queue.ezt b/appengine/monorail/templates/tracker/spam-moderation-queue.ezt
new file mode 100644
index 0000000000000000000000000000000000000000..86aac23904a236b6f04a5476e9b1e6dbb74f97b4
--- /dev/null
+++ b/appengine/monorail/templates/tracker/spam-moderation-queue.ezt
@@ -0,0 +1,106 @@
+[define title]Spam Moderation Queue[end]
+[define category_css]css/ph_list.css[end]
+[define page_css]css/ph_detail.css[end][# needed for infopeek]
+
+[if-any projectname]
+ [include "../framework/master-header.ezt" "showtabs"]
+[else]
+ [include "../framework/master-header.ezt" "hidetabs"]
+[end]
+[include "../framework/js-placeholders.ezt" "showtabs"]
+
+<h2>Spam Moderation Queue</h2>
+[include "../framework/artifact-list-pagination-part.ezt"]
+
+<form method="POST" action="spamqueue.do">
+<button type="submit" vaue="mark_spam" disabled="true">Mark as Spam</button>
+<button type="submit" value="mark_ham" disabled="true">Mark as Ham</button>
+
+<span style="margin:0 .7em">Select:
+ <a id="selectall" href="#">All</a>
+ <a id="selectnone" href="#">None</a>
+</span>
+
+<table id='resultstable'>
+<tr>
+ <td>
+ </td>
+ <td>ID</td>
+ <td>Author</td>
+ <td>Summary</td>
+ <td>Snippet</td>
+ <td>Opened at</td>
+ <td>Spam?</td>
+ <td>Verdict reason</td>
+ <td>Confidence</td>
+ <td>Verdict at</td>
+ <td>Flag count</td>
+</tr>
+[for spam_queue]
+<tr>
+ <td><input type='checkbox' name='issue_local_id' value='[spam_queue.issue.local_id]'/></td>
+ <td><a href='/p/[projectname]/issues/detail?id=[spam_queue.issue.local_id]'>[spam_queue.issue.local_id]</a></td>
+ <td><a href='/u/[spam_queue.reporter.email]'>[spam_queue.reporter.email]</a></td>
+ <td><a href='/p/[projectname]/issues/detail?id=[spam_queue.issue.local_id]'>[spam_queue.summary]</a></td>
+ <td>
+ [spam_queue.comment_text]
+ </td>
+ <td>[spam_queue.issue.opened_timestamp]</td>
+ <td>[spam_queue.issue.is_spam]</td>
+
+ <td>[spam_queue.reason]</td>
+ <td>[spam_queue.classifier_confidence]</td>
+ <td>[spam_queue.verdict_time]</td>
+ <td>[spam_queue.flag_count]</td>
+</tr>
+[end]
+</table>
+
+[include "../framework/artifact-list-pagination-part.ezt"]
+<input type="hidden" name="token" value="[moderate_spam_token]">
+<button type="submit" vaue="mark_spam" disabled="true">Mark as Spam</button>
+<button type="submit" value="mark_ham" disabled="true">Mark as Ham</button>
+
+</form>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+ if ($("selectall")) {
+ $("selectall").addEventListener("click", function() {
+ _selectAllIssues();
+ setDisabled(false);
+ });
+ }
+ if ($("selectnone")) {
+ $("selectnone").addEventListener("click", function() {
+ _selectNoneIssues();
+ setDisabled(true);
+ });
+ }
+ var checkboxNodes = document.querySelectorAll("input[type=checkbox]");
+ var checkboxes = Array();
+ for (var i = 0; i < checkboxNodes.length; ++i) {
+ var checkbox = checkboxNodes.item(i);
+ checkboxes.push(checkbox);
+ checkbox.addEventListener("change", updateEnabled);
+ }
+
+ function updateEnabled() {
+ var anySelected = checkboxes.some(function(checkbox) {
+ return checkbox.checked;
+ });
+ setDisabled(!anySelected);
+ }
+
+ function setDisabled(disabled) {
+ var buttons = document.querySelectorAll("button[type=submit]");
+ for (var i = 0; i < buttons.length; ++i) {
+ buttons.item(i).disabled = disabled;
+ }
+ }
+});
+</script>
+
+[include "../framework/footer-script.ezt"]
+
+[include "../framework/master-footer.ezt"]
« no previous file with comments | « appengine/monorail/templates/tracker/render-rich-text.ezt ('k') | appengine/monorail/testing/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698