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

Unified Diff: appengine/monorail/templates/tracker/issue-can-widget.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
Index: appengine/monorail/templates/tracker/issue-can-widget.ezt
diff --git a/appengine/monorail/templates/tracker/issue-can-widget.ezt b/appengine/monorail/templates/tracker/issue-can-widget.ezt
new file mode 100644
index 0000000000000000000000000000000000000000..abd8c663b508a123fc573fe0249a93c880c86500
--- /dev/null
+++ b/appengine/monorail/templates/tracker/issue-can-widget.ezt
@@ -0,0 +1,70 @@
+[# This is used in the issue search form and issue advanced search page. We want to show the same options in both contexts.]
+
+<option disabled="disabled">Search within:</option>
+<option value="1" [is can "1"]selected=selected[end]
+ title="All issues in the project">&nbsp;All issues</option>
+<option value="2" [is can "2"]selected=selected[end]
+ title="All issues except ones with a closed status">&nbsp;Open issues</option>
+
+[if-any logged_in_user]
+ [define username][logged_in_user.email][end]
+ [is arg0 "admin"][define username]logged-in-user[end][end]
+ <option value="3" [is can "3"]selected=selected[end]
+ title="[[]Open issues] owner=[username]">&nbsp;Open and owned by me</option>
+ <option value="4" [is can "4"]selected=selected[end]
+ title="[[]Open issues] reporter=[username]">&nbsp;Open and reported by me</option>
+ <option value="5" [is can "5"]selected=selected[end]
+ title="[[]Open issues] starredby:[username]">&nbsp;Open and starred by me</option>
+ <option value="8" [is can "8"]selected=selected[end]
+ title="[[]Open issues] commentby:[username]">&nbsp;Open with comment by me</option>
+[end]
+
+[# TODO(jrobbins): deprecate these and tell projects to define canned queries instead.]
+<option value="6" [is can "6"]selected=selected[end]
+ title="[[]Open issues] status=New">&nbsp;New issues</option>
+<option value="7" [is can "7"]selected=selected[end]
+ title="[[]All issues] status=fixed,done">&nbsp;Issues to verify</option>
+
+[is arg0 "admin"][else]
+ [define first]Yes[end]
+ [for canned_queries]
+ [is first "Yes"]
+ [define first]No[end]
+ <option disabled="disabled">----</option>
+ [end]
+ [# TODO(jrobbins): canned query visibility conditions, e.g., members only. ]
+ <option value="[canned_queries.query_id]"
+ [is can canned_queries.query_id]selected=selected[end]
+ title="[canned_queries.docstring]"
+ >&nbsp;[canned_queries.name]</option>
+ [end]
+ [if-any perms.EditProject][if-any is_cross_project][else]
+ [is first "Yes"]
+ [define first]No[end]
+ <option disabled="disabled">----</option>
+ [end]
+ <option value="manageprojectqueries"
+ >&nbsp;Manage project queries...</option>
+ [end][end]
+
+ [if-any logged_in_user]
+ [define first]Yes[end]
+ [for saved_queries]
+ [is first "Yes"]
+ [define first]No[end]
+ <option disabled="disabled">----</option>
+ [end]
+ <option value="[saved_queries.query_id]"
+ [is can saved_queries.query_id]selected=selected[end]
+ title="[saved_queries.docstring]"
+ >&nbsp;[saved_queries.name]</option>
+ [end]
+ [is first "Yes"]
+ [define first]No[end]
+ <option disabled="disabled">----</option>
+ [end]
+ <option value="managemyqueries"
+ >&nbsp;Manage my saved queries...</option>
+ [end][# end if logged in]
+
+[end][# end not "admin"]

Powered by Google App Engine
This is Rietveld 408576698