list.html.tmpl 10.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
[%# The contents of this file are subject to the Mozilla Public
  # License Version 1.1 (the "License"); you may not use this file
  # except in compliance with the License. You may obtain a copy of
  # the License at http://www.mozilla.org/MPL/
  #
  # Software distributed under the License is distributed on an "AS
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  # implied. See the License for the specific language governing
  # rights and limitations under the License.
  #
  # The Original Code is the Bugzilla Bug Tracking System.
  #
  # The Initial Developer of the Original Code is Netscape Communications
  # Corporation. Portions created by Netscape are
  # Copyright (C) 1998 Netscape Communications Corporation. All
  # Rights Reserved.
  #
  # Contributor(s): Myk Melez <myk@mozilla.org>
  #%]

21 22 23
[%# INTERFACE:
  # searchtype: string. Type of search - either "series", "saved" or undef.
  # ...
24
  # defaultsavename: string. The default name for saving the query.
25 26
  #%]

27 28 29 30
[%############################################################################%]
[%# Template Initialization                                                  #%]
[%############################################################################%]

31
[% PROCESS "global/field-descs.none.tmpl" %]
32

33
[% title = "$terms.Bug List" %]
34 35
[% IF searchname || defaultsavename %]
  [% title = title _ ": " _ (searchname OR defaultsavename) FILTER html %]
36 37
[% END %]

38
[% qorder = order FILTER url_quote IF order %]
39 40 41 42 43 44


[%############################################################################%]
[%# Page Header                                                              #%]
[%############################################################################%]

45
[% PROCESS global/header.html.tmpl
46 47
  title = title
  style = style
48
  atomlink = "buglist.cgi?$urlquerypart&title=$title&ctype=atom" 
49 50 51 52
  javascript_urls = [ "js/yui/bz_autocomplete_bundle.js", "js/util.js", 
                      "js/field.js", "js/yui/calendar.js" ]
  style_urls = [ "skins/standard/yui/autocomplete.css", 
                  "skins/standard/buglist.css", "skins/standard/yui/calendar.css" ]
53
  doc_section = "query.html#list"
54 55
%]

56 57
<div class="bz_query_head" align="center">
  <span class="bz_query_timestamp">
58
    <b>[% currenttime FILTER time('%a %b %e %Y %T %Z') FILTER html %]</b><br>
59
  </span>
60 61

  [% IF debug %]
62
    <p class="bz_query">[% query FILTER html %]</p>
63 64 65
    [% IF query_explain.defined %]
      <pre class="bz_query_explain">[% query_explain FILTER html %]</pre>
    [% END %]
66 67
  [% END %]

68
  [% IF user.settings.display_quips.value == 'on' %]
69
    [% DEFAULT quip = "$terms.Bugzilla would like to put a random quip here, but no one has entered any." %]
70 71 72
    <span class="bz_quip">
      <a href="quips.cgi"><i>[% quip FILTER html %]</i></a>
    </span>
73 74 75 76 77
  [% END %]

</div>

[% IF toolong %]
78
  <h2 class="bz_smallminded">
79 80
    This list is too long for [% terms.Bugzilla %]'s little mind; the
    Next/Prev/First/Last buttons won't appear on individual [% terms.bugs %].
81 82 83
  </h2>
[% END %]

84
[% SET shown_types = [
85
  'notequals', 'regexp', 'notregexp', 'lessthan', 'lessthaneq', 
86
  'greaterthan', 'greaterthaneq', 'changedbefore', 'changedafter', 
87
  'changedfrom', 'changedto', 'changedby', 'notsubstring', 'nowords',
88
  'nowordssubstr', 'notmatches',
89 90 91 92 93 94 95 96
] %]
<ul class="search_description">
[% 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 %]
97 98
    [% FOREACH val IN desc_item.value.split(',') %]
      [%+ display_value(desc_item.field, val) FILTER html %][% ',' UNLESS loop.last %]
99
    [% END %]
100 101 102 103 104 105 106
    [% IF debug %]
      (<code>[% desc_item.term FILTER html %]</code>)
   [% END %]
  </li>
[% END %]
</ul>

107
<hr>
108 109 110 111 112 113

[%############################################################################%]
[%# Preceding Status Line                                                    #%]
[%############################################################################%]

[% IF bugs.size > 9 %]
114 115 116
  <span class="bz_result_count">
    [% bugs.size %] [%+ terms.bugs %] found.
  </span>
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
[% END %]

[%############################################################################%]
[%# Start of Change Form                                                     #%]
[%############################################################################%]

[% IF dotweak %]
  <form name="changeform" method="post" action="process_bug.cgi">
[% END %]

[%############################################################################%]
[%# Bug Table                                                                #%]
[%############################################################################%]

[% FLUSH %]
132
[% PROCESS list/table.html.tmpl %]
133 134 135 136 137

[%############################################################################%]
[%# Succeeding Status Line                                                   #%]
[%############################################################################%]

138 139
<span class="bz_result_count">
  [% IF bugs.size == 0 %]
140
    <span class="zero_results">[% terms.zeroSearchResults %].</span>
141 142 143 144 145 146
  [% ELSIF bugs.size == 1 %]
    One [% terms.bug %] found.
  [% ELSE %]
    [% bugs.size %] [%+ terms.bugs %] found.
  [% END %]
</span>
147

148 149 150 151 152 153 154 155 156 157 158 159
[% 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 %]

160
<br>
161 162 163 164 165 166

[%############################################################################%]
[%# Rest of Change Form                                                      #%]
[%############################################################################%]

[% IF dotweak %]
167
  [% PROCESS "list/edit-multiple.html.tmpl" %]
168
  </form>
169
  <hr>
170 171 172 173 174 175
[% END %]

[%############################################################################%]
[%# Navigation Bar                                                           #%]
[%############################################################################%]

176 177 178
<table>
  <tr>
    [% IF bugs.size > 0 %]
179
      <td valign="middle" class="bz_query_buttons">
180 181 182 183 184
        <form method="post" action="show_bug.cgi">
          [% FOREACH id = buglist %]
            <input type="hidden" name="id" value="[% id FILTER html %]">
          [% END %]
          <input type="hidden" name="format" value="multiple">
185
          <input type="submit" id="long_format" value="Long Format">
186
        </form>
187 188 189 190 191 192
        <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">
193
            <input type="submit" value="XML" id="xml">
194
        </form>
195

196
        [% IF user.is_timetracker %]
197 198
          <form method="post" action="summarize_time.cgi">
            <input type="hidden" name="id" value="[% buglist_joined FILTER html %]">
199
            <input type="submit" id="timesummary" value="Time Summary">
200 201
          </form>
        [% END %]
202
      </td>
203
      
204
      <td>&nbsp;</td>
205
      
206
      <td valign="middle" class="bz_query_links">
207 208
        <a href="buglist.cgi?
        [% urlquerypart FILTER html %]&amp;ctype=csv">CSV</a> |
209
        <a href="buglist.cgi?
210
        [% urlquerypart FILTER html %]&amp;title=
211
        [%- title FILTER html %]&amp;ctype=atom">Feed</a> |
212
        <a href="buglist.cgi?
213
        [% urlquerypart FILTER html %]&amp;ctype=ics">iCalendar</a> |
214
        <a href="colchange.cgi?
215
        [% urlquerypart FILTER html %]&amp;query_based_on=
216
          [% defaultsavename OR searchname FILTER url_quote %]">Change&nbsp;Columns</a> |
217 218 219 220 221 222 223 224

        [% IF bugs.size > 1 && caneditbugs && !dotweak %]
          <a href="buglist.cgi?[% urlquerypart FILTER html %]
            [%- "&order=$qorder" FILTER html IF order %]&amp;tweak=1"
            >Change&nbsp;Several&nbsp;[% terms.Bugs %]&nbsp;at&nbsp;Once</a>
          |
        [% END %]

225
        [% IF bugowners && user.id %]
226
          <a href="mailto:
227
            [% bugowners FILTER html %]">Send&nbsp;Mail&nbsp;to&nbsp;[% terms.Bug %]&nbsp;Assignees</a> |
228
        [% END %]
229 230 231

        [%# Links to more things users can do with this bug list. %]
        [% Hook.process("links") %]
232
      </td>
233 234
    [% END %]
    
235
    <td valign="middle" class="bz_query_edit">
236
      <a href="[% PROCESS edit_search_url %]">Edit&nbsp;Search</a>
237 238
    </td>
      
239
    [% IF searchtype == "saved" %]
240
      <td valign="middle" nowrap="nowrap" class="bz_query_forget">
241 242
        |
        <a href="buglist.cgi?cmdtype=dorem&amp;remaction=forget&amp;namedcmd=
243 244 245
                [% searchname FILTER url_quote %]&amp;token=
                [% issue_hash_token([search_id, searchname]) FILTER url_quote %]">
          Forget&nbsp;Search&nbsp;'[% searchname FILTER html %]'</a>
246 247 248 249
      </td>
    [% ELSE %]
      <td>&nbsp;</td>
      
250
      <td valign="middle" class="bz_query_remember">
251
        <form method="get" action="buglist.cgi">
252
          <input type="submit" id="remember" value="Remember search"> as 
253
          <input type="hidden" name="newquery" 
254
                 value="[% urlquerypart FILTER html %][% "&order=$qorder" FILTER html IF order %]">
255 256
          <input type="hidden" name="cmdtype" value="doit">
          <input type="hidden" name="remtype" value="asnamed">
257
          <input type="text" id="save_newqueryname" name="newqueryname" size="20"
258
                 value="[% defaultsavename FILTER html %]"> 
259 260 261 262 263
        </form> 
      </td>
    [% END %]  
  </tr>
</table>
264

265
[% IF one_product.defined %]
266
  <p class="bz_query_single_product">
267
    [% PROCESS enter_bug_link %]
268 269
  </p>
[% END %]
270 271 272 273 274

[%############################################################################%]
[%# Page Footer                                                              #%]
[%############################################################################%]

275
[% PROCESS global/footer.html.tmpl %]
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293

[% BLOCK edit_search_url %]
  [% editqueryname = searchname OR defaultsavename OR '' %]
  query.cgi?[% urlquerypart FILTER html %]
    [%- IF editqueryname != '' %]&amp;known_name=
      [%- editqueryname FILTER url_quote %]
    [% END %]
[% END %]

[% BLOCK enter_bug_link %]
  <a href="enter_bug.cgi
           [%- IF one_product.defined %]?product=
             [%- one_product.name FILTER url_quote %][% END %]">File
    a new [% terms.bug %]
   [% IF one_product.defined %]
     in the "[% one_product.name FILTER html %]" product
   [% END %]</a>
[% END %]