Parent: [a9af82] (diff)

Child: [975afb] (diff)

Download this file

admin.html    95 lines (88 with data), 3.7 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
90
91
92
93
94
<!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" />
<xi:include href="${app.templates}/lib.html" />
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
<title>Admin for $c.project._id $app.config.options.mount_point</title>
</head>
<body>
<h1>Tracker Admin for ${project_tree(c.project)} $app.config.options.mount_point </h1>
<div id="app-config" py:if="len(app.config_options) > 1">
<h3>Config Options</h3>
<form method="post" action="configure">
<div py:for="o in app.config_options" py:if="o.name != 'mount_point'">
<label for="$o.name">$o.name</label><br/>
<input name="$o.name" value="${app.config.options.get(o.name, o.default)}"/>
</div>
<input type="submit" value="Update config"/>
<input py:if="app.installable" type="submit" name="delete" value="Delete Plugin"/>
</form>
</div>
<div id="app-acl" class="title-pane closed">
<h3 class="title">ACL Config</h3>
<div class="content">
<div py:for="p in app.permissions" >
<h4>$p</h4>
<ul>
<li py:for="role in h.make_roles(app.config.acl[p])">
${role.display()}
<form method="POST" action="del_perm" style="display:inline">
<input type="hidden" name="permission" value="$p"/>
<input type="hidden" name="role" value="${role._id}"/>
<input type="submit" value="Remove"/>
</form>
</li>
</ul>
<form method="POST" action="add_perm">
<input type="hidden" name="permission" value="$p"/>
<select name="role">
<option py:for="role in c.project.roles"
value="$role._id"
>${role.display()}</option>
</select>
<input type="submit" value="Add role"/>
</form>
</div>
</div>
</div>
<div id="app-acl" class="title-pane closed">
<h3 class="title">Status Config</h3>
<div class="content">
<form method="POST" action="set_status_names">
status names:
<input type="text" name="status_names" style="width:50%" value="${globals.status_names}"/>
<input type="submit" value="Save"/>
</form>
</div>
</div>
<div id="app-acl" class="title-pane closed">
<h3 class="title">Custom Fields Config</h3>
<div class="content">
custom fields:
<div id="custom-field-list">
<div py:for="field in globals.custom_fields" style="display:none" class="custom-field-stub"
data-name="${field.name}" data-type="${field.type}"/>
</div>
<button onclick="add_field()">Add Field</button>
<button onclick="save_fields()">Save</button>
</div>
</div>
</body>
<style type="text/css">
div.custom-field {
border:1px solid gray;
margin:2px;
padding:2px;
background-color:white;
}
</style>
<script type="text/javascript" src="/static/Tickets/js/jquery.ui.core.js"/>
<script type="text/javascript" src="/static/Tickets/js/jquery.ui.widget.js"/>
<script type="text/javascript" src="/static/Tickets/js/jquery.ui.mouse.js"/>
<script type="text/javascript" src="/static/Tickets/js/jquery.ui.sortable.js"/>
<script type="text/javascript" src="/static/Tickets/js/custom-fields.js"/>
</html>