OLD | NEW |
(Empty) | |
| 1 <div class="[issue_tab_mode]"> |
| 2 <div class="isf"> |
| 3 [define offer_new_issue]Yes[end] |
| 4 [if-any read_only][define offer_new_issue]No[end][end] |
| 5 [if-any logged_in_user][# Note: rather than hide the New Issue link when the us
er is not logged in, we let them try. ] |
| 6 [if-any page_perms.CreateIssue][else][define offer_new_issue]No[end][end] |
| 7 [end] |
| 8 [is offer_new_issue "Yes"] |
| 9 <span class="inIssueEntry" style="margin-right:.4em"> |
| 10 <a class="buttonify" href="[issue_entry_url]">New issue</a> |
| 11 </span> |
| 12 [end] |
| 13 |
| 14 <span class="inIssueList" style="margin:0 .4em"> |
| 15 <label for="can">Search</label> |
| 16 <form action="list" method="GET" style="display:inline"> |
| 17 <select id="can" name="can"> |
| 18 [include "issue-can-widget.ezt" "search"] |
| 19 </select> |
| 20 <label for="searchq">for</label> |
| 21 <span id="qq"><input type="text" size="[q_field_size]" id="searchq" name=
"q" |
| 22 value="[query]" autocomplete="off"></span> |
| 23 [if-any sortspec]<input type="hidden" id="sort" name="sort" value="[sorts
pec]">[end] |
| 24 [if-any groupby]<input type="hidden" id="groupby" name="groupby" value="[
groupby]">[end] |
| 25 [if-any colspec]<span id="search_colspec"><input type="hidden" name="cols
pec" value="[colspec]"></span>[end] |
| 26 [if-any grid_x_attr]<input type="hidden" name="x" value="[grid_x_attr]">[
end] |
| 27 [if-any grid_y_attr]<input type="hidden" name="y" value="[grid_y_attr]">[
end] |
| 28 [if-any grid_mode]<input type="hidden" name="mode" value="[if-any grid_mo
de]grid[end]">[end] |
| 29 [if-any grid_cell_mode]<input type="hidden" name="cells" value="[grid_cel
l_mode]">[end] |
| 30 <input type="submit" value="Search"> |
| 31 </form> |
| 32 </span> |
| 33 |
| 34 <span class="inIssueAdvSearch" style="margin:0 .4em"> |
| 35 <a href="advsearch">Advanced search</a> |
| 36 </span> |
| 37 |
| 38 <span class="inIssueSearchTips" style="margin:0 .4em"> |
| 39 <a href="searchtips">Search tips</a> |
| 40 </span> |
| 41 |
| 42 [if-any logged_in_user] |
| 43 <span class="inSavedQueries" style="margin:0 .4em"> |
| 44 <a href="[logged_in_user.profile_url]queries">Saved queries</a> |
| 45 </span> |
| 46 [end] |
| 47 |
| 48 </div> |
| 49 </div> |
| 50 |
| 51 |
| 52 [if-any warnings] |
| 53 <table align="center" border="0" cellspacing="0" cellpadding="0" style="margin
-bottom: 6px"> |
| 54 [for warnings] |
| 55 <tr><td class="notice"> |
| 56 [warnings] |
| 57 </td></tr> |
| 58 [end] |
| 59 </table> |
| 60 [end] |
| 61 [if-any errors.query] |
| 62 <table align="center" border="0" cellspacing="0" cellpadding="0" style="margin
-bottom: 6px"> |
| 63 <tr><td class="notice"> |
| 64 [errors.query] |
| 65 </td></tr> |
| 66 </table> |
| 67 [end] |
| 68 |
| 69 |
| 70 <script type="text/javascript" nonce="[nonce]"> |
| 71 runOnLoad(function() { |
| 72 [# Keep track of the old scope and set it back to the old value if the |
| 73 user selects one of the "manage" options. That ensures that if |
| 74 the user returns to the page via the browser Back button, he/she |
| 75 will not see the "manage" item as the current scope value.] |
| 76 var oldScope = "2"; |
| 77 function scopeChange() { |
| 78 [if-any logged_in_user] |
| 79 var scopeWidget = document.getElementById('can'); |
| 80 if (scopeWidget.value == 'manageprojectqueries') { |
| 81 scopeWidget.value = oldScope; |
| 82 _go('../adminViews'); |
| 83 } |
| 84 else if (scopeWidget.value == 'managemyqueries') { |
| 85 scopeWidget.value = oldScope; |
| 86 _go('[format "js"][logged_in_user.profile_url][end]queries'); |
| 87 } |
| 88 else { |
| 89 oldScope = scopeWidget.value; |
| 90 } |
| 91 [end] |
| 92 } |
| 93 |
| 94 if ($("can")) |
| 95 $("can").addEventListener("change", scopeChange); |
| 96 }); |
| 97 </script> |
OLD | NEW |