]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/templates/admin/users.tpl
Merge pull request #5792 from MrPetovan/task/add-cache-console
[friendica.git] / view / theme / frio / templates / admin / users.tpl
1 <script type="text/javascript" src="view/theme/frio/js/mod_admin.js"></script>
2 <link rel="stylesheet" href="view/theme/frio/css/mod_admin.css" type="text/css" media="screen"/>
3
4 <div id="admin-users" class="adminpage generic-page-wrapper">
5         <h1>{{$title}} - {{$page}}</h1>
6
7         <form action="{{$baseurl}}/admin/users" method="post">
8                 <input type="hidden" name="form_security_token" value="{{$form_security_token}}">
9
10                 {{* We organize the settings in collapsable panel-groups *}}
11                 <div class="panel-group panel-group-settings" id="admin-settings" role="tablist" aria-multiselectable="true">
12
13                         <!--
14                                 **
15                                 *
16                                 *               PENDING Users table
17                                 *
18                                 **
19                         -->
20                         <div class="panel">
21                                 <div class="section-subtitle-wrapper" role="tab" id="admin-settings-pending">
22                                         <h4>
23                                                 <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">
24                                                         {{$h_pending}} ({{count($pending)}})
25                                                 </a>
26                                         </h4>
27                                 </div>
28
29                                 <div id="admin-settings-pending-collapse" class="panel-collapse collapse {{if count($pending) > 0}}in{{/if}}" role="tabpanel" aria-labelledby="admin-settings-pending">
30                                         {{if $pending}}
31                                         <table id="pending" class="table table-hover">
32                                                 <thead>
33                                                         <tr>
34                                                                 <th></th>
35                                                                 {{foreach $th_pending as $th}}<th>{{$th}}</th>{{/foreach}}
36                                                                 <th></th>
37                                                         </tr>
38                                                 </thead>
39                                                 <tbody>
40                                                 {{foreach $pending as $u}}
41                                                         <tr>
42                                                                 <td>
43                                                                         <div class="checkbox">
44                                                                                 <input type="checkbox" class="pending_ckbx" id="id_pending_{{$u.hash}}" name="pending[]" value="{{$u.hash}}" />
45                                                                                 <label for="id_pending_{{$u.hash}}"></label>
46                                                                         </div>
47                                                                 </td>
48                                                                 <td>{{$u.created}}</td>
49                                                                 <td>{{$u.name}}</td>
50                                                                 <td>{{$u.email}}</td>
51                                                                 <td>
52                                                                         <a href="{{$baseurl}}/regmod/allow/{{$u.hash}}" class="admin-settings-action-link" title="{{$approve}}"><i class="fa fa-check" aria-hidden="true"></i></a>
53                                                                         <a href="{{$baseurl}}/regmod/deny/{{$u.hash}}" class="admin-settings-action-link" title="{{$deny}}"><i class="fa fa-trash-o" aria-hidden="true"></i></a>
54                                                                 </td>
55                                                         </tr>
56                                                         {{if $u.note}}
57                                                         <tr class="details">
58                                                                 <td></td>
59                                                                 <th>{{$pendingnotetext}}</th>
60                                                                 <td colspan="4">{{$u.note}}</td>
61                                                         </tr>
62                                                         {{/if}}
63                                                 {{/foreach}}
64                                                 </tbody>
65                                         </table>
66                                         <div class="panel-footer">
67                                                 <div class="row">
68                                                         <div class="col-xs-3 admin-settings-footer-elements">
69                                                                 <div class="checkbox">
70                                                                         <input type="checkbox" id="admin-settings-pending-select" class="selecttoggle" data-select-class="pending_ckbx"/>
71                                                                         <label for="admin-settings-pending-select"></label>
72                                                                 </div>
73                                                         </div>
74                                                         <div class="col-xs-9 admin-settings-footer-elements text-right">
75                                                                 <button type="submit" name="page_users_deny" value="1" class="btn btn-primary">
76                                                                         <i class="fa fa-trash-o" aria-hidden="true"></i> {{$deny}}
77                                                                 </button>
78                                                                 <button type="submit" name="page_users_approve" value="1" class="btn btn-warinig">
79                                                                         <i class="fa fa-check" aria-hidden="true"></i> {{$approve}}
80                                                                 </button>
81                                                         </div>
82                                                 </div>
83                                         </div>
84                                         {{else}}
85                                         <div class="panel-body text-center text-muted">{{$no_pending}}</div>
86                                         {{/if}}
87                                 </div>
88                         </div>
89
90                         <!--
91                                 **
92                                 *
93                                 *               USERS Table
94                                 *
95                                 **
96                         -->
97                         <div class="panel">
98                                 <div class="section-subtitle-wrapper" role="tab" id="admin-settings-user">
99                                         <h4>
100                                                 <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">
101                                                         {{$h_users}} ({{count($users)}})
102                                                 </a>
103                                         </h4>
104                                 </div>
105
106                                 <div id="admin-settings-user-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-user">
107
108                                         {{if $users}}
109                                         <table id="users" class="table table-hover">
110                                                 <thead>
111                                                         <tr>
112                                                                 <th></th>
113                                                                 <th></th>
114                                                                 {{foreach $th_users as $k=>$th}}
115                                                                         {{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])) }}
116                                                                         <th class="th-{{$k}}">
117                                                                                 <button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th.1}}" class="btn-link table-order">
118                                                                                         {{if $order_users == $th.1}}
119                                                                                                 {{if $order_direction_users == "+"}}
120                                                                                                 &#8595;
121                                                                                                 {{else}}
122                                                                                                 &#8593;
123                                                                                                 {{/if}}
124                                                                                         {{else}}
125                                                                                         &#8597;
126                                                                                         {{/if}}
127                                                                                         {{$th.0}}
128                                                                                 </button>
129                                                                         </th>
130                                                                         {{/if}}
131                                                                 {{/foreach}}
132                                                                 <th></th>
133                                                         </tr>
134                                                 </thead>
135                                                 <tbody>
136                                                 {{foreach $users as $u}}
137                                                         <tr id="user-{{$u.uid}}" class="{{if $u.blocked != 0}}blocked{{/if}}">
138                                                                 <td>
139                                                                 {{if $u.is_deletable}}
140                                                                 <div class="checkbox">
141                                                                         <input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/>
142                                                                         <label for="id_user_{{$u.uid}}"></label>
143                                                                 </div>
144                                                                 {{else}}
145                                                                 &nbsp;
146                                                                 {{/if}}
147                                                                 </td>
148                                                                 <td><img class="avatar-nano" src="{{$u.micro}}" title="{{$u.nickname}}"></td>
149                                                                 <td><a href="{{$u.url}}" title="{{$u.nickname}}"> {{$u.name}}</a></td>
150                                                                 <td>{{$u.email}}</td>
151                                                                 {{if $order_users == $th_users.2.1}}
152                                                                 <td>{{$u.register_date}}</td>
153                                                                 {{/if}}
154
155                                                                 {{if $order_users == $th_users.3.1}}
156                                                                 <td>{{$u.login_date}}</td>
157                                                                 {{/if}}
158
159                                                                 {{if $order_users == $th_users.4.1}}
160                                                                 <td>{{$u.lastitem_date}}</td>
161                                                                 {{/if}}
162
163                                                                 {{if !in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.4.1]) }}
164                                                                 <td>
165                                                                         <i class="fa
166                                                                                 {{if $u.page_flags_raw==0}}fa-user{{/if}}               {{* PAGE_NORMAL *}}
167                                                                                 {{if $u.page_flags_raw==1}}fa-bullhorn{{/if}}           {{* PAGE_SOAPBOX *}}
168                                                                                 {{if $u.page_flags_raw==2}}fa-users{{/if}}              {{* PAGE_COMMUNITY *}}
169                                                                                 {{if $u.page_flags_raw==3}}fa-heart{{/if}}              {{* PAGE_FREELOVE *}}
170                                                                                 {{if $u.page_flags_raw==4}}fa-rss{{/if}}                {{* PAGE_BLOG *}}
171                                                                                 {{if $u.page_flags_raw==5}}fa-user-secret{{/if}}        {{* PAGE_PRVGROUP *}}
172                                                                                 " title="{{$u.page_flags}}">
173                                                                         </i>
174                                                                         {{if $u.page_flags_raw==0 && $u.account_type_raw > 0}}
175                                                                         <i class="fa
176                                                                                 {{if $u.account_type_raw==1}}fa-sitemap{{/if}}          {{* ACCOUNT_TYPE_ORGANISATION *}}
177                                                                                 {{if $u.account_type_raw==2}}fa-newspaper-o{{/if}}      {{* ACCOUNT_TYPE_NEWS *}}
178                                                                                 {{if $u.account_type_raw==3}}fa-comments{{/if}}         {{* ACCOUNT_TYPE_COMMUNITY *}}
179                                                                                 " title="{{$u.account_type}}">
180                                                                         </i>
181                                                                         {{/if}}
182                                                                         {{if $u.is_admin}}<i class="fa fa-user-md text-primary" title="{{$siteadmin}}"></i>{{/if}}
183                                                                         {{if $u.account_expired}}<i class="fa fa-clock-o text-warning" title="{{$accountexpired}}"></i>{{/if}}
184                                                                 </td>
185                                                                 {{/if}}
186
187                                                                 <td class="text-right">
188                                                                         <button type="button" class="btn-link admin-settings-action-link" onclick="return details({{$u.uid}})"><span class="caret"></span></button>
189                                                                 </td>
190                                                         </tr>
191                                                         <tr id="user-{{$u.uid}}-detail" class=" details hidden {{if $u.blocked != 0}}blocked{{/if}}">
192                                                                 <td>&nbsp;</td>
193                                                                 <td colspan="4">
194                                                                         {{if $order_users != $th_users.2.1}}
195                                                                         <p>
196                                                                                 <button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th_users.2.1}}" class="btn-link table-order">
197                                                                                 &#8597; {{$th_users.2.0}}</button> : {{$u.register_date}}
198                                                                         </p>
199                                                                         {{/if}}
200
201                                                                         {{if $order_users != $th_users.3.1}}
202                                                                         <p>
203                                                                                 <button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th_users.3.1}}" class="btn-link table-order">
204                                                                                         &#8597; {{$th_users.3.0}}</button> : {{$u.login_date}}
205                                                                         </p>
206                                                                         {{/if}}
207
208                                                                         {{if $order_users != $th_users.4.1}}
209                                                                         <p>
210                                                                                 <button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th_users.4.1}}" class="btn-link table-order">
211                                                                                         &#8597; {{$th_users.4.0}}</button> : {{$u.lastitem_date}}
212                                                                         </p>
213                                                                         {{/if}}
214
215                                                                         {{if in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.4.1]) }}
216                                                                         <p>
217                                                                                 <button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th_users.5.1}}" class="btn-link table-order">
218                                                                                         &#8597; {{$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}}
219                                                                         </p>
220                                                                         {{/if}}
221
222                                                                 </td>
223                                                                 <td class="text-right">
224                                                                         {{if $u.is_deletable}}
225                                                                         <a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" class="admin-settings-action-link"title="{{if $u.blocked}}{{$unblock}}{{else}}{{$block}}{{/if}}">
226                                                                                 {{if $u.blocked == 0}}
227                                                                                 <i class="fa fa-ban" aria-hidden="true"></i>
228                                                                                 {{else}}
229                                                                                 <i class="fa fa-circle-o" aria-hidden="true"></i>
230                                                                                 {{/if}}
231                                                                         </a>
232                                                                         <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}}')">
233                                                                                 <i class="fa fa-trash" aria-hidden="true"></i>
234                                                                         </a>
235                                                                         {{else}}
236                                                                         &nbsp;
237                                                                         {{/if}}
238                                                                 </td>
239                                                         </tr>
240                                                 {{/foreach}}
241                                                 </tbody>
242                                         </table>
243                                         <div class="panel-footer">
244                                                 <div class="row">
245                                                         <div class="col-xs-3 admin-settings-footer-elements">
246                                                                 <div class="checkbox">
247                                                                         <input type="checkbox" id="admin-settings-users-select" class="selecttoggle" data-select-class="users_ckbx"/>
248                                                                         <label for="admin-settings-users-select"></label>
249                                                                 </div>
250                                                         </div>
251                                                         <div class="col-xs-9 admin-settings-footer-elements text-right">
252                                                                 <button type="submit" name="page_users_block" value="1" class="btn btn-warning">
253                                                                         <i class="fa fa-ban" aria-hidden="true"></i> {{$block}} / <i class="fa fa-circle-o" aria-hidden="true"></i> {{$unblock}}
254                                                                 </button>
255                                                                 <button type="submit" name="page_users_delete" value="1" class="btn btn-danger" onclick="return confirm_delete('{{$confirm_delete_multi}}')">
256                                                                         <i class="fa fa-trash" aria-hidden="true"></i> {{$delete}}
257                                                                 </button>
258                                                         </div>
259                                                 </div>
260                                         </div>
261                                         {{else}}
262                                         <div class="panel-body text-center bg-danger">NO USERS?!?</div>
263                                         {{/if}}
264                                 </div>
265                         </div>
266
267
268                         <!--
269                                 **
270                                 *
271                                 *               DELETED Users table
272                                 *
273                                 **
274                         -->
275                         {{if $deleted}}
276                         <div class="panel">
277                                 <div class="section-subtitle-wrapper" role="tab" id="admin-settings-deleted">
278                                         <h4>
279                                                 <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">
280                                                         {{$h_deleted}} ({{count($deleted)}})
281                                                 </a>
282                                         </h4>
283                                 </div>
284
285                                 <div id="admin-settings-deleted-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-deleted">
286                                         <table id="deleted" class="table table-hover">
287                                                 <thead>
288                                                         <tr>
289                                                                 <th></th>
290                                                                 {{foreach $th_deleted as $k=>$th}}
291                                                                         {{if in_array($k,[0,1,5])}}
292                                                                         <th>{{$th}}</th>
293                                                                         {{/if}}
294                                                                 {{/foreach}}
295                                                         </tr>
296                                                 </thead>
297                                                 <tbody>
298                                                 {{foreach $deleted as $u}}
299                                                         <tr>
300                                                                 <td><img class="avatar-nano" src="{{$u.micro}}" title="{{$u.nickname}}"></td>
301                                                                 <td><a href="{{$u.url}}" title="{{$u.nickname}}" >{{$u.name}}</a></td>
302                                                                 <td>{{$u.email}}</td>
303                                                                 <td>{{$u.deleted}}</td>
304                                                         </tr>
305                                                 {{/foreach}}
306                                                 </tbody>
307                                         </table>
308                                 </div>
309                         </div>
310                         {{/if}}
311
312
313
314                         <!--
315                                 **
316                                 *
317                                 *               NEW USER Form
318                                 *
319                                 **
320                         -->
321                         <div class="panel">
322                                 <div class="section-subtitle-wrapper" role="tab" id="admin-settings-new-user">
323                                         <h4>
324                                                 <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">
325                                                         {{$h_newuser}}
326                                                 </a>
327                                         </h4>
328                                 </div>
329
330                                 <div id="admin-settings-new-user-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-new-user">
331                                         <div class="panel-body">
332                                                 {{include file="field_input.tpl" field=$newusername}}
333                                                 {{include file="field_input.tpl" field=$newusernickname}}
334                                                 {{include file="field_input.tpl" field=$newuseremail}}
335                                         </div>
336                                         <div class="panel-footer text-right">
337                                                 <button type="submit" class="btn btn-primary">{{$submit}}</button>
338                                         </div>
339
340
341                                 </div>
342                         </div>
343                 </div>
344         </form>
345 </div>