-
Notifications
You must be signed in to change notification settings - Fork 5
/
zones.tpl
77 lines (75 loc) · 2.91 KB
/
zones.tpl
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
<html>
<head>
<title>rf.wr.py</title>
<style type="text/css">
<!--A{text-decoration:none}-->
div.activation{
align: right;
}
a.Active{
pointer-events: none;
cursor: default;
color: #D4C311;
}
a.room_plus_Active{
pointer-events: none;
cursor: default;
color: #bdffea;
}
div{
margin: 0px auto; width: 250px;
}
div.zone_Activate{
background-color:#bdbbea;
padding: 15px 15px 15px 15px;
}
div.zone_Active{
background-color:#bdffea;
padding: 15px 15px 15px 15px;
border: 1px solid;
}
div.unassigned{
background-color:#66FA7F;
padding: 15px 15px 15px 15px;
}
</style>
</head>
<div><h1>Zone Manager <a href="/zones" title="Refresh">⟲</a> </h1>
%if tree[0].tag == 'zones':
%i = 0
%for zone in zone_room_names:
<div class = "zone_{{active_zone[i]}}">
Zone {{i}}: {{zone_room_names[i].keys()[0]}} <div align="right" class="activation"><a class="{{active_zone[i]}}" href="/zone/{{i}}">{{active_zone[i]}}</a></div>
%for room in zone[zone.keys()[0]]:
<div class = "room">
<a href="/drop_room/{{room}}">- {{room}}</a><a class="room_plus_{{active_zone[i]}}" href="/add_room/{{room}}">[+]</a>
</div>
%end
</div>
%i = i + 1
%end
Active Zone: {{l_zone}}<br>
%if len(tree) > 1:
<div class = "unassigned"> Unassigned:
%for i in range(0, len(tree[1])):
<div class = "room"><a href="/new_zone/{{tree[1][i].attrib['name']}}">{{tree[1][i].attrib['name']}}</a><a href="/add_room/{{tree[1][i].attrib['name']}}">[+]</a></div>
%end
</div>
%end
%else:
<div class = "unassigned"> Unassigned:
%for i in range(0, len(tree[0])):
<div class = "room"><a href="/new_zone/{{tree[0][i].attrib['name']}}">{{tree[0][i].attrib['name']}}</a><a href="/add_room/{{tree[0][i].attrib['name']}}">[+]</a></div>
%end
</div>
%end
<br><br>
Usage:
<ul>
<li>Choose active zone by clicking on 'Activate'.</li>
<li>Remove rooms from any zone by clicking on them or add [+] them to the active zone.</li>
<li>Unassigned rooms can be added [+] to the active zone or used to create a new room, by clicking on the name.</li>
</ul>
<br><a href="/player">Back to Player</a>
</div>
</html>