Parent: [bccd88] (diff)

Child: [3abb2e] (diff)

Download this file

admin_fields.html    84 lines (79 with data), 3.6 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
<!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 pyforge.lib.security import has_artifact_access ?>
<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>Status Names:</label>
<input type="text" name="status_names" id="status_names" value="${globals.status_names}"
py:if="allow_config"/>
<span py:if="not allow_config">${globals.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>
<script type="text/javascript" src="${g.app_static('js/custom-fields.js', app=app)}"
py:if="allow_config"/>
</html>