summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/templates/page-panels.html
blob: b30e7c8717570460626da41b629bae0734f8d959 (plain) (blame)
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
<h2>{{lang_panelsTable}}</h2>

<p>{{lang_panelsTableHints}}</p>

<table class="table table-hover">
	<thead>
	<tr>
		<th>{{lang_panel}}</th>
		<th>{{lang_panelType}}</th>
		<th>{{lang_locations}}</th>
		{{#hasRunmode}}
			<th class="text-center slx-smallcol">{{lang_runmodeTHead}}</th>
		{{/hasRunmode}}
		<th class="text-center slx-smallcol">{{lang_edit}}</th>
		<th class="text-center slx-smallcol">{{lang_delete}}</th>
	</tr>
	</thead>
	<tbody>
		{{#panels}}
			<tr>
				<td>
					<a href="/panel/{{paneluuid}}" target="_blank">{{panelname}}</a>
				</td>
				<td>
					{{paneltype}}
				</td>
				<td>
					{{#locationurl}}<a href="{{locationurl}}" target="_blank">{{/locationurl}}
					{{locations}}
					{{#locationurl}}</a>{{/locationurl}}
				</td>
				{{#hasRunmode}}
					<td class="text-center" style="vertical-align: middle">
						<a class="btn btn-default btn-xs {{runmode_disabled}}"
							href="?do=runmode&amp;module=locationinfo&amp;modeid={{paneluuid}}&amp;redirect=?do=locationinfo">
							<span class="glyphicon glyphicon-edit"></span>
						</a>
						{{assignedMachineCount}}
					</td>
				{{/hasRunmode}}
				<td class="text-center" style="vertical-align: middle">
					<a class="btn btn-default btn-xs {{edit_disabled}}"
						href="?do=locationinfo&amp;show=edit-panel&amp;uuid={{paneluuid}}">
						<span class="glyphicon glyphicon-cog"></span>
					</a>
				</td>
				<td class="text-center" style="vertical-align: middle">
					<button type="button" class="btn btn-xs btn-danger" data-toggle="modal" data-target="#deleteModal" onclick="deletePanel('{{paneluuid}}')" {{edit_disabled}}>
						<span class="glyphicon glyphicon-trash"></span>
					</button>
				</td>
			</tr>
		{{/panels}}
	</tbody>
</table>

<div class="buttonbar text-right">
	<a class="btn btn-success" href="?do=locationinfo&amp;show=edit-panel&amp;uuid=new-default">
		<span class="glyphicon glyphicon-plus"></span>
		{{lang_defaultPanel}}
	</a>
	<a class="btn btn-success" href="?do=locationinfo&amp;show=edit-panel&amp;uuid=new-summary">
		<span class="glyphicon glyphicon-plus"></span>
		{{lang_summaryPanel}}
	</a>
	<a class="btn btn-success" href="?do=locationinfo&amp;show=edit-panel&amp;uuid=new-url">
		<span class="glyphicon glyphicon-plus"></span>
		{{lang_urlPanel}}
	</a>
</div>

<form method="post" action="?do=locationinfo">
<input type="hidden" name="token" value="{{token}}">

<div class ="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="myModalLabel">{{lang_delete}}</h4>
			</div>
			<div class="modal-body">
				<p>{{lang_deleteConfirmation}}</p>
			</div>
			<div class="modal-footer">
				<input type="hidden" id="delete-panel-id" name="uuid" value="">
				<button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
				<button type="submit" name="action" value="deletePanel" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> {{lang_delete}}</button>
			</div>
		</div>
	</div>
</div>
</form>

<script>
	function deletePanel(panelid) {
		$("#delete-panel-id").val(panelid);
	}
</script>