Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame^] | 1 | [# This is used in the issue search form and issue advanced search page. We want to show the same options in both contexts.] |
| 2 | [define selected]False[end] |
| 3 | <option disabled="disabled">Search within:</option> |
| 4 | <option value="1" [is can "1"]selected=selected [define selected]True[end] [end] |
| 5 | title="All issues in the project"> All issues</option> |
| 6 | <option value="2" [is can "2"]selected=selected [define selected]True[end] [end] |
| 7 | title="All issues except ones with a closed status"> Open issues</option> |
| 8 | |
| 9 | [if-any logged_in_user] |
| 10 | [define username][logged_in_user.email][end] |
| 11 | [is arg0 "admin"][define username]logged-in-user[end][end] |
| 12 | <option value="3" [is can "3"]selected=selected [define selected]True[end] [end] |
| 13 | title="[[]Open issues] owner=[username]"> Open and owned by me</option> |
| 14 | <option value="4" [is can "4"]selected=selected [define selected]True[end] [end] |
| 15 | title="[[]Open issues] reporter=[username]"> Open and reported by me</option> |
| 16 | <option value="5" [is can "5"]selected=selected [define selected]True[end] [end] |
| 17 | title="[[]Open issues] starredby:[username]"> Open and starred by me</option> |
| 18 | <option value="8" [is can "8"]selected=selected [define selected]True[end] [end] |
| 19 | title="[[]Open issues] commentby:[username]"> Open with comment by me</option> |
| 20 | [end] |
| 21 | |
| 22 | [# TODO(jrobbins): deprecate these and tell projects to define canned queries instead.] |
| 23 | <option value="6" [is can "6"]selected=selected [define selected]True[end] [end] |
| 24 | title="[[]Open issues] status=New"> New issues</option> |
| 25 | <option value="7" [is can "7"]selected=selected [define selected]True[end] [end] |
| 26 | title="[[]All issues] status=fixed,done"> Issues to verify</option> |
| 27 | |
| 28 | [is arg0 "admin"][else] |
| 29 | [define first]Yes[end] |
| 30 | [for canned_queries] |
| 31 | [is first "Yes"] |
| 32 | [define first]No[end] |
| 33 | <option disabled="disabled">----</option> |
| 34 | [end] |
| 35 | [# TODO(jrobbins): canned query visibility conditions, e.g., members only. ] |
| 36 | <option value="[canned_queries.query_id]" |
| 37 | [is can canned_queries.query_id] |
| 38 | selected=selected |
| 39 | [define selected]True[end] |
| 40 | [end] |
| 41 | title="[canned_queries.docstring]" |
| 42 | > [canned_queries.name]</option> |
| 43 | [end] |
| 44 | [if-any perms.EditProject][if-any is_cross_project][else] |
| 45 | [is first "Yes"] |
| 46 | [define first]No[end] |
| 47 | <option disabled="disabled">----</option> |
| 48 | [end] |
| 49 | <option value="manageprojectqueries" |
| 50 | > Manage project queries...</option> |
| 51 | [end][end] |
| 52 | |
| 53 | [if-any logged_in_user] |
| 54 | [define first]Yes[end] |
| 55 | [for saved_queries] |
| 56 | [is first "Yes"] |
| 57 | [define first]No[end] |
| 58 | <option disabled="disabled">----</option> |
| 59 | [end] |
| 60 | <option value="[saved_queries.query_id]" |
| 61 | [is can saved_queries.query_id] |
| 62 | selected=selected |
| 63 | [define selected]True[end] |
| 64 | [end] |
| 65 | title="[saved_queries.docstring]" |
| 66 | > [saved_queries.name]</option> |
| 67 | [end] |
| 68 | [is first "Yes"] |
| 69 | [define first]No[end] |
| 70 | <option disabled="disabled">----</option> |
| 71 | [end] |
| 72 | <option value="managemyqueries" |
| 73 | > Manage my saved queries...</option> |
| 74 | [end][# end if logged in] |
| 75 | |
| 76 | [end][# end not "admin"] |
| 77 | |
| 78 | [is selected "False"] |
| 79 | <option value="[can]" selected=selected |
| 80 | title="Custom Query" |
| 81 | > Custom Query</option> |
| 82 | [end] |