summaryrefslogtreecommitdiffstats
path: root/modules-available/serversetup-bwlp-ipxe/templates/menu-list.html
blob: 545f22a9febe58fe3a19f0501df77f5f02dff7c7 (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
100
<h2>{{lang_listOfMenus}}</h2>

<p>
	{{lang_menuListIntro}}
</p>

<table class="table">
	<thead>
	<tr>
		<th>{{lang_menuTitle}}</th>
		<th class="slx-smallcol">{{lang_locationCount}}</th>
		<th class="slx-smallcol">{{lang_isDefault}}</th>
		<th class="slx-smallcol">{{lang_edit}}</th>
		<th class="slx-smallcol">{{lang_delete}}</th>
	</tr>
	</thead>
	<tbody>
	{{#menuTable}}
		<tr>
			<td>
				{{title}}
			</td>
			<td class="text-right">
				<span class="badge" data-toggle="tooltip" data-placement="top" title="{{locnames}}">{{locationCount}}</span>
			</td>
			<td align="center">
				{{^isdefault}}
					{{#showSetDefault}}
					<form method="post" action="?do=serversetup">
						<input type="hidden" name="token" value="{{token}}">
						<input type="hidden" name="menuid" value="{{menuid}}">
						<button type="submit" name="action" value="setDefaultMenu" class="btn btn-xs btn-info">
							<span class="glyphicon glyphicon-flag"></span>
						</button>
					</form>
					{{/showSetDefault}}
				{{/isdefault}}
				{{#isdefault}}
					<span class="glyphicon glyphicon-ok"></span>
				{{/isdefault}}
			</td>
			<td align="center">
				{{#allowEdit}}
					<a href="?do=serversetup&amp;show=editmenu&amp;id={{menuid}}" class="btn btn-xs btn-default">
						<span class="glyphicon glyphicon-edit"></span>
					</a>
				{{/allowEdit}}
			</td>
			<td align="center">
				{{#allowDelete}}
					<button type="button" class="btn btn-xs btn-danger" data-toggle="modal" data-target="#deleteModal" onclick="deleteMenu('{{menuid}}')">
						<span class="glyphicon glyphicon-trash"></span>
					</button>
				{{/allowDelete}}
			</td>
		</tr>
	{{/menuTable}}
	</tbody>
</table>
<div class="pull-right">
	<a href="?do=serversetup&amp;show=editmenu&amp;id=0" class="btn btn-success {{allowAddMenu}}">
		<span class="glyphicon glyphicon-plus"></span>
		{{lang_addMenu}}
	</a>
</div>

<div class="clearfix"></div>


<!-- Modals -->
<form method="post" action="?do=serversetup">
	<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_menuDeleteConfirm}}</p>
				</div>
				<div class="modal-footer">
					<input type="hidden" id="delete-menu-id" name="deleteid" value="">
					<button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
					<button type="submit" name="action" value="deleteMenu" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> {{lang_delete}}</button>
				</div>
			</div>
		</div>
	</div>
</form>

<script>
	function deleteMenu(menuid) {
		$("#delete-menu-id").val(menuid);
	}
	document.addEventListener('DOMContentLoaded', function() {
		$('[data-toggle="tooltip"]').tooltip();
	});
</script>