Frio: admin/user template fixes
- small fixes to html - move js and css to extern files - move checkboxes to first column
This commit is contained in:
parent
362654abf0
commit
20a2918bda
6
view/theme/frio/css/mod_admin.css
Normal file
6
view/theme/frio/css/mod_admin.css
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
#users img.icon, #deleted img.icon { height: 24px; }
|
||||
.opened .caret { transform: rotate(180deg); }
|
||||
tr.details td,
|
||||
tr.details th
|
||||
{ border-top: 0!important; }
|
|
@ -20,12 +20,27 @@ $(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
|
||||
function confirm_delete(uname){
|
||||
return confirm( "{{$confirm_delete}}".format(uname));
|
||||
}
|
||||
function confirm_delete_multi(){
|
||||
return confirm("{{$confirm_delete_multi}}");
|
||||
}
|
||||
function details(uid) {
|
||||
$("#user-"+uid+"-detail").toggleClass("hidden");
|
||||
$("#user-"+uid).toggleClass("opened");
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,35 +1,13 @@
|
|||
<script>
|
||||
function confirm_delete(uname){
|
||||
return confirm( "{{$confirm_delete}}".format(uname));
|
||||
}
|
||||
function confirm_delete_multi(){
|
||||
return confirm("{{$confirm_delete_multi}}");
|
||||
}
|
||||
function selectall(cls){
|
||||
$("."+cls).prop("checked", true);
|
||||
return false;
|
||||
}
|
||||
function unselectall(cls){
|
||||
$("."+cls).prop("checked", false);
|
||||
return false;
|
||||
}
|
||||
function details(uid) {
|
||||
$("#user-"+uid+"-detail").toggleClass("hidden");
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
tr.details td,
|
||||
tr.details th
|
||||
{ border-top: 0!important; }
|
||||
</style>
|
||||
<script type="text/javascript" src="view/theme/frio/js/mod_admin.js"></script>
|
||||
<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 class="panel panel-default">
|
||||
<div class="panel-body"><h1>{{$title}} - {{$page}}</h1></div>
|
||||
</div>
|
||||
|
||||
<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}}">
|
||||
|
||||
|
||||
<!--
|
||||
|
@ -43,13 +21,13 @@
|
|||
<div class="panel-heading"><h3 class="panel-title">{{$h_pending}}</h3></div>
|
||||
|
||||
{{if $pending}}
|
||||
<table id='pending' class="table table-hover">
|
||||
<table id="pending" class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
{{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 unselectall('pending_ckbx');"><i class="fa fa-square-o" aria-hidden="true"></i></a>
|
||||
<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>
|
||||
</tr>
|
||||
|
@ -62,8 +40,8 @@
|
|||
<td>{{$u.email}}</td>
|
||||
<td ><input type="checkbox" class="pending_ckbx" id="id_pending_{{$u.hash}}" name="pending[]" value="{{$u.hash}}" /></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/deny/{{$u.hash}}" title='{{$deny}}'><i class="fa fa-thumbs-down" 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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="details">
|
||||
|
@ -93,9 +71,13 @@
|
|||
<div class="panel-heading"><h3 class="panel-title">{{$h_users}}</h3></div>
|
||||
{{if $users}}
|
||||
|
||||
<table id='users' class="table table-hover">
|
||||
<table id="users" class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
{{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])) }}
|
||||
|
@ -114,42 +96,39 @@
|
|||
</th>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
<th>
|
||||
<a href='#' onclick="return selectall('users_ckbx');"><i class="fa fa-check-square-o" aria-hidden="true"></i></a>
|
||||
<a href='#' onclick="return unselectall('users_ckbx');"><i class="fa fa-square-o" aria-hidden="true"></i></a>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{foreach $users as $u}}
|
||||
<tr id="user-{{$u.uid}}">
|
||||
<td><img class='icon' src="{{$u.micro}}" title="{{$u.nickname}}"></td>
|
||||
<td>
|
||||
{{if $u.is_deletable}}
|
||||
<input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/>
|
||||
{{else}}
|
||||
|
||||
{{/if}}
|
||||
</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>{{$u.email}}</td>
|
||||
{{if $order_users == $th_users.2.1}}
|
||||
<td class='register_date'>{{$u.register_date}}</td>
|
||||
<td>{{$u.register_date}}</td>
|
||||
{{/if}}
|
||||
|
||||
{{if $order_users == $th_users.3.1}}
|
||||
<td class='login_date'>{{$u.login_date}}</td>
|
||||
<td>{{$u.login_date}}</td>
|
||||
{{/if}}
|
||||
|
||||
{{if $order_users == $th_users.4.1}}
|
||||
<td class='lastitem_date'>{{$u.lastitem_date}}</td>
|
||||
<td>{{$u.lastitem_date}}</td>
|
||||
{{/if}}
|
||||
|
||||
{{if !in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.4.1]) }}
|
||||
<td>{{$u.page_flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}} {{if $u.account_expired}}({{$accountexpired}}){{/if}}</td>
|
||||
{{/if}}
|
||||
<td>
|
||||
{{if $u.is_deletable}}
|
||||
<input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/></td>
|
||||
{{else}}
|
||||
|
||||
{{/if}}
|
||||
<td class="text-right">
|
||||
<a href="#" onclick="return details({{$u.uid}})"><i class="fa fa-bars" aria-hidden="true"></i>
|
||||
<a href="#" onclick="return details({{$u.uid}})"><span class="caret"></span></i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="user-{{$u.uid}}-detail" class="hidden details">
|
||||
|
@ -178,14 +157,14 @@
|
|||
</td>
|
||||
<td class="text-right">
|
||||
{{if $u.is_deletable}}
|
||||
<a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" title='{{if $u.blocked}}{{$unblock}}{{else}}{{$block}}{{/if}}'>
|
||||
<a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" title="{{if $u.blocked}}{{$unblock}}{{else}}{{$block}}{{/if}}">
|
||||
{{if $u.blocked==0}}
|
||||
<i class="fa fa-ban" aria-hidden="true"></i>
|
||||
{{else}}
|
||||
<i class="fa fa-circle-o" aria-hidden="true"></i>
|
||||
{{/if}}
|
||||
</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('{{$u.name}}')"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
||||
{{else}}
|
||||
|
||||
{{/if}}
|
||||
|
@ -221,7 +200,7 @@
|
|||
{{if $deleted}}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h3 class="panel-title">{{$h_deleted}}</h3></div>
|
||||
<table id='deleted' class="table table-hover">
|
||||
<table id="deleted" class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
@ -256,7 +235,7 @@
|
|||
**
|
||||
-->
|
||||
<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-heading"><h3 class="panel-title">{{$h_newuser}}</h3></div>
|
||||
|
|
Loading…
Reference in a new issue