Frio: admin/users template
- move checkboxes on first column - move select/deselect all as button group on panel footer - use existing jquery in mod_admin.js for select/deselect all functionality - add page content wrapper, without padding - fix user avatar size in "pending deletion" table
This commit is contained in:
parent
20a2918bda
commit
e909beee04
3 changed files with 65 additions and 49 deletions
|
@ -1,4 +1,6 @@
|
||||||
|
|
||||||
|
#admin-users.adminpage { padding-left:0; padding-right: 0;}
|
||||||
|
#admin-users.adminpage > h1 { padding: 0 15px; }
|
||||||
#users img.icon, #deleted img.icon { height: 24px; }
|
#users img.icon, #deleted img.icon { height: 24px; }
|
||||||
.opened .caret { transform: rotate(180deg); }
|
.opened .caret { transform: rotate(180deg); }
|
||||||
tr.details td,
|
tr.details td,
|
||||||
|
|
|
@ -20,25 +20,24 @@ $(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function selectall(cls) {
|
||||||
|
$('.' + cls).prop('checked', true);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
function selectnone(cls) {
|
||||||
|
$('.' + cls).prop('checked', false);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function selectall(cls) {
|
|
||||||
$('.' + cls).prop('checked', true);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
function selectnone(cls) {
|
|
||||||
$('.' + cls).prop('checked', false);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Users
|
// Users
|
||||||
function confirm_delete(uname){
|
function confirm_delete(msg, uname){
|
||||||
return confirm( "{{$confirm_delete}}".format(uname));
|
return confirm(msg.format(uname));
|
||||||
}
|
|
||||||
function confirm_delete_multi(){
|
|
||||||
return confirm("{{$confirm_delete_multi}}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function details(uid) {
|
function details(uid) {
|
||||||
$("#user-"+uid+"-detail").toggleClass("hidden");
|
$("#user-"+uid+"-detail").toggleClass("hidden");
|
||||||
$("#user-"+uid).toggleClass("opened");
|
$("#user-"+uid).toggleClass("opened");
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
<link rel="stylesheet" href="view/theme/frio/css/mod_admin.css" type="text/css" media="screen"/>
|
<link rel="stylesheet" href="view/theme/frio/css/mod_admin.css" type="text/css" media="screen"/>
|
||||||
|
|
||||||
<div id="admin-users" class="adminpage generic-page-wrapper">
|
<div id="admin-users" class="adminpage generic-page-wrapper">
|
||||||
<div class="panel panel-default">
|
<h1>{{$title}} - {{$page}}</h1>
|
||||||
<div class="panel-body"><h1>{{$title}} - {{$page}}</h1></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form action="{{$baseurl}}/admin/users" method="post">
|
<form action="{{$baseurl}}/admin/users" method="post">
|
||||||
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||||
|
@ -24,36 +22,44 @@
|
||||||
<table id="pending" class="table table-hover">
|
<table id="pending" class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th></th>
|
||||||
{{foreach $th_pending as $th}}<th>{{$th}}</th>{{/foreach}}
|
{{foreach $th_pending as $th}}<th>{{$th}}</th>{{/foreach}}
|
||||||
<th>
|
|
||||||
<a href="#" onclick="return selectall('pending_ckbx');"><i class="fa fa-check-square-o" aria-hidden="true"></i></a>
|
|
||||||
<a href="#" onclick="return selectnone('pending_ckbx');"><i class="fa fa-square-o" aria-hidden="true"></i></a>
|
|
||||||
</th>
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{foreach $pending as $u}}
|
{{foreach $pending as $u}}
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><input type="checkbox" class="pending_ckbx" id="id_pending_{{$u.hash}}" name="pending[]" value="{{$u.hash}}" /></td>
|
||||||
<td>{{$u.created}}</td>
|
<td>{{$u.created}}</td>
|
||||||
<td >{{$u.name}}</td>
|
<td>{{$u.name}}</td>
|
||||||
<td>{{$u.email}}</td>
|
<td>{{$u.email}}</td>
|
||||||
<td ><input type="checkbox" class="pending_ckbx" id="id_pending_{{$u.hash}}" name="pending[]" value="{{$u.hash}}" /></td>
|
|
||||||
<td>
|
<td>
|
||||||
<a href="{{$baseurl}}/regmod/allow/{{$u.hash}}" title="{{$approve}}"><i class="fa fa-thumbs-up" aria-hidden="true"></i></a>
|
<a href="{{$baseurl}}/regmod/allow/{{$u.hash}}" title="{{$approve}}"><i class="fa fa-thumbs-up" aria-hidden="true"></i></a>
|
||||||
<a href="{{$baseurl}}/regmod/deny/{{$u.hash}}" title="{{$deny}}"><i class="fa fa-thumbs-down" aria-hidden="true"></i></a>
|
<a href="{{$baseurl}}/regmod/deny/{{$u.hash}}" title="{{$deny}}"><i class="fa fa-thumbs-down" aria-hidden="true"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="details">
|
<tr class="details">
|
||||||
|
<td></td>
|
||||||
<th>{{$pendingnotetext}}</th>
|
<th>{{$pendingnotetext}}</th>
|
||||||
<td colspan="4">{{$u.note}}</td>
|
<td colspan="4">{{$u.note}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="panel-footer text-right">
|
<div class="panel-footer">
|
||||||
<button type="submit" name="page_users_deny" class="btn btn-primary"><i class="fa fa-thumbs-down" aria-hidden="true"></i> {{$deny}}</button>
|
<div class="row">
|
||||||
<button type="submit" name="page_users_approve" class="btn btn-warinig"><i class="fa fa-thumbs-up" aria-hidden="true"></i> {{$approve}}</button>
|
<div class="col-md-6">
|
||||||
|
<div class="btn-group" role="group">
|
||||||
|
<button type="button" class="btn btn-default selectall" data-select-all="pending_ckbx"><i class="fa fa-check-square-o" aria-hidden="true"></i></button>
|
||||||
|
<button type="button" class="btn btn-default selectnone" data-select-none="pending_ckbx"><i class="fa fa-square-o" aria-hidden="true"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<button type="submit" name="page_users_deny" class="btn btn-primary"><i class="fa fa-thumbs-down" aria-hidden="true"></i> {{$deny}}</button>
|
||||||
|
<button type="submit" name="page_users_approve" class="btn btn-warinig"><i class="fa fa-thumbs-up" aria-hidden="true"></i> {{$approve}}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="panel-body text-center text-muted">{{$no_pending}}</div>
|
<div class="panel-body text-center text-muted">{{$no_pending}}</div>
|
||||||
|
@ -74,10 +80,7 @@
|
||||||
<table id="users" class="table table-hover">
|
<table id="users" class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th></th>
|
||||||
<a href="#" onclick="return selectall('users_ckbx');"><i class="fa fa-check-square-o" aria-hidden="true"></i></a>
|
|
||||||
<a href="#" onclick="return selectnone('users_ckbx');"><i class="fa fa-square-o" aria-hidden="true"></i></a>
|
|
||||||
</th>
|
|
||||||
<th></th>
|
<th></th>
|
||||||
{{foreach $th_users as $k=>$th}}
|
{{foreach $th_users as $k=>$th}}
|
||||||
{{if $k < 2 || $order_users == $th.1 || ($k==5 && !in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.4.1])) }}
|
{{if $k < 2 || $order_users == $th.1 || ($k==5 && !in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.4.1])) }}
|
||||||
|
@ -164,7 +167,7 @@
|
||||||
<i class="fa fa-circle-o" aria-hidden="true"></i>
|
<i class="fa fa-circle-o" aria-hidden="true"></i>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</a>
|
</a>
|
||||||
<a href="{{$baseurl}}/admin/users/delete/{{$u.uid}}?t={{$form_security_token}}" title="{{$delete}}" onclick="return confirm_delete('{{$u.name}}')"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
<a href="{{$baseurl}}/admin/users/delete/{{$u.uid}}?t={{$form_security_token}}" title="{{$delete}}" onclick="return confirm_delete('{{$confirm_delete}}','{{$u.name}}')"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -173,9 +176,19 @@
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="panel-footer text-right">
|
<div class="panel-footer">
|
||||||
<button type="submit" name="page_users_block" class="btn btn-warning"> <i class="fa fa-ban" aria-hidden="true"></i> {{$block}} / <i class="fa fa-circle-o" aria-hidden="true"></i> {{$unblock}}</button>
|
<div class="row">
|
||||||
<button type="submit" name="page_users_delete" class="btn btn-danger" onclick="return confirm_delete_multi()"><i class="fa fa-trash" aria-hidden="true"></i> {{$delete}}</button>
|
<div class="col-md-6">
|
||||||
|
<div class="btn-group" role="group">
|
||||||
|
<button type="button" class="btn btn-default selectall" data-select-all="users_ckbx"><i class="fa fa-check-square-o" aria-hidden="true"></i></button>
|
||||||
|
<button type="button" class="btn btn-default selectnone" data-select-none="users_ckbx"><i class="fa fa-square-o" aria-hidden="true"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 text-right">
|
||||||
|
<button type="submit" name="page_users_block" class="btn btn-warning"> <i class="fa fa-ban" aria-hidden="true"></i> {{$block}} / <i class="fa fa-circle-o" aria-hidden="true"></i> {{$unblock}}</button>
|
||||||
|
<button type="submit" name="page_users_delete" class="btn btn-danger" onclick="return confirm_delete('{{$confirm_delete_multi}}')"><i class="fa fa-trash" aria-hidden="true"></i> {{$delete}}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="panel-body text-center bg-danger">NO USERS?!?</div>
|
<div class="panel-body text-center bg-danger">NO USERS?!?</div>
|
||||||
|
@ -214,7 +227,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
{{foreach $deleted as $u}}
|
{{foreach $deleted as $u}}
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="{{$u.micro}}" title="{{$u.nickname}}"></td>
|
<td><img class="icon" src="{{$u.micro}}" title="{{$u.nickname}}"></td>
|
||||||
<td><a href="{{$u.url}}" title="{{$u.nickname}}" >{{$u.name}}</a></td>
|
<td><a href="{{$u.url}}" title="{{$u.nickname}}" >{{$u.name}}</a></td>
|
||||||
<td>{{$u.email}}</td>
|
<td>{{$u.email}}</td>
|
||||||
<td>{{$u.deleted}}</td>
|
<td>{{$u.deleted}}</td>
|
||||||
|
@ -234,18 +247,20 @@
|
||||||
*
|
*
|
||||||
**
|
**
|
||||||
-->
|
-->
|
||||||
<form action="{{$baseurl}}/admin/users" method="post">
|
<form action="{{$baseurl}}/admin/users" method="post">
|
||||||
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><h3 class="panel-title">{{$h_newuser}}</h3></div>
|
<div class="panel-heading"><h3 class="panel-title">{{$h_newuser}}</h3></div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{{include file="field_input.tpl" field=$newusername}}
|
{{include file="field_input.tpl" field=$newusername}}
|
||||||
{{include file="field_input.tpl" field=$newusernickname}}
|
{{include file="field_input.tpl" field=$newusernickname}}
|
||||||
{{include file="field_input.tpl" field=$newuseremail}}
|
{{include file="field_input.tpl" field=$newuseremail}}
|
||||||
|
</div>
|
||||||
|
<div class="panel-footer text-right">
|
||||||
|
<button type="submit" class="btn btn-primary">{{$submit}}</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-footer text-right">
|
</form>
|
||||||
<button type="submit" class="btn btn-primary">{{$submit}}</button>
|
|
||||||
</form>
|
</div>
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
Loading…
Reference in a new issue