first commit
This commit is contained in:
@@ -0,0 +1,206 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-api" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
|
||||
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_form }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-api" class="form-horizontal">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
|
||||
<li><a href="#tab-ip" data-toggle="tab">{{ tab_ip }}</a></li>
|
||||
<li><a href="#tab-session" data-toggle="tab">{{ tab_session }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab-general">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-username">{{ entry_username }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="username" value="{{ username }}" placeholder="{{ entry_username }}" id="input-username" class="form-control" />
|
||||
{% if error_username %}
|
||||
<div class="text-danger">{{ error_username }}</div>
|
||||
{% endif %} </div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-key">{{ entry_key }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="key" placeholder="{{ entry_key }}" rows="5" id="input-key" class="form-control">{{ key }}</textarea>
|
||||
<br />
|
||||
<button type="button" id="button-generate" class="btn btn-primary"><i class="fa fa-refresh"></i> {{ button_generate }}</button>
|
||||
{% if error_key %}
|
||||
<div class="text-danger">{{ error_key }}</div>
|
||||
{% endif %} </div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="status" id="input-status" class="form-control">
|
||||
|
||||
{% if status %}
|
||||
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
|
||||
{% else %}
|
||||
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-ip">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_ip }}</div>
|
||||
<div class="table-responsive">
|
||||
<table id="ip" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_ip }}</td>
|
||||
<td class="text-left"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% set ip_row = 0 %}
|
||||
{% for api_ip in api_ips %}
|
||||
<tr id="ip-row{{ ip_row }}">
|
||||
<td class="text-left"><input type="text" name="api_ip[]" value="{{ api_ip.ip }}" placeholder="{{ entry_ip }}" class="form-control" /></td>
|
||||
<td class="text-left"><button type="button" onclick="$('#ip-row{{ ip_row }}').remove()" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
{% set ip_row = ip_row + 1 %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="text-left"><button type="button" onclick="addIp()" data-toggle="tooltip" title="{{ button_ip_add }}" class="btn btn-primary"><i class="fa fa-plus-circle"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-session">
|
||||
<div class="table-responsive">
|
||||
<table id="session" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ column_token }}</td>
|
||||
<td class="text-left">{{ column_ip }}</td>
|
||||
<td class="text-left">{{ column_date_added }}</td>
|
||||
<td class="text-left">{{ column_date_modified }}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% if api_sessions %}
|
||||
{% for api_session in api_sessions %}
|
||||
<tr>
|
||||
<td class="text-left">{{ api_session.session_id }}</td>
|
||||
<td class="text-left">{{ api_session.ip }}</td>
|
||||
<td class="text-left">{{ api_session.date_added }}</td>
|
||||
<td class="text-left">{{ api_session.date_modified }}</td>
|
||||
<td class="text-right"><button type="button" value="{{ api_session.api_session_id }}" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="5">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-generate').on('click', function() {
|
||||
rand = '';
|
||||
|
||||
string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
rand += string[Math.floor(Math.random() * (string.length - 1))];
|
||||
}
|
||||
|
||||
$('#input-key').val(rand);
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
var ip_row = {{ ip_row }};
|
||||
|
||||
function addIp() {
|
||||
html = '<tr id="ip-row' + ip_row + '">';
|
||||
html += ' <td class="text-right"><input type="text" name="api_ip[]" value="" placeholder="{{ entry_ip }}" class="form-control" /></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#ip-row' + ip_row + '\').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#ip tbody').append(html);
|
||||
|
||||
ip_row++;
|
||||
}
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#session button').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var node = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=user/api/deletesession&user_token={{ user_token }}&api_session_id=' + $(node).val(),
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(node).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(node).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#tab-session').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#tab-session').prepend('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
|
||||
$(node).parent().parent().remove();
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,94 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right"><a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></a>
|
||||
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-api').submit() : false;"><i class="fa fa-trash-o"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-api">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
|
||||
<td class="text-left">{% if sort == 'username' %}
|
||||
<a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_username }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_name }}">{{ column_username }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'status' %}
|
||||
<a href="{{ sort_status }}" class="{{ order|lower }}">{{ column_status }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_status }}">{{ column_status }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'date_added' %}
|
||||
<a href="{{ sort_date_added }}" class="{{ order|lower }}">{{ column_date_added }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_date_added }}">{{ column_date_added }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'date_modified' %}
|
||||
<a href="{{ sort_date_modified }}" class="{{ order|lower }}">{{ column_date_modified }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_date_modified }}">{{ column_date_modified }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if apis %}
|
||||
{% for api in apis %}
|
||||
<tr>
|
||||
<td class="text-center">{% if api.api_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ api.api_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ api.api_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ api.username }}</td>
|
||||
<td class="text-left">{{ api.status }}</td>
|
||||
<td class="text-left">{{ api.date_added }}</td>
|
||||
<td class="text-left">{{ api.date_modified }}</td>
|
||||
<td class="text-right"><a href="{{ api.edit }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="6">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-left">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-right">{{ results }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,121 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-user" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
|
||||
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_form }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-user" class="form-horizontal">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-username">{{ entry_username }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="username" value="{{ username }}" placeholder="{{ entry_username }}" id="input-username" class="form-control" />
|
||||
{% if error_username %}
|
||||
<div class="text-danger">{{ error_username }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-user-group">{{ entry_user_group }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="user_group_id" id="input-user-group" class="form-control">
|
||||
{% for user_group in user_groups %}
|
||||
{% if user_group.user_group_id == user_group_id %}
|
||||
<option value="{{ user_group.user_group_id }}" selected="selected">{{ user_group.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ user_group.user_group_id }}">{{ user_group.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-firstname">{{ entry_firstname }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="firstname" value="{{ firstname }}" placeholder="{{ entry_firstname }}" id="input-firstname" class="form-control" />
|
||||
{% if error_firstname %}
|
||||
<div class="text-danger">{{ error_firstname }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-lastname">{{ entry_lastname }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-lastname" class="form-control" />
|
||||
{% if error_lastname %}
|
||||
<div class="text-danger">{{ error_lastname }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-email">{{ entry_email }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
|
||||
{% if error_email %}
|
||||
<div class="text-danger">{{ error_email }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-image">{{ entry_image }}</label>
|
||||
<div class="col-sm-10"><a href="" id="thumb-image" data-toggle="image" class="img-thumbnail"><img src="{{ thumb }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a>
|
||||
<input type="hidden" name="image" value="{{ image }}" id="input-image" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-password">{{ entry_password }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" name="password" value="{{ password }}" placeholder="{{ entry_password }}" id="input-password" class="form-control" autocomplete="off" />
|
||||
{% if error_password %}
|
||||
<div class="text-danger">{{ error_password }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-confirm">{{ entry_confirm }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" name="confirm" value="{{ confirm }}" placeholder="{{ entry_confirm }}" id="input-confirm" class="form-control" />
|
||||
{% if error_confirm %}
|
||||
<div class="text-danger">{{ error_confirm }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="status" id="input-status" class="form-control">
|
||||
{% if status %}
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
{% else %}
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,102 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-user-group" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
|
||||
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_form }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-user-group" class="form-horizontal">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-name">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" value="{{ name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control" />
|
||||
{% if error_name %}
|
||||
<div class="text-danger">{{ error_name }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_access }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="well well-sm" style="height: 150px; overflow: auto;">
|
||||
{% for permission in permissions %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{% if permission in access %}
|
||||
<input type="checkbox" name="permission[access][]" value="{{ permission }}" checked="checked" />
|
||||
{{ permission }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="permission[access][]" value="{{ permission }}" />
|
||||
{{ permission }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<button type="button" onclick="$(this).parent().find(':checkbox').prop('checked', true);" class="btn btn-link">{{ text_select_all }}</button> / <button type="button" onclick="$(this).parent().find(':checkbox').prop('checked', false);" class="btn btn-link">{{ text_unselect_all }}</button></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_modify }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="well well-sm" style="height: 150px; overflow: auto;">
|
||||
{% for permission in permissions %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{% if permission in modify %}
|
||||
<input type="checkbox" name="permission[modify][]" value="{{ permission }}" checked="checked" />
|
||||
{{ permission }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="permission[modify][]" value="{{ permission }}" />
|
||||
{{ permission }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<button type="button" onclick="$(this).parent().find(':checkbox').prop('checked', true);" class="btn btn-link">{{ text_select_all }}</button> / <button type="button" onclick="$(this).parent().find(':checkbox').prop('checked', false);" class="btn btn-link">{{ text_unselect_all }}</button></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="{{ help_hide }}">{{ entry_hide }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="well well-sm" style="height: 150px; overflow: auto;">
|
||||
{% for hide in hiden %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{% if hide in ishide %}
|
||||
<input type="checkbox" name="permission[hiden][]" value="{{ hide }}" checked="checked" />
|
||||
{{ hide }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="permission[hiden][]" value="{{ hide }}" />
|
||||
{{ hide }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<button type="button" onclick="$(this).parent().find(':checkbox').prop('checked', true);" class="btn btn-link">{{ text_select_all }}</button> / <button type="button" onclick="$(this).parent().find(':checkbox').prop('checked', false);" class="btn btn-link">{{ text_unselect_all }}</button></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,76 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right"><a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></a>
|
||||
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-user-group').submit() : false;"><i class="fa fa-trash-o"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-user-group">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
|
||||
<td class="text-left">{% if sort == 'name' %}
|
||||
<a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_name }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_name }}">{{ column_name }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if user_groups %}
|
||||
{% for user_group in user_groups %}
|
||||
<tr>
|
||||
<td class="text-center">{% if user_group.user_group_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ user_group.user_group_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ user_group.user_group_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ user_group.name }}</td>
|
||||
<td class="text-right"><a href="{{ user_group.edit }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="3">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-left">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-right">{{ results }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,88 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right"><a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></a>
|
||||
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-user').submit() : false;"><i class="fa fa-trash-o"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-user">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
|
||||
<td class="text-left">{% if sort == 'username' %}
|
||||
<a href="{{ sort_username }}" class="{{ order|lower }}">{{ column_username }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_username }}">{{ column_username }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'status' %}
|
||||
<a href="{{ sort_status }}" class="{{ order|lower }}">{{ column_status }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_status }}">{{ column_status }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'date_added' %}
|
||||
<a href="{{ sort_date_added }}" class="{{ order|lower }}">{{ column_date_added }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_date_added }}">{{ column_date_added }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if users %}
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td class="text-center">{% if user.user_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ user.user_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ user.user_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ user.username }}</td>
|
||||
<td class="text-left">{{ user.status }}</td>
|
||||
<td class="text-left">{{ user.date_added }}</td>
|
||||
<td class="text-right"><a href="{{ user.edit }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="5">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-left">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-right">{{ results }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
Reference in New Issue
Block a user