forked from edgewall/trac
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jadmin_enums.html
142 lines (127 loc) · 4.25 KB
/
jadmin_enums.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{# Copyright (C) 2006-2014 Edgewall Software
This software is licensed as described in the file COPYING, which
you should have received as part of this distribution. The terms
are also available at http://trac.edgewall.com/license.html.
This software consists of voluntary contributions made by many
individuals. For the exact contribution history, see the revision
history and logs, available at http://trac.edgewall.org/.
#}
# extends "jadmin.html"
<!DOCTYPE html>
<html>
<head>
<title>
# block admintitle
${label_plural}
# endblock admintitle
</title>
</head>
<body>
# block adminpanel
<h2>
# set nb_enums
# if view == 'list':
<span class="trac-count">(${len(enums)})</span>
# endif
# endset
# trans label_plural, nb_enums = nb_enums
Manage ${label_plural} ${nb_enums}
# endtrans
</h2>
# if view == 'detail':
<form id="edit" class="mod" method="post" action="">
${jmacros.form_token_input()}
<fieldset>
<legend>
${_("Modify %(label_singular)s:", label_singular=label_singular)}
</legend>
<div class="field">
<label>${_("Name:")} <input type="text" name="name" class="trac-autofocus" value="${enum.name}" /></label>
</div>
</fieldset>
<div class="buttons">
<input type="submit" name="save" class="trac-disable-on-submit" value="${_('Submit changes')}"/>
<input type="submit" name="cancel" value="${_('Cancel')}"/>
</div>
</form>
# else:
<form class="addnew" id="addenum" method="post" action="">
${jmacros.form_token_input()}
<fieldset>
<legend>
${_("Add %(label_singular)s:", label_singular=label_singular)}
</legend>
<div class="field">
<label>${_("Name:")} <input type="text" name="name" id="name"/></label>
</div>
<div class="buttons">
<input type="submit" name="add" class="trac-disable-on-submit" value="${_('Add')}"/>
</div>
</fieldset>
</form>
# if enums:
<form id="enumtable" method="post" action="">
${jmacros.form_token_input()}
<table class="listing" id="enumlist">
<thead>
<tr><th class="sel"></th>
<th>${_("Name")}</th><th>${_("Default")}</th><th>${_("Order")}</th>
</tr>
</thead>
<tbody>
# for enum in enums:
<tr>
<td class="sel">
<input type="checkbox" class="trac-disable-determinant"
name="sel" value="${enum.name}" />
</td>
<td><a href="${panel_href(enum.name)}">${enum.name}</a></td>
<td class="default">
<input type="radio" name="default"${
{'value': enum.name,
'checked': enum.name == default
}|htmlattr}/>
</td>
<td class="default">
<select name="value_${enum.value}">
# for other in enums:
<option${{'selected': other.value == enum.value}|htmlattr}>${other.value}</option>
# endfor
</select>
</td>
</tr>
# endfor
</tbody>
</table>
<div class="buttons">
<input type="submit" name="apply" value="${_('Apply changes')}" />
<input type="submit" name="remove" class="trac-disable trac-disable-on-submit" value="${_('Remove selected items')}" />
<input type="submit" name="clear" value="${_('Clear default')}" />
</div>
<p class="help">
# trans
You can remove all items from this list to completely
hide this field from the user interface.
# endtrans
</p>
# if type == 'priority':
<p class="help">
# trans
<strong>Note:</strong> The order of priorities determines the
coloring of entries in the ticket queries and reports.
# endtrans
</p>
# endif
</form>
# else:
<p class="help">
# trans
As long as you don't add any items to the list, this field
will remain completely hidden from the user interface.
# endtrans
</p>
# endif
# endif
# endblock adminpanel
</body>
</html>