summaryrefslogblamecommitdiffstats
path: root/modules-available/usblockoff/templates/usb-configuration-table.html
blob: dc8254df1d66bcc6fbaada72cf0450888f66c771 (plain) (tree)
1
2
3
4
5
6
7
8
9







                                                              
    




































                                                                                                                                                             

















                                                                                                    
                                                                                                                                                              

                                                                       




                                                                                                                                                                     




                                                                                



                                                                                                                                                             



                                                                                                                                                                                     
                                                                                                       


































                                                                                                                                                               


              
 





















                                                                                                                                    
<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>