summaryrefslogtreecommitdiffstats
path: root/modules-available/usblockoff/templates/usb-configuration-table.html
blob: dc8254df1d66bcc6fbaada72cf0450888f66c771 (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<div class="container-fluid">
	<div class="row">
		<div class="col-md-12">
			<div class="page-header">
				<h1>{{lang_usb-lock-off}}</h1>
			</div>
		</div>
	</div>
<!--
	<div class="row">
		<div class="col-md-12">
			<table id="configurationTable" class="table table-condensed table-hover stupidtable">
				<thead>
					<tr>
						<th data-sort="string">{{lang_serverName}}</th>
						<th>{{lang_ruleInfoTODO}}</th>
						<th>{{lang_edit}}</th>
						<th>{{lang_delete}}</th>
					</tr>
				</thead>
				<tbody>
					{{#config_list}}
					<tr>
						<td data-sort-value="{{config_name}}">{{config_name}}</td>
						<td>TODO: Show Rule information here</td>
						<td>
							<a class="btn btn-xs btn-info" href="?do=usblockoff&amp;show=edit-config&amp;configid={{config_id}}">
								<span class="glyphicon glyphicon-edit"></span>
							</a>
						</td>
						<td>
							<a class="btn btn-xs btn-danger" onclick="deleteConfig(event, {{config_id}});">
								<span class="glyphicon glyphicon-trash"></span>
							</a>
						</td>
					</tr>
					{{/config_list}}
				</tbody>
			</table>
			<div class="buttonbar text-right">
				<a class="btn btn-success" href="?do=usblockoff&amp;show=edit-config&amp;configid=new-default">
					<span class="glyphicon glyphicon-plus"></span>
					{{lang_configuration}}
				</a>
			</div>
		</div>
	</div> -->
</div>


<ul class="nav nav-tabs">
	<li class="active"><a data-toggle="tab" href="#configTableMenu">{{lang_editConfig}}</a></li>
	<li><a data-toggle="tab" href="#assignMenu">{{lang_assingMenu}}</a></li>
</ul>

<div class="tab-content">
	<div id="configTableMenu" class="tab-pane fade in active">
		<div class="panel panel-default">
			<div class="panel-heading">{{lang_configurationTable}}</div>
			<div class="panel-body">
				<div class="list-group">

					<div class="row">
						<div class="col-md-12">
							<table id="configurationTable" class="table table-condensed table-hover stupidtable fixedTableLayout">
								<thead>
								<tr>
									<th style="width: 5%" class="tableWrapBreakWord" data-sort="int">ID</th>
									<th style="width: 35%" class="tableWrapBreakWord" data-sort="string">{{lang_configName}}</th>
									<th style="width: 40%" class="tableWrapBreakWord">{{lang_description}}</th>
									<th style="width: 10%" class="tableWrapBreakWord">{{lang_edit}}</th>
									<th style="width: 10%" class="tableWrapBreakWord">{{lang_delete}}</th>
								</tr>
								</thead>
								<tbody>
								{{#config_list}}
								<tr>
									<td class="tableWrapBreakWord">{{config_id}}</td>
									<td class="tableWrapBreakWord" data-sort-value="{{config_name}}">{{config_name}}</td>
									<td class="tableWrapBreakWord">{{config_desc}}</td>
									<td class="tableWrapBreakWord">
										<a class="btn btn-xs btn-info" href="?do=usblockoff&amp;show=edit-config&amp;configid={{config_id}}">
											<span class="glyphicon glyphicon-edit"></span>
										</a>
									</td>
									<td class="tableWrapBreakWord">
										<a class="btn btn-xs btn-danger" onclick="deleteConfig(event, {{config_id}});">
											<span class="glyphicon glyphicon-trash"></span>
										</a>
									</td>
								</tr>
								{{/config_list}}
								</tbody>
							</table>
							<div class="buttonbar text-right">
								<a class="btn btn-success" href="?do=usblockoff&amp;show=edit-config&amp;configid=new-default">
									<span class="glyphicon glyphicon-plus"></span>
									{{lang_configuration}}
								</a>
							</div>
						</div>
					</div>

				</div>
			</div>
		</div>
	</div>
	<div id="assignMenu" class="tab-pane fade">
		<div class="panel panel-default">
			<div class="panel-heading">{{lang_configurationTable}}</div>
			<div class="panel-body">
				<div class="list-group">

					<h3>Work in progress ...</h3>
					<p>Todo: Implement this.</p>
					<p>Or not.</p>
					<p>¯\_(ツ)_/¯</p>

				</div>
			</div>
		</div>
	</div>
</div>


<script>
	function deleteConfig(event, id) {
		event.preventDefault();

		BootstrapDialog.confirm({
			title: '{{lang_delete}}',
			message: '{{lang_deleteConfigMessage}}',
			type: BootstrapDialog.TYPE_DANGER, // <-- Default value is BootstrapDialog.TYPE_PRIMARY
			closable: false, // <-- Default value is false
			draggable: false, // <-- Default value is false
			btnCancelLabel: '{{lang_cancel}}', // <-- Default value is 'Cancel',
			btnOKLabel: '<span class="glyphicon glyphicon-trash"></span> {{lang_delete}}', // <-- Default value is 'OK',
			btnOKClass: 'btn-danger', // <-- If you didn't specify it, dialog type will be used,
			callback: function (result) {
				if (result) {
					url = "?do=usblockoff&action=deleteConfig&id=" + id;
					window.location = url;
				}
			}
		});
	}
</script>