/[web]/templates/bugzilla/trunk/account/prefs/settings.html.tmpl
ViewVC logotype

Contents of /templates/bugzilla/trunk/account/prefs/settings.html.tmpl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 48 - (show annotations) (download)
Fri Nov 26 14:56:29 2010 UTC (13 years, 4 months ago) by dmorgan
File size: 3081 byte(s)
Add custom template with identity support
1 [%# The contents of this file are subject to the Mozilla Public
2 # License Version 1.1 (the "License"); you may not use this file
3 # except in compliance with the License. You may obtain a copy of
4 # the License at http://www.mozilla.org/MPL/
5 #
6 # Software distributed under the License is distributed on an "AS
7 # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
8 # implied. See the License for the specific language governing
9 # rights and limitations under the License.
10 #
11 # The Original Code is the Bugzilla Bug Tracking System.
12 #
13 # Contributor(s): Shane H. W. Travis <travis@sedsystems.ca>
14 # Frédéric Buclin <LpSolit@gmail.com>
15 #
16 #%]
17
18 [%# INTERFACE:
19 # setting_names: an array of strings
20 # settings: a hash of hashes, keyed by setting_name.
21 # Each hash contains:
22 # is_enabled - boolean
23 # default_value - string (global default for this setting)
24 # value - string (user-defined preference)
25 # is_default - boolean (true if user has no preference)
26 # has_settings_enabled : boolean; is true if there is at least one user pref
27 # enabled by the maintainer.
28 #%]
29
30 [% PROCESS "global/setting-descs.none.tmpl" %]
31
32 [% IF settings.size %]
33 [% UNLESS has_settings_enabled %]
34 <p class="criticalmessages">
35 All user preferences have been disabled by the
36 <a href="mailto:[% Param("maintainer") %]">maintainer</a>
37 of this installation, and so you cannot customize any.
38 </p>
39 [% END %]
40
41 <table border="0" cellpadding="8">
42 [% FOREACH name = setting_names %]
43 [% default_name = name _ '-isdefault' %]
44 [% default_val = settings.${name}.default_value %]
45 <tr>
46 <td align="right">
47 [% setting_descs.$name OR name FILTER html %]
48 </td>
49 <td>
50 [% IF settings.${name}.is_enabled %]
51 <select name="[% name FILTER html %]" id="[% name FILTER html %]">
52 <option value="[% default_name FILTER html %]"
53 [% ' selected="selected"' IF settings.${name}.is_default %]>
54 Site Default ([% setting_descs.${default_val} OR default_val FILTER html %])
55 </option>
56 [% FOREACH x = settings.${name}.legal_values %]
57 <option value="[% x FILTER html %]"
58 [% ' selected="selected"'
59 IF x == settings.${name}.value
60 AND NOT settings.${name}.is_default %]>
61 [% setting_descs.${x} OR x FILTER html %]
62 </option>
63 [% END %]
64 </select>
65 [% ELSE %]
66 <select name="[% name FILTER html %]" id="[% name FILTER html %]" disabled="disabled">
67 <option value="[% default_name FILTER html %]">
68 Site Default ([% setting_descs.${default_val} OR default_val FILTER html %])
69 </option>
70 </select>
71 [% END %]
72 </td>
73 </tr>
74 [% END %]
75 </table>
76 [% END %]
77 <br>

  ViewVC Help
Powered by ViewVC 1.1.30