Parent: [8b7efb] (diff)

Download this file

admin_fields.html    90 lines (86 with data), 4.0 kB

 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="master.html" />
<?python
from allura.lib.security import has_artifact_access
if allow_config: g.register_app_js('js/custom-fields.js', app=app)
?>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
<title>$c.project.name / $app.config.options.mount_label / Admin Fields</title>
</head>
<body>
<h1 class="title">$app.config.options.mount_point Admin Fields</h1>
<div class="content">
<div class="row">
<div class="column grid_12">
<form>
<ol>
<li>
<label>Milestone Names:</label>
<input type="text" name="milestone_names" id="milestone_names" value="${globals.milestone_names}"
py:if="allow_config"/>
<span py:if="not allow_config">${globals.milestone_names}</span>
</li>
<hr/>
<li>
<label>Open Statuses:</label>
<input type="text" name="open_status_names" id="open_status_names" value="${globals.open_status_names}"
py:if="allow_config"/>
<span py:if="not allow_config">${globals.open_status_names}</span>
</li>
<li>
<label>Closed Statuses:</label>
<input type="text" name="closed_status_names" id="closed_status_names" value="${globals.closed_status_names}"
py:if="allow_config"/>
<span py:if="not allow_config">${globals.closed_status_names}</span>
</li>
<hr/>
<li>
<label>Custom Fields:</label>
<p id="has_fields_message" py:if="allow_config">Drag and drop the fields to re-order.</p>
<p id="no_fields_message" py:if="allow_config">No custom fields have been created.</p>
<p py:if="not allow_config">&nbsp;</p>
</li>
<li>
<div id="custom-field-list">
<py:for each="field in globals.custom_fields">
<?python show_in_search = 'true' if field.show_in_search else 'false' ?>
<div style="display:none" class="custom-field-stub"
data-label="${field.label}" data-type="${field.type}" data-options="${getattr(field, 'options', '')}"
data-show-in-search="${show_in_search}"
py:if="allow_config"/>
<py:if test="not allow_config">
<div class="span-3"><label>Label: </label></div><div class="span-15 last">${field.label}</div>
<div class="span-3"><label>Type: </label></div><div class="span-15 last">${field.type}</div>
<span class="options-wrapper" py:if="field.options"><div class="span-3"><label>Options: </label></div><div class="span-15 last">${getattr(field, 'options', '')}</div></span>
</py:if>
</py:for>
</div>
</li>
<hr/>
<li>
<label>&nbsp;</label>
<input type="button" onclick="add_field()"
py:if="allow_config" value="Add Field"/>
<input type="button" onclick="save_fields()"
py:if="allow_config" value="Save"/>
</li>
</ol>
</form>
</div>
</div>
</div>
</body>
<style type="text/css">
div.custom-field {
cursor: move;
border:1px solid #ccc;
margin:2px;
padding:2px;
}
</style>
</html>