list.html.tmpl 9.27 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 32
[% PROCESS global/variables.none.tmpl %]

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
  javascript_urls = [ "js/util.js", "js/keyword-chooser.js", "js/field.js",
                      "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ]
51
  style_urls = [ "skins/standard/buglist.css", "skins/standard/yui/calendar.css" ]
52
  doc_section = "query.html#list"
53 54
%]

55 56 57 58 59 60 61 62
<div class="bz_query_head" align="center">
  <span class="bz_query_timestamp">
    [% IF Param('timezone') %]
      <b>[% time2str("%a %b %e %Y %T %Z", currenttime, Param('timezone')) %]</b><br>
    [% ELSE %]
      <b>[% time2str("%a %b %e %Y %T", currenttime) %]</b><br>
    [% END %]
  </span>
63 64

  [% IF debug %]
65
    <p class="bz_query_debug">
66 67 68 69
      [% FOREACH debugline = debugdata %]
        [% debugline FILTER html %]<br>
      [% END %]
    </p>
70
    <p class="bz_query">[% query FILTER html %]</p>
71 72
  [% END %]

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

</div>

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

89
<hr>
90 91 92 93 94 95

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

[% IF bugs.size > 9 %]
96 97 98
  <span class="bz_result_count">
    [% bugs.size %] [%+ terms.bugs %] found.
  </span>
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
[% END %]

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

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

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

[% FLUSH %]
114
[% PROCESS list/table.html.tmpl %]
115 116 117 118 119

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

120 121 122 123 124 125 126 127 128
<span class="bz_result_count">
  [% IF bugs.size == 0 %]
    [% terms.zeroSearchResults %].
  [% ELSIF bugs.size == 1 %]
    One [% terms.bug %] found.
  [% ELSE %]
    [% bugs.size %] [%+ terms.bugs %] found.
  [% END %]
</span>
129

130
<br>
131 132 133 134 135 136

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

[% IF dotweak %]
137
  [% PROCESS "list/edit-multiple.html.tmpl" %]
138
  </form>
139
  <hr>
140 141 142 143 144 145
[% END %]

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

146 147 148
<table>
  <tr>
    [% IF bugs.size > 0 %]
149
      <td valign="middle" class="bz_query_buttons">
150 151 152 153 154
        <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">
155
          <input type="submit" id="long_format" value="Long Format">
156
        </form>
157 158 159 160 161 162
        <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">
163
            <input type="submit" value="XML" id="xml">
164
        </form>
165

166
        [% IF user.in_group(Param('timetrackinggroup')) %]
167 168
          <form method="post" action="summarize_time.cgi">
            <input type="hidden" name="id" value="[% buglist_joined FILTER html %]">
169
            <input type="submit" id="timesummary" value="Time Summary">
170 171
          </form>
        [% END %]
172
      </td>
173
      
174
      <td>&nbsp;</td>
175
      
176
      <td valign="middle" class="bz_query_links">
177 178
        <a href="buglist.cgi?
        [% urlquerypart FILTER html %]&amp;ctype=csv">CSV</a> |
179
        <a href="buglist.cgi?
180
        [% urlquerypart FILTER html %]&amp;title=
181
        [%- title FILTER html %]&amp;ctype=atom">Feed</a> |
182
        <a href="buglist.cgi?
183
        [% urlquerypart FILTER html %]&amp;ctype=ics">iCalendar</a> |
184
        <a href="colchange.cgi?
185
        [% urlquerypart FILTER html %]&amp;query_based_on=
186
          [% defaultsavename OR searchname FILTER url_quote %]">Change&nbsp;Columns</a> |
187 188 189 190 191 192 193 194 195 196

        [% 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 %]

        [% IF bugowners %]
          <a href="mailto:
197
            [% bugowners FILTER html %]">Send&nbsp;Mail&nbsp;to&nbsp;[% terms.Bug %]&nbsp;Assignees</a> |
198
        [% END %]
199 200 201

        [%# Links to more things users can do with this bug list. %]
        [% Hook.process("links") %]
202
      </td>
203 204
    [% END %]
    
205
    <td valign="middle" class="bz_query_edit">
206 207 208 209 210
      [% editqueryname = searchname OR defaultsavename OR '' %]
      <a href="query.cgi?[% urlquerypart FILTER html %]
      [% IF editqueryname != '' %]&amp;known_name=
        [% editqueryname FILTER url_quote %]
      [% END %]">Edit&nbsp;Search</a>
211 212
    </td>
      
213
    [% IF searchtype == "saved" %]
214
      <td valign="middle" nowrap="nowrap" class="bz_query_forget">
215 216
        |
        <a href="buglist.cgi?cmdtype=dorem&amp;remaction=forget&amp;namedcmd=
217
                [% searchname FILTER url_quote %]">Forget&nbsp;Search&nbsp;'
218 219 220 221 222
                [% searchname FILTER html %]'</a>
      </td>
    [% ELSE %]
      <td>&nbsp;</td>
      
223
      <td valign="middle" class="bz_query_remember">
224
        <form method="get" action="buglist.cgi">
225
          <input type="submit" id="remember" value="Remember search"> as 
226
          <input type="hidden" name="newquery" 
227
                 value="[% urlquerypart FILTER html %][% "&order=$qorder" FILTER html IF order %]">
228 229
          <input type="hidden" name="cmdtype" value="doit">
          <input type="hidden" name="remtype" value="asnamed">
230
          <input type="text" id="save_newqueryname" name="newqueryname" size="20"
231
                 value="[% defaultsavename FILTER html %]"> 
232 233 234 235 236
        </form> 
      </td>
    [% END %]  
  </tr>
</table>
237

238
[% IF cgi.param('product').size == 1 && cgi.param('product') != "" %]
239
  <p class="bz_query_single_product">
240
    <a href="enter_bug.cgi?product=[% cgi.param('product') FILTER url_quote %]">File
241 242 243
      a new [% terms.bug %] in the "[% cgi.param('product') FILTER html %]" product</a>
  </p>
[% END %]
244 245 246 247 248

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

249
[% PROCESS global/footer.html.tmpl %]