diff options
Diffstat (limited to 'template/en/custom/list/list.html.tmpl')
-rw-r--r-- | template/en/custom/list/list.html.tmpl | 379 |
1 files changed, 379 insertions, 0 deletions
diff --git a/template/en/custom/list/list.html.tmpl b/template/en/custom/list/list.html.tmpl new file mode 100644 index 000000000..df544b7ea --- /dev/null +++ b/template/en/custom/list/list.html.tmpl @@ -0,0 +1,379 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# INTERFACE: + # searchtype: string. Type of search - either "series", "saved" or undef. + # ... + # defaultsavename: string. The default name for saving the query. + #%] + +[%############################################################################%] +[%# Template Initialization #%] +[%############################################################################%] + +[% PROCESS "global/field-descs.none.tmpl" %] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% unfiltered_title = "$terms.Bug List" %] +[% IF searchname || defaultsavename %] + [% unfiltered_title = unfiltered_title _ ": " _ (searchname OR defaultsavename) %] +[% END %] +[% title = unfiltered_title FILTER html %] + +[% qorder = order FILTER uri IF order %] + +[% javascript = BLOCK %] + [% IF quicksearch %] + [% new_param = BLOCK ~%] + quicksearch=[% quicksearch FILTER uri %] + [%~ IF cgi.param('list_id') ~%] + &list_id=[% cgi.param('list_id') FILTER uri %] + [%~ END %] + [% END %] + [% ELSIF cgi.param('token') != '' %] + [% new_param = cgi.canonicalise_query('token', 'cmdtype', 'remtype') %] + [% ELSE %] + [% new_param = cgi.canonicalise_query %] + [% END %] + + [% IF new_param.length + 12 < constants.CGI_URI_LIMIT %] + if (history && history.replaceState) { + history.replaceState(null, "[% unfiltered_title FILTER js %]", + "buglist.cgi?[% new_param FILTER js %]"); + document.title = "[% unfiltered_title FILTER js %]"; + } + [% END %] + [% javascript FILTER none %] +[% END %] + +[%############################################################################%] +[%# Page Header #%] +[%############################################################################%] + +[% PROCESS global/header.html.tmpl + title = title + generate_api_token = dotweak + atomlink = "buglist.cgi?$urlquerypart&title=$title&ctype=atom" + yui = [ 'autocomplete', 'calendar' ] + javascript_urls = [ "js/util.js", "js/field.js", "js/TUI.js" ] + style_urls = [ "skins/standard/buglist.css" ] + doc_section = "using/finding.html" +%] + + +<div class="bz_query_head"> + + + <span class="bz_query_timestamp" style="color:#505050"> + [% currenttime FILTER time('%a %b %e %Y %T %Z') FILTER html %]<br> + </span> + <br/> + + [% IF debug %] + <div class="bz_query_debug"> + <p>Total execution time: [% query_time FILTER html %] seconds</p> + [% FOREACH query = queries %] + <pre>[% query.sql FILTER html %]</pre> + <p>Execution time: [% query.time FILTER html %] seconds</p> + [% IF query.explain %] + <pre>[% query.explain FILTER html %]</pre> + [% END %] + [% END %] + </div> + [% END %] + +</div> + +[% IF toolong %] + <h2 class="bz_smallminded"> + This list is too long for Bugzilla's little mind; the + Next/Prev/First/Last buttons won't appear on individual [% terms.bugs %]. + </h2> +[% END %] + +[% SET shown_types = [ + 'notequals', 'regexp', 'notregexp', 'lessthan', 'lessthaneq', + 'greaterthan', 'greaterthaneq', 'changedbefore', 'changedafter', + 'changedfrom', 'changedto', 'changedby', 'notsubstring', 'nowords', + 'nowordssubstr', 'notmatches', 'isempty', 'isnotempty' +] %] + + +[%############################################################################%] +[%# Preceding Status Line #%] +[%############################################################################%] + +[% IF bugs.size > 9 %] + [% PROCESS num_results %] +[% END %] + +[%############################################################################%] +[%# Start of Change Form #%] +[%############################################################################%] + +<div class="" style="color:#505050"> + <ul class="search_description"> + <li>[% PROCESS num_results %]</li> + [% FOREACH desc_item = search_description %] + <li> + <strong>[% field_descs.${desc_item.field} FILTER html %]:</strong> + [% IF shown_types.contains(desc_item.type) || debug %] + ([% search_descs.${desc_item.type} FILTER html %]) + [% END %] + [% FOREACH val IN desc_item.value.split(',') %] + [%+ display_value(desc_item.field, val) FILTER html %][% ',' UNLESS loop.last %] + [% END %] + [% IF debug %] + (<code>[% desc_item.term FILTER html %]</code>) + [% END %] + </li> + [% END %] + </ul> +</div> + +<hr style="margin-top:10px;" /> + + + + +[% IF dotweak %] + <form name="changeform" method="post" action="process_bug.cgi"> +[% END %] + +[%############################################################################%] +[%# Bug Table #%] +[%############################################################################%] + +[% PROCESS list/table.html.tmpl %] + +[%############################################################################%] +[%# Succeeding Status Line #%] +[%############################################################################%] + + +[% IF bugs.size == 0 %] + <ul class="zero_result_links"> + <li>[% PROCESS enter_bug_link %]</li> + [% IF one_product.defined %] + <li><a href="enter_bug.cgi">File a new [% terms.bug %] in a + different product</a></li> + [% END %] + <li><a href="[% PROCESS edit_search_url %]">Edit this search</a></li> + <li><a href="query.cgi">Start a new search</a></li> + </ul> +[% END %] + +[%############################################################################%] +[%# Rest of Change Form #%] +[%############################################################################%] + +[% IF dotweak %] + [% PROCESS "list/edit-multiple.html.tmpl" %] + </form> + <hr> +[% END %] + +<br> + + <div> + +[%############################################################################%] +[%# Navigation Bar #%] +[%############################################################################%] + + <div style="display: flex;flex-wrap: wrap;margin-top:10px;"> + <div style="margin: 5px;"> + <div class="btn-group" role="group"> + <div class=""> + <button class="btn btn-primary" type="button" id="edit_search" + onclick="document.location='[% PROCESS edit_search_url FILTER js %]'"> + Edit Search</button> + </div> + </div> + </div> + + [% IF bugs.size > 0 %] + <div style="margin: 5px;"> + <form method="post" action="show_bug.cgi"> + [% buglist_joined = buglist.join(",") %] + <input type="hidden" name="id" value="[% buglist_joined FILTER html %]"> + <input type="hidden" name="format" value="multiple"> + <input class="btn btn-default" type="submit" id="long_format" value="Long Format"> + </form> + </div> + + <div style="margin: 5px;"> + [% IF user.is_timetracker %] + <form method="post" action="summarize_time.cgi"> + <input type="hidden" name="id" value="[% buglist_joined FILTER html %]" /> + <input class="btn btn-default" type="submit" id="timesummary" value="Time Summary" /> + </form> + [% IF time_summary_limited %] + <span class="bz_info"> + Time Summary will only include the [% terms.bugs %] shown above. + In order to see a time summary for all [% terms.bugs %] found + by the search, you can + <a href="buglist.cgi?[% urlquerypart FILTER html %] + [%- "&order=$qorder" FILTER html IF order %]&limit=0"> + show all search results</a>. + </span> + [% END %] + [% END %] + </div> + + <div style="margin: 5px;"> + <form method="post" action="show_bug.cgi"> + <input type="hidden" name="ctype" value="xml"> + [% FOREACH id = buglist %] + <input type="hidden" name="id" value="[% id FILTER html %]"> + [% END %] + <input type="hidden" name="excludefield" value="attachmentdata"> + <div class="btn-group" role="group"> + <button type="submit" id="xml" class="btn btn-default"> + XML + </button> + <a href="buglist.cgi?[% urlquerypart FILTER html %]&ctype=csv&human=1" class="btn btn-default"> + CSV + </a> + <a href="buglist.cgi?[% urlquerypart FILTER html %]&title= + [%- title FILTER uri %]&ctype=atom" class="btn btn-default"> + <i class="fa fa-rss" aria-hidden="true"></i> + </a> + <a href="buglist.cgi?[% urlquerypart FILTER html %]&ctype=ics" class="btn btn-default"> + <i class="fa fa-calendar" aria-hidden="true"></i> + </a> + </div> + </form> + </div> + + + <div style="margin: 5px;"> + <button class="btn btn-default" type="button" id="change_columns" + onclick="document.location='colchange.cgi?[% urlquerypart FILTER html %]&query_based_on= + [%~ defaultsavename OR searchname FILTER uri FILTER js %]'"> + Change Columns</button> + </div> + + [% IF bugs.size > 1 && caneditbugs && !dotweak %] + <div style="margin: 5px;"> + <button class="btn btn-default" type="button" id="mass_change" + onclick="document.location='buglist.cgi?[% urlquerypart FILTER html %] + [%- "&order=$qorder" FILTER html IF order %]&tweak=1'"> + Change Several [% terms.Bugs %] at Once</button> + </div> + [% END %] + + [% IF bugowners && user.id %] + <div style="margin: 5px;"> + <button class="btn btn-default" type="button" id="email_assignees" + onclick="document.location='mailto:[% bugowners FILTER html %]'"> + Send Mail to [% terms.Bug %] Assignees</button> + </div> + [% END %] + + [%# Links to more things users can do with this bug list. %] + [% Hook.process("links") %] + + + [% END %] + <div style="margin: 5px;"> + [% IF searchtype == "saved" %] + <div class="bz_query_forget"> + <button class="btn btn-default" type="button" id="forget_search" + onclick="document.location='buglist.cgi?cmdtype=dorem&remaction=forget&namedcmd= + [%- searchname FILTER uri FILTER js %]&token= + [%- issue_hash_token([search_id, searchname]) FILTER uri %]'"> + Forget Search '[% searchname FILTER html %]'</button> + </div> + [% ELSE %] + <div class="bz_query_remember"> + <form method="get" action="buglist.cgi"> + <input type="hidden" name="newquery" + value="[% urlquerypart FILTER html %][% "&order=$qorder" FILTER html IF order %]"> + <input type="hidden" name="cmdtype" value="doit"> + <input type="hidden" name="remtype" value="asnamed"> + <input type="hidden" name="token" value="[% issue_hash_token(['savedsearch']) FILTER html %]"> + + <div class="input-group"> + + <span class="input-group-btn"> + <button class="btn btn-default" type="submit" id="remember" value="Remember search">Remember search</button> + </span> + <span class="input-group-addon" id="basic-addon1">as</span> + <input type="text" class="form-control" id="save_newqueryname" name="newqueryname" size="20" style="margin-left:-1px;" + title="New query name" value="[% defaultsavename FILTER html %]" aria-describedby="basic-addon1"> + </div> + + </form> + </div> + [% END %] + </div> + + </div> + </div> + +[% IF one_product.defined && bugs.size %] + <p class="bz_query_single_product" style="margin: 5px;"> + [% PROCESS enter_bug_link %] + </p> +[% END %] + +[%############################################################################%] +[%# Page Footer #%] +[%############################################################################%] + +[% PROCESS global/footer.html.tmpl %] + +[%##########%] +[%# Blocks #%] +[%##########%] + +[% BLOCK edit_search_url %] + [% editqueryname = searchname OR defaultsavename OR '' %] + query.cgi?[% urlquerypart FILTER html %] + [%- IF editqueryname != '' %]&known_name= + [%- editqueryname FILTER uri %] + [% END %] +[% END %] + +[% BLOCK enter_bug_link %] + <a href="enter_bug.cgi + [%- IF one_product.defined %]?product= + [%- one_product.name FILTER uri %] + [%- IF one_component.defined %]&component= + [%- one_component FILTER uri %][% END %][% END %]">File + a new [% terms.bug %] + [% IF one_product.defined %] + in the + [% IF one_component.defined %] + "[% one_component FILTER html %]" component of the + [% END %] + "[% one_product.name FILTER html %]" product + [% END %]</a> +[% END %] + +[% BLOCK num_results %] + <small class="bz_result_count"> + [% IF bugs.size == 0 %] + <span class="zero_results">[% terms.zeroSearchResults %].</span> + [% ELSIF default_limited AND bugs.size >= Param('default_search_limit') %] + This result was limited to [% Param('default_search_limit') FILTER html %] + [%+ terms.bugs %]. + <a href="buglist.cgi?[% urlquerypart FILTER html %] + [%- "&order=$qorder" FILTER html IF order %]&limit=0">See + all search results for this query</a>. + [% time_summary_limited = 1 %] + [% ELSIF bugs.size == 1 %] + <b><span style="text-transform: capitalize;">[% terms.bug %] found:</span></b> One + [% ELSE %] + <b><span style="text-transform: capitalize;">[%+ terms.bugs %]</span> found:</b> [% bugs.size %] + [% END %] + </small> +[% END %] |