| <div class="[issue_tab_mode]"> |
| <div class="isf"> |
| [define offer_new_issue]Yes[end] |
| [if-any read_only][define offer_new_issue]No[end][end] |
| [if-any logged_in_user][# Note: rather than hide the New Issue link when the user is not logged in, we let them try. ] |
| [if-any page_perms.CreateIssue][else][define offer_new_issue]No[end][end] |
| [end] |
| [is offer_new_issue "Yes"] |
| <span class="inIssueEntry" style="margin-right:.4em"> |
| <a class="buttonify" href="[issue_entry_url]">New issue</a> |
| </span> |
| [end] |
| |
| <span class="inIssueList" style="margin:0 .4em"> |
| <label for="can">Search</label> |
| <form action="list" method="GET" style="display:inline"> |
| <select id="can" name="can"> |
| [include "issue-can-widget.ezt" "search"] |
| </select> |
| <label for="searchq">for</label> |
| <span id="qq"><input type="text" size="[q_field_size]" id="searchq" name="q" |
| value="[query]" autocomplete="off"></span> |
| [if-any sortspec]<input type="hidden" id="sort" name="sort" value="[sortspec]">[end] |
| [if-any groupby]<input type="hidden" id="groupby" name="groupby" value="[groupby]">[end] |
| [if-any colspec]<span id="search_colspec"><input type="hidden" name="colspec" value="[colspec]"></span>[end] |
| [if-any grid_x_attr]<input type="hidden" name="x" value="[grid_x_attr]">[end] |
| [if-any grid_y_attr]<input type="hidden" name="y" value="[grid_y_attr]">[end] |
| [if-any grid_mode]<input type="hidden" name="mode" value="[if-any grid_mode]grid[end]">[end] |
| [if-any grid_cell_mode]<input type="hidden" name="cells" value="[grid_cell_mode]">[end] |
| <input type="submit" value="Search"> |
| </form> |
| </span> |
| |
| <span class="inIssueAdvSearch" style="margin:0 .4em"> |
| <a href="advsearch">Advanced search</a> |
| </span> |
| |
| <span class="inIssueSearchTips" style="margin:0 .4em"> |
| <a href="searchtips">Search tips</a> |
| </span> |
| |
| [if-any logged_in_user] |
| <span class="inSavedQueries" style="margin:0 .4em"> |
| <a href="[logged_in_user.profile_url]queries">Saved queries</a> |
| </span> |
| [end] |
| |
| </div> |
| </div> |
| |
| |
| [if-any warnings] |
| <table align="center" border="0" cellspacing="0" cellpadding="0" style="margin-bottom: 6px"> |
| [for warnings] |
| <tr><td class="notice"> |
| [warnings] |
| </td></tr> |
| [end] |
| </table> |
| [end] |
| [if-any errors.query] |
| <table align="center" border="0" cellspacing="0" cellpadding="0" style="margin-bottom: 6px"> |
| <tr><td class="notice"> |
| [errors.query] |
| </td></tr> |
| </table> |
| [end] |
| |
| |
| <script type="text/javascript" nonce="[nonce]"> |
| runOnLoad(function() { |
| [# Keep track of the old scope and set it back to the old value if the |
| user selects one of the "manage" options. That ensures that if |
| the user returns to the page via the browser Back button, he/she |
| will not see the "manage" item as the current scope value.] |
| var oldScope = "2"; |
| function scopeChange() { |
| [if-any logged_in_user] |
| var scopeWidget = document.getElementById('can'); |
| if (scopeWidget.value == 'manageprojectqueries') { |
| scopeWidget.value = oldScope; |
| _go('../adminViews'); |
| } |
| else if (scopeWidget.value == 'managemyqueries') { |
| scopeWidget.value = oldScope; |
| _go('[format "js"][logged_in_user.profile_url][end]queries'); |
| } |
| else { |
| oldScope = scopeWidget.value; |
| } |
| [end] |
| } |
| |
| if ($("can")) |
| $("can").addEventListener("change", scopeChange); |
| }); |
| </script> |