~ubuntu-branches/debian/sid/bugzilla/sid

« back to all changes in this revision

Viewing changes to template/en/default/list/quips.html.tmpl

  • Committer: Bazaar Package Importer
  • Author(s): Raphael Bossek
  • Date: 2008-06-27 22:34:34 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080627223434-0ib57vstn43bb4a3
Tags: 3.0.4.1-1
* Update of French, Russian and German translations. (closes: #488251)
* Added Bulgarian and Belarusian translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
[%# 1.0@bugzilla.org %]
2
 
[%# The contents of this file are subject to the Mozilla Public
3
 
  # License Version 1.1 (the "License"); you may not use this file
4
 
  # except in compliance with the License. You may obtain a copy of
5
 
  # the License at http://www.mozilla.org/MPL/
6
 
  #
7
 
  # Software distributed under the License is distributed on an "AS
8
 
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
 
  # implied. See the License for the specific language governing
10
 
  # rights and limitations under the License.
11
 
  #
12
 
  # The Original Code is the Bugzilla Bug Tracking System.
13
 
  #
14
 
  # The Initial Developer of the Original Code is Netscape Communications
15
 
  # Corporation. Portions created by Netscape are
16
 
  # Copyright (C) 1998 Netscape Communications Corporation. All
17
 
  # Rights Reserved.
18
 
  #
19
 
  # Contributor(s): Gervase Markham <gerv@gerv.net>
20
 
  #%]
21
 
 
22
 
[%# INTERFACE:
23
 
  # added_quip: string. Defined if the CGI added a quip data before
24
 
  #                displaying anything; if defined, its value is that quip.
25
 
  # show_quips: boolean. True if we are showing the entire quip list.
26
 
  # quips: list of strings. Defined if and only if show_quips is true.
27
 
  #                List of all quips.
28
 
  #%]
29
 
 
30
 
[% PROCESS global/variables.none.tmpl %]
31
 
 
32
 
[% PROCESS global/header.html.tmpl
33
 
           title = "$terms.Bugzilla Quip System"
34
 
           header = "Add your own clever headline"
35
 
 %]
36
 
 
37
 
[% IF added_quip %]
38
 
  <p>
39
 
    <font color="red">
40
 
      Your quip '<tt>[% added_quip FILTER html %]</tt>' has been added.
41
 
      [% IF Param("quip_list_entry_control") == "moderated" AND !user.groups.admin %]
42
 
        It will be used as soon as it gets approved.
43
 
      [% END %]
44
 
    </font>
45
 
  </p>
46
 
[% END %]
47
 
 
48
 
[% IF deleted_quip %]
49
 
  <p>
50
 
    <font color="red">
51
 
      The quip '<tt>[% deleted_quip FILTER html %]</tt>' has been deleted.
52
 
    </font>
53
 
  </p>
54
 
[% END %]
55
 
 
56
 
[% IF approved or unapproved %]
57
 
  <p>[% approved.size %] quips approved and [% unapproved.size %] quips unapproved</p>
58
 
[% END %]
59
 
 
60
 
 
61
 
<p>
62
 
  [% terms.Bugzilla %] will pick a random quip for the headline on each 
63
 
  [% terms.bug %] list.
64
 
</p>
65
 
 
66
 
[% IF Param("quip_list_entry_control") != "closed" %]
67
 
  <p>
68
 
    You can extend the quip list. Type in something clever or funny or boring
69
 
    (but not obscene or offensive, please) and bonk on the button.
70
 
    [% IF Param("quip_list_entry_control") == "moderated" AND !user.groups.admin %]
71
 
      Note that your quip has to be approved before it is used.
72
 
    [% END %]
73
 
  </p>
74
 
 
75
 
  <form method="post" action="quips.cgi">
76
 
    <input type="hidden" name="action" value="add">
77
 
    <input size="80" name="quip">
78
 
    <p>
79
 
      <input type="submit" id="add" value="Add This Quip">
80
 
    </p>
81
 
  </form>
82
 
[% ELSE %]
83
 
  <p>No new entries may be submitted at this time.
84
 
  </p>
85
 
[% END %]
86
 
 
87
 
[% IF show_quips %]
88
 
  [% IF !user.in_group('admin') %]
89
 
    <h2>
90
 
      Existing quips:
91
 
    </h2>
92
 
    <ul>
93
 
      [% FOREACH quipid = quipids %]
94
 
        [% NEXT IF NOT quips.$quipid.approved %]
95
 
        <li>[% quips.$quipid.quip FILTER html %]</li>
96
 
      [% END %]
97
 
    </ul>
98
 
  [% ELSE %]
99
 
    <h2>Edit existing quips:</h2>
100
 
    <p>
101
 
      <strong>Note:</strong> Only approved quips will be shown.
102
 
      If the parameter 'quip_list_entry_control' is set to <q>open</q>, 
103
 
      entered quips are automatically approved.
104
 
    </p>
105
 
    <form name="editform" method="post" action="quips.cgi">
106
 
      <input type="hidden" name="action" value="approve">
107
 
      <table border="1">
108
 
        <thead><tr>
109
 
          <th>Quip</th>
110
 
          <th>Author</th>
111
 
          <th>Action</th>
112
 
          <th>Approved</th>
113
 
        </tr></thead><tbody>
114
 
        [% FOREACH quipid = quipids %]
115
 
          <tr>
116
 
            <td>[% quips.$quipid.quip FILTER html %]</td>
117
 
            <td>
118
 
              [% userid = quips.$quipid.userid  %]
119
 
              [% users.$userid FILTER html      %]
120
 
              [% "Unknown" IF NOT users.$userid %]
121
 
            </td>
122
 
            <td>
123
 
              <a href="quips.cgi?action=delete&amp;quipid=[% quipid FILTER url_quote %]">
124
 
                Delete
125
 
              </a>
126
 
            </td>
127
 
            <td>
128
 
              <input type="checkbox" name="quipid_[% quipid FILTER html %]"
129
 
                     id="quipid_[% quipid FILTER html %]"
130
 
                     [%- ' checked="checked"' IF quips.$quipid.approved %]>
131
 
            </td>
132
 
          </tr>
133
 
        [% END %]
134
 
        </tbody>
135
 
      </table>
136
 
      <script type="text/javascript"><!--
137
 
        var numelements = document.forms.editform.elements.length;
138
 
        function SetCheckboxes(value) {
139
 
          var item;
140
 
          for (var i=0 ; i<numelements ; i++) {
141
 
            item = document.forms.editform.elements[i];
142
 
            item.checked = value;
143
 
          }
144
 
        }
145
 
        document.write(' <input type="button" name="uncheck_all" '
146
 
                      +'value="Uncheck All" onclick="SetCheckboxes(false);">');
147
 
        document.write(' <input type="button" name="check_all" '
148
 
                      +'value="Check All" onclick="SetCheckboxes(true);">');
149
 
        //--></script>
150
 
 
151
 
      <input type="submit" id="update" value="Update">
152
 
    </form>
153
 
    <br>
154
 
  [% END %]
155
 
[% ELSE %]
156
 
  <p>
157
 
    Those who like their wisdom in large doses can
158
 
    <a href="quips.cgi?action=show">view
159
 
    [% IF user.in_group('admin') %]
160
 
      and edit
161
 
    [% END %]
162
 
    the whole quip list</a>.
163
 
  </p>
164
 
[% END %]
165
 
 
166
 
[% PROCESS global/footer.html.tmpl %]