2020-02-01 01:42:02 +01:00
|
|
|
<script type="text/javascript" src="view/theme/frio/js/mod_admin.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
|
|
|
|
<link rel="stylesheet" href="view/theme/frio/css/mod_admin.css?v={{$smarty.const.FRIENDICA_VERSION}}" type="text/css" media="screen"/>
|
2018-04-18 17:52:34 +02:00
|
|
|
|
2018-04-22 23:06:06 +02:00
|
|
|
<div id="admin-users" class="adminpage generic-page-wrapper">
|
2018-04-19 18:17:46 +02:00
|
|
|
<h1>{{$title}} - {{$page}}</h1>
|
2018-04-18 17:52:34 +02:00
|
|
|
|
|
|
|
<form action="{{$baseurl}}/admin/users" method="post">
|
2018-04-18 21:43:33 +02:00
|
|
|
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
2018-04-18 17:52:34 +02:00
|
|
|
|
2018-04-22 20:23:24 +02:00
|
|
|
{{* We organize the settings in collapsable panel-groups *}}
|
|
|
|
<div class="panel-group panel-group-settings" id="admin-settings" role="tablist" aria-multiselectable="true">
|
2018-04-18 17:52:34 +02:00
|
|
|
|
2018-04-22 20:23:24 +02:00
|
|
|
<!--
|
|
|
|
**
|
|
|
|
*
|
|
|
|
* PENDING Users table
|
|
|
|
*
|
|
|
|
**
|
|
|
|
-->
|
|
|
|
<div class="panel">
|
2020-04-02 01:45:31 +02:00
|
|
|
<div class="section-subtitle-wrapper panel-heading" role="tab" id="admin-settings-pending">
|
|
|
|
<h2>
|
2018-04-22 23:06:06 +02:00
|
|
|
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#admin-settings" href="#admin-settings-pending-collapse" aria-expanded="{{if count($pending) > 0}}true{{else}}false{{/if}}" aria-controls="admin-settings-pending-collapse">
|
2018-04-22 20:23:24 +02:00
|
|
|
{{$h_pending}} ({{count($pending)}})
|
|
|
|
</a>
|
2020-04-02 01:45:31 +02:00
|
|
|
</h2>
|
2018-04-22 20:23:24 +02:00
|
|
|
</div>
|
2018-04-18 17:52:34 +02:00
|
|
|
|
2018-04-22 20:23:24 +02:00
|
|
|
<div id="admin-settings-pending-collapse" class="panel-collapse collapse {{if count($pending) > 0}}in{{/if}}" role="tabpanel" aria-labelledby="admin-settings-pending">
|
2020-04-02 01:45:31 +02:00
|
|
|
{{if $pending}}
|
2018-04-22 20:23:24 +02:00
|
|
|
<table id="pending" class="table table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2020-04-02 01:45:31 +02:00
|
|
|
<th>
|
|
|
|
<div class="checkbox">
|
|
|
|
<input type="checkbox" id="admin-settings-pending-select" class="selecttoggle" data-select-class="pending_ckbx"/>
|
|
|
|
<label for="admin-settings-pending-select"></label>
|
|
|
|
</div>
|
|
|
|
</th>
|
2018-04-22 20:23:24 +02:00
|
|
|
{{foreach $th_pending as $th}}<th>{{$th}}</th>{{/foreach}}
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2020-04-02 01:45:31 +02:00
|
|
|
{{foreach $pending as $u}}
|
2018-04-22 20:23:24 +02:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div class="checkbox">
|
|
|
|
<input type="checkbox" class="pending_ckbx" id="id_pending_{{$u.hash}}" name="pending[]" value="{{$u.hash}}" />
|
|
|
|
<label for="id_pending_{{$u.hash}}"></label>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>{{$u.created}}</td>
|
2018-12-14 04:28:12 +01:00
|
|
|
<td>{{$u.name}}</td>
|
2018-04-22 20:23:24 +02:00
|
|
|
<td>{{$u.email}}</td>
|
|
|
|
<td>
|
2020-02-21 23:31:37 +01:00
|
|
|
<a href="{{$baseurl}}/admin/users/allow/{{$u.uid}}?t={{$form_security_token}}" class="admin-settings-action-link" title="{{$approve}}"><i class="fa fa-check" aria-hidden="true"></i></a>
|
|
|
|
<a href="{{$baseurl}}/admin/users/deny/{{$u.uid}}?t={{$form_security_token}}" class="admin-settings-action-link" title="{{$deny}}"><i class="fa fa-trash-o" aria-hidden="true"></i></a>
|
2018-04-22 20:23:24 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
2020-04-02 01:45:31 +02:00
|
|
|
{{if $u.note}}
|
2018-04-22 20:23:24 +02:00
|
|
|
<tr class="details">
|
|
|
|
<td></td>
|
|
|
|
<th>{{$pendingnotetext}}</th>
|
|
|
|
<td colspan="4">{{$u.note}}</td>
|
|
|
|
</tr>
|
2020-04-02 01:45:31 +02:00
|
|
|
{{/if}}
|
|
|
|
{{/foreach}}
|
2018-04-22 20:23:24 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div class="panel-footer">
|
2020-04-02 01:45:31 +02:00
|
|
|
<button type="submit" name="page_users_deny" value="1" class="btn btn-primary">
|
|
|
|
<i class="fa fa-trash-o" aria-hidden="true"></i> {{$deny}}
|
|
|
|
</button>
|
|
|
|
<button type="submit" name="page_users_approve" value="1" class="btn btn-warinig">
|
|
|
|
<i class="fa fa-check" aria-hidden="true"></i> {{$approve}}
|
|
|
|
</button>
|
2018-04-19 18:17:46 +02:00
|
|
|
</div>
|
2020-04-02 01:45:31 +02:00
|
|
|
{{else}}
|
2018-04-22 20:23:24 +02:00
|
|
|
<div class="panel-body text-center text-muted">{{$no_pending}}</div>
|
2020-04-02 01:45:31 +02:00
|
|
|
{{/if}}
|
2018-04-22 20:23:24 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
**
|
|
|
|
*
|
|
|
|
* USERS Table
|
|
|
|
*
|
|
|
|
**
|
|
|
|
-->
|
|
|
|
<div class="panel">
|
2020-04-02 01:45:31 +02:00
|
|
|
<div class="section-subtitle-wrapper panel-heading" role="tab" id="admin-settings-user">
|
|
|
|
<h2>
|
2018-04-22 20:23:24 +02:00
|
|
|
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#admin-settings" href="#admin-settings-user-collapse" aria-expanded="false" aria-controls="admin-settings-user-collapse">
|
2018-04-23 00:26:00 +02:00
|
|
|
{{$h_users}} ({{count($users)}})
|
2018-04-22 20:23:24 +02:00
|
|
|
</a>
|
2020-04-02 01:45:31 +02:00
|
|
|
</h2>
|
2018-04-18 17:52:34 +02:00
|
|
|
</div>
|
|
|
|
|
2018-04-22 20:23:24 +02:00
|
|
|
<div id="admin-settings-user-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-user">
|
2018-04-18 17:52:34 +02:00
|
|
|
|
2020-04-02 01:45:31 +02:00
|
|
|
{{if $users}}
|
|
|
|
<table id="users" class="table table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
<div class="checkbox">
|
|
|
|
<input type="checkbox" id="admin-settings-users-select" class="selecttoggle" data-select-class="users_ckbx"/>
|
|
|
|
<label for="admin-settings-users-select"></label>
|
|
|
|
</div>
|
|
|
|
</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])) }}
|
|
|
|
<th class="th-{{$k}}">
|
|
|
|
<button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th.1}}" class="btn-link table-order">
|
|
|
|
{{if $order_users == $th.1}}
|
|
|
|
{{if $order_direction_users == "+"}}
|
|
|
|
↓
|
2018-04-22 20:23:24 +02:00
|
|
|
{{else}}
|
2020-04-02 01:45:31 +02:00
|
|
|
↑
|
2018-04-22 20:23:24 +02:00
|
|
|
{{/if}}
|
2020-04-02 01:45:31 +02:00
|
|
|
{{else}}
|
|
|
|
↕
|
|
|
|
{{/if}}
|
|
|
|
{{$th.0}}
|
|
|
|
</button>
|
|
|
|
</th>
|
|
|
|
{{/if}}
|
|
|
|
{{/foreach}}
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{foreach $users as $u}}
|
|
|
|
<tr id="user-{{$u.uid}}" class="{{if $u.blocked != 0}}blocked{{/if}}">
|
|
|
|
<td>
|
2019-01-27 04:06:51 +01:00
|
|
|
{{if $u.is_deletable}}
|
|
|
|
<div class="checkbox">
|
|
|
|
<input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/>
|
|
|
|
<label for="id_user_{{$u.uid}}"></label>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
|
2018-04-22 20:23:24 +02:00
|
|
|
{{/if}}
|
2020-04-02 01:45:31 +02:00
|
|
|
</td>
|
|
|
|
<td><img class="avatar-nano" 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>{{$u.register_date}}</td>
|
|
|
|
{{/if}}
|
2018-04-20 14:11:34 +02:00
|
|
|
|
2020-04-02 01:45:31 +02:00
|
|
|
{{if $order_users == $th_users.3.1}}
|
|
|
|
<td>{{$u.login_date}}</td>
|
|
|
|
{{/if}}
|
2018-04-18 17:52:34 +02:00
|
|
|
|
2020-04-02 01:45:31 +02:00
|
|
|
{{if $order_users == $th_users.4.1}}
|
|
|
|
<td>{{$u.lastitem_date}}</td>
|
|
|
|
{{/if}}
|
2018-04-18 17:52:34 +02:00
|
|
|
|
2020-04-02 01:45:31 +02:00
|
|
|
{{if !in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.4.1]) }}
|
|
|
|
<td>
|
|
|
|
<i class="fa
|
|
|
|
{{if $u.page_flags_raw==0}}fa-user{{/if}} {{* PAGE_NORMAL *}}
|
|
|
|
{{if $u.page_flags_raw==1}}fa-bullhorn{{/if}} {{* PAGE_SOAPBOX *}}
|
|
|
|
{{if $u.page_flags_raw==2}}fa-users{{/if}} {{* PAGE_COMMUNITY *}}
|
|
|
|
{{if $u.page_flags_raw==3}}fa-heart{{/if}} {{* PAGE_FREELOVE *}}
|
|
|
|
{{if $u.page_flags_raw==4}}fa-rss{{/if}} {{* PAGE_BLOG *}}
|
|
|
|
{{if $u.page_flags_raw==5}}fa-user-secret{{/if}} {{* PAGE_PRVGROUP *}}
|
|
|
|
" title="{{$u.page_flags}}">
|
|
|
|
</i>
|
|
|
|
{{if $u.page_flags_raw==0 && $u.account_type_raw > 0}}
|
|
|
|
<i class="fa
|
|
|
|
{{if $u.account_type_raw==1}}fa-sitemap{{/if}} {{* ACCOUNT_TYPE_ORGANISATION *}}
|
|
|
|
{{if $u.account_type_raw==2}}fa-newspaper-o{{/if}} {{* ACCOUNT_TYPE_NEWS *}}
|
|
|
|
{{if $u.account_type_raw==3}}fa-comments{{/if}} {{* ACCOUNT_TYPE_COMMUNITY *}}
|
|
|
|
" title="{{$u.account_type}}">
|
|
|
|
</i>
|
2018-04-22 20:23:24 +02:00
|
|
|
{{/if}}
|
2020-04-02 01:45:31 +02:00
|
|
|
{{if $u.is_admin}}<i class="fa fa-user-secret text-primary" title="{{$siteadmin}}"></i>{{/if}}
|
|
|
|
{{if $u.account_expired}}<i class="fa fa-clock-o text-warning" title="{{$accountexpired}}"></i>{{/if}}
|
|
|
|
</td>
|
|
|
|
{{/if}}
|
2018-04-18 17:52:34 +02:00
|
|
|
|
2020-04-02 01:45:31 +02:00
|
|
|
<td class="text-right">
|
|
|
|
<button type="button" class="btn-link admin-settings-action-link" onclick="return details({{$u.uid}})"><span class="caret"></span></button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr id="user-{{$u.uid}}-detail" class=" details hidden {{if $u.blocked != 0}}blocked{{/if}}">
|
|
|
|
<td> </td>
|
|
|
|
<td colspan="4">
|
|
|
|
{{if $order_users != $th_users.2.1}}
|
|
|
|
<p>
|
|
|
|
<button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th_users.2.1}}" class="btn-link table-order">
|
|
|
|
↕ {{$th_users.2.0}}</button> : {{$u.register_date}}
|
|
|
|
</p>
|
|
|
|
{{/if}}
|
2018-04-18 17:52:34 +02:00
|
|
|
|
2020-04-02 01:45:31 +02:00
|
|
|
{{if $order_users != $th_users.3.1}}
|
|
|
|
<p>
|
|
|
|
<button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th_users.3.1}}" class="btn-link table-order">
|
|
|
|
↕ {{$th_users.3.0}}</button> : {{$u.login_date}}
|
|
|
|
</p>
|
|
|
|
{{/if}}
|
2019-01-27 04:06:51 +01:00
|
|
|
|
2020-04-02 01:45:31 +02:00
|
|
|
{{if $order_users != $th_users.4.1}}
|
|
|
|
<p>
|
|
|
|
<button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th_users.4.1}}" class="btn-link table-order">
|
|
|
|
↕ {{$th_users.4.0}}</button> : {{$u.lastitem_date}}
|
|
|
|
</p>
|
|
|
|
{{/if}}
|
2019-01-27 04:06:51 +01:00
|
|
|
|
2020-04-02 01:45:31 +02:00
|
|
|
{{if in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.4.1]) }}
|
|
|
|
<p>
|
|
|
|
<button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th_users.5.1}}" class="btn-link table-order">
|
|
|
|
↕ {{$th_users.5.0}}</button> : {{$u.page_flags}}{{if $u.page_flags_raw==0 && $u.account_type_raw > 0}}, {{$u.account_type}}{{/if}} {{if $u.is_admin}}({{$siteadmin}}){{/if}} {{if $u.account_expired}}({{$accountexpired}}){{/if}}
|
|
|
|
</p>
|
|
|
|
{{/if}}
|
2019-01-27 04:06:51 +01:00
|
|
|
|
2020-04-02 01:45:31 +02:00
|
|
|
</td>
|
|
|
|
<td class="text-right">
|
|
|
|
{{if $u.is_deletable}}
|
|
|
|
{{if $u.blocked}}
|
|
|
|
<a href="{{$baseurl}}/admin/users/unblock/{{$u.uid}}?t={{$form_security_token}}" class="admin-settings-action-link" title="{{$unblock}}">
|
|
|
|
<i class="fa fa-circle-o" aria-hidden="true"></i>
|
|
|
|
</a>
|
|
|
|
{{else}}
|
|
|
|
<a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" class="admin-settings-action-link" title="{{$block}}">
|
|
|
|
<i class="fa fa-ban" aria-hidden="true"></i>
|
|
|
|
</a>
|
|
|
|
{{/if}}
|
|
|
|
<a href="{{$baseurl}}/admin/users/delete/{{$u.uid}}?t={{$form_security_token}}" class="admin-settings-action-link" title="{{$delete}}" onclick="return confirm_delete('{{$confirm_delete}}','{{$u.name}}')">
|
|
|
|
<i class="fa fa-trash" aria-hidden="true"></i>
|
|
|
|
</a>
|
|
|
|
{{else}}
|
|
|
|
|
|
|
|
{{/if}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/foreach}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2018-04-22 20:23:24 +02:00
|
|
|
<div class="panel-footer">
|
2020-04-02 01:45:31 +02:00
|
|
|
<button type="submit" name="page_users_block" value="1" class="btn btn-warning">
|
|
|
|
<i class="fa fa-ban" aria-hidden="true"></i> {{$block}}
|
|
|
|
</button>
|
|
|
|
<button type="submit" name="page_users_unblock" value="1" class="btn btn-default">
|
|
|
|
<i class="fa fa-circle-o" aria-hidden="true"></i> {{$unblock}}
|
|
|
|
</button>
|
|
|
|
<button type="submit" name="page_users_delete" value="1" class="btn btn-danger" onclick="return confirm_delete('{{$confirm_delete_multi}}')">
|
|
|
|
<i class="fa fa-trash" aria-hidden="true"></i> {{$delete}}
|
|
|
|
</button>
|
2018-04-19 18:17:46 +02:00
|
|
|
</div>
|
2020-04-02 01:45:31 +02:00
|
|
|
{{else}}
|
|
|
|
<div class="panel-body text-center bg-danger">NO USERS?!?</div>
|
|
|
|
{{/if}}
|
2018-04-19 18:17:46 +02:00
|
|
|
</div>
|
2018-04-18 17:52:34 +02:00
|
|
|
</div>
|
|
|
|
|
2018-04-22 20:23:24 +02:00
|
|
|
<!--
|
|
|
|
**
|
|
|
|
*
|
|
|
|
* DELETED Users table
|
|
|
|
*
|
|
|
|
**
|
|
|
|
-->
|
|
|
|
{{if $deleted}}
|
|
|
|
<div class="panel">
|
2020-04-02 01:45:31 +02:00
|
|
|
<div class="section-subtitle-wrapper panel-heading" role="tab" id="admin-settings-deleted">
|
|
|
|
<h2>
|
2018-04-22 20:23:24 +02:00
|
|
|
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#admin-settings" href="#admin-settings-deleted-collapse" aria-expanded="false" aria-controls="admin-settings-deleted-collapse">
|
|
|
|
{{$h_deleted}} ({{count($deleted)}})
|
|
|
|
</a>
|
2020-04-02 01:45:31 +02:00
|
|
|
</h2>
|
2018-04-22 20:23:24 +02:00
|
|
|
</div>
|
2018-04-18 17:52:34 +02:00
|
|
|
|
2018-04-22 20:23:24 +02:00
|
|
|
<div id="admin-settings-deleted-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-deleted">
|
|
|
|
<table id="deleted" class="table table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th></th>
|
|
|
|
{{foreach $th_deleted as $k=>$th}}
|
|
|
|
{{if in_array($k,[0,1,5])}}
|
|
|
|
<th>{{$th}}</th>
|
|
|
|
{{/if}}
|
|
|
|
{{/foreach}}
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{foreach $deleted as $u}}
|
|
|
|
<tr>
|
2018-12-14 04:28:12 +01:00
|
|
|
<td><img class="avatar-nano" src="{{$u.micro}}" title="{{$u.nickname}}"></td>
|
|
|
|
<td><a href="{{$u.url}}" title="{{$u.nickname}}" >{{$u.name}}</a></td>
|
2018-04-22 20:23:24 +02:00
|
|
|
<td>{{$u.email}}</td>
|
|
|
|
<td>{{$u.deleted}}</td>
|
|
|
|
</tr>
|
|
|
|
{{/foreach}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2018-04-18 17:52:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-22 20:23:24 +02:00
|
|
|
<!--
|
|
|
|
**
|
|
|
|
*
|
|
|
|
* NEW USER Form
|
|
|
|
*
|
|
|
|
**
|
|
|
|
-->
|
|
|
|
<div class="panel">
|
2020-04-02 01:45:31 +02:00
|
|
|
<div class="section-subtitle-wrapper panel-heading" role="tab" id="admin-settings-new-user">
|
|
|
|
<h2>
|
2018-04-22 20:23:24 +02:00
|
|
|
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#admin-settings" href="#admin-settings-new-user-collapse" aria-expanded="false" aria-controls="admin-settings-new-user-collapse">
|
|
|
|
{{$h_newuser}}
|
|
|
|
</a>
|
2020-04-02 01:45:31 +02:00
|
|
|
</h2>
|
2018-04-22 20:23:24 +02:00
|
|
|
</div>
|
2018-04-18 17:52:34 +02:00
|
|
|
|
2018-04-22 20:23:24 +02:00
|
|
|
<div id="admin-settings-new-user-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-new-user">
|
|
|
|
<div class="panel-body">
|
|
|
|
{{include file="field_input.tpl" field=$newusername}}
|
|
|
|
{{include file="field_input.tpl" field=$newusernickname}}
|
|
|
|
{{include file="field_input.tpl" field=$newuseremail}}
|
|
|
|
</div>
|
2020-04-02 01:45:31 +02:00
|
|
|
<div class="panel-footer">
|
2018-04-22 20:23:24 +02:00
|
|
|
<button type="submit" class="btn btn-primary">{{$submit}}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-19 18:17:46 +02:00
|
|
|
</div>
|
2018-04-18 17:52:34 +02:00
|
|
|
</div>
|
2018-04-19 18:17:46 +02:00
|
|
|
</form>
|
|
|
|
</div>
|