]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/templates/admin/users.tpl
wrapping up 2019.12
[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                                         <div class="panel-body">
110                                                 <table id="users" class="table table-hover">
111                                                         <thead>
112                                                                 <tr>
113                                                                         <th></th>
114                                                                         <th></th>
115                                                                         {{foreach $th_users as $k=>$th}}
116                                                                                 {{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])) }}
117                                                                                 <th class="th-{{$k}}">
118                                                                                         <button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th.1}}" class="btn-link table-order">
119                                                                                                 {{if $order_users == $th.1}}
120                                                                                                         {{if $order_direction_users == "+"}}
121                                                                                                         &#8595;
122                                                                                                         {{else}}
123                                                                                                         &#8593;
124                                                                                                         {{/if}}
125                                                                                                 {{else}}
126                                                                                                 &#8597;
127                                                                                                 {{/if}}
128                                                                                                 {{$th.0}}
129                                                                                         </button>
130                                                                                 </th>
131                                                                                 {{/if}}
132                                                                         {{/foreach}}
133                                                                         <th></th>
134                                                                 </tr>
135                                                         </thead>
136                                                         <tbody>
137                                                         {{foreach $users as $u}}
138                                                                 <tr id="user-{{$u.uid}}" class="{{if $u.blocked != 0}}blocked{{/if}}">
139                                                                         <td>
140                                                                         {{if $u.is_deletable}}
141                                                                         <div class="checkbox">
142                                                                                 <input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/>
143                                                                                 <label for="id_user_{{$u.uid}}"></label>
144                                                                         </div>
145                                                                         {{else}}
146                                                                         &nbsp;
147                                                                         {{/if}}
148                                                                         </td>
149                                                                         <td><img class="avatar-nano" src="{{$u.micro}}" title="{{$u.nickname}}"></td>
150                                                                         <td><a href="{{$u.url}}" title="{{$u.nickname}}"> {{$u.name}}</a></td>
151                                                                         <td>{{$u.email}}</td>
152                                                                         {{if $order_users == $th_users.2.1}}
153                                                                         <td>{{$u.register_date}}</td>
154                                                                         {{/if}}
155
156                                                                         {{if $order_users == $th_users.3.1}}
157                                                                         <td>{{$u.login_date}}</td>
158                                                                         {{/if}}
159
160                                                                         {{if $order_users == $th_users.4.1}}
161                                                                         <td>{{$u.lastitem_date}}</td>
162                                                                         {{/if}}
163
164                                                                         {{if !in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.4.1]) }}
165                                                                         <td>
166                                                                                 <i class="fa
167                                                                                         {{if $u.page_flags_raw==0}}fa-user{{/if}}               {{* PAGE_NORMAL *}}
168                                                                                         {{if $u.page_flags_raw==1}}fa-bullhorn{{/if}}           {{* PAGE_SOAPBOX *}}
169                                                                                         {{if $u.page_flags_raw==2}}fa-users{{/if}}              {{* PAGE_COMMUNITY *}}
170                                                                                         {{if $u.page_flags_raw==3}}fa-heart{{/if}}              {{* PAGE_FREELOVE *}}
171                                                                                         {{if $u.page_flags_raw==4}}fa-rss{{/if}}                {{* PAGE_BLOG *}}
172                                                                                         {{if $u.page_flags_raw==5}}fa-user-secret{{/if}}        {{* PAGE_PRVGROUP *}}
173                                                                                         " title="{{$u.page_flags}}">
174                                                                                 </i>
175                                                                                 {{if $u.page_flags_raw==0 && $u.account_type_raw > 0}}
176                                                                                 <i class="fa
177                                                                                         {{if $u.account_type_raw==1}}fa-sitemap{{/if}}          {{* ACCOUNT_TYPE_ORGANISATION *}}
178                                                                                         {{if $u.account_type_raw==2}}fa-newspaper-o{{/if}}      {{* ACCOUNT_TYPE_NEWS *}}
179                                                                                         {{if $u.account_type_raw==3}}fa-comments{{/if}}         {{* ACCOUNT_TYPE_COMMUNITY *}}
180                                                                                         " title="{{$u.account_type}}">
181                                                                                 </i>
182                                                                                 {{/if}}
183                                                                                 {{if $u.is_admin}}<i class="fa fa-user-secret text-primary" title="{{$siteadmin}}"></i>{{/if}}
184                                                                                 {{if $u.account_expired}}<i class="fa fa-clock-o text-warning" title="{{$accountexpired}}"></i>{{/if}}
185                                                                         </td>
186                                                                         {{/if}}
187
188                                                                         <td class="text-right">
189                                                                                 <button type="button" class="btn-link admin-settings-action-link" onclick="return details({{$u.uid}})"><span class="caret"></span></button>
190                                                                         </td>
191                                                                 </tr>
192                                                                 <tr id="user-{{$u.uid}}-detail" class=" details hidden {{if $u.blocked != 0}}blocked{{/if}}">
193                                                                         <td>&nbsp;</td>
194                                                                         <td colspan="4">
195                                                                                 {{if $order_users != $th_users.2.1}}
196                                                                                 <p>
197                                                                                         <button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th_users.2.1}}" class="btn-link table-order">
198                                                                                         &#8597; {{$th_users.2.0}}</button> : {{$u.register_date}}
199                                                                                 </p>
200                                                                                 {{/if}}
201
202                                                                                 {{if $order_users != $th_users.3.1}}
203                                                                                 <p>
204                                                                                         <button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th_users.3.1}}" class="btn-link table-order">
205                                                                                                 &#8597; {{$th_users.3.0}}</button> : {{$u.login_date}}
206                                                                                 </p>
207                                                                                 {{/if}}
208
209                                                                                 {{if $order_users != $th_users.4.1}}
210                                                                                 <p>
211                                                                                         <button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th_users.4.1}}" class="btn-link table-order">
212                                                                                                 &#8597; {{$th_users.4.0}}</button> : {{$u.lastitem_date}}
213                                                                                 </p>
214                                                                                 {{/if}}
215
216                                                                                 {{if in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.4.1]) }}
217                                                                                 <p>
218                                                                                         <button type="button" data-order-url="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th_users.5.1}}" class="btn-link table-order">
219                                                                                                 &#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}}
220                                                                                 </p>
221                                                                                 {{/if}}
222
223                                                                         </td>
224                                                                         <td class="text-right">
225                                                                                 {{if $u.is_deletable}}
226                                                                                         {{if $u.blocked}}
227                                                                                 <a href="{{$baseurl}}/admin/users/unblock/{{$u.uid}}?t={{$form_security_token}}" class="admin-settings-action-link" title="{{$unblock}}">
228                                                                                         <i class="fa fa-circle-o" aria-hidden="true"></i>
229                                                                                 </a>
230                                                                                         {{else}}
231                                                                                 <a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" class="admin-settings-action-link" title="{{$block}}">
232                                                                                         <i class="fa fa-ban" aria-hidden="true"></i>
233                                                                                 </a>
234                                                                                         {{/if}}
235                                                                                 <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}}')">
236                                                                                         <i class="fa fa-trash" aria-hidden="true"></i>
237                                                                                 </a>
238                                                                                 {{else}}
239                                                                                 &nbsp;
240                                                                                 {{/if}}
241                                                                         </td>
242                                                                 </tr>
243                                                         {{/foreach}}
244                                                         </tbody>
245                                                 </table>
246                                         </div>
247                                         {{else}}
248                                         <div class="panel-body text-center bg-danger">NO USERS?!?</div>
249                                         {{/if}}
250                                         <div class="panel-footer">
251                                                 {{if $users}}
252                                                 <div class="row">
253                                                         <div class="col-xs-3 admin-settings-footer-elements">
254                                                                 <div class="checkbox">
255                                                                         <input type="checkbox" id="admin-settings-users-select" class="selecttoggle" data-select-class="users_ckbx"/>
256                                                                         <label for="admin-settings-users-select"></label>
257                                                                 </div>
258                                                         </div>
259                                                         <div class="col-xs-9 admin-settings-footer-elements text-right">
260                                                                 <button type="submit" name="page_users_block" value="1" class="btn btn-warning">
261                                                                         <i class="fa fa-ban" aria-hidden="true"></i> {{$block}}
262                                                                 </button>
263                                                                 <button type="submit" name="page_users_unblock" value="1" class="btn btn-default">
264                                                                         <i class="fa fa-circle-o" aria-hidden="true"></i> {{$unblock}}
265                                                                 </button>
266                                                                 <button type="submit" name="page_users_delete" value="1" class="btn btn-danger" onclick="return confirm_delete('{{$confirm_delete_multi}}')">
267                                                                         <i class="fa fa-trash" aria-hidden="true"></i> {{$delete}}
268                                                                 </button>
269                                                         </div>
270                                                 </div>
271                                                 {{/if}}
272                                         </div>
273                                 </div>
274                         </div>
275
276
277                         <!--
278                                 **
279                                 *
280                                 *               DELETED Users table
281                                 *
282                                 **
283                         -->
284                         {{if $deleted}}
285                         <div class="panel">
286                                 <div class="section-subtitle-wrapper" role="tab" id="admin-settings-deleted">
287                                         <h4>
288                                                 <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">
289                                                         {{$h_deleted}} ({{count($deleted)}})
290                                                 </a>
291                                         </h4>
292                                 </div>
293
294                                 <div id="admin-settings-deleted-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-deleted">
295                                         <table id="deleted" class="table table-hover">
296                                                 <thead>
297                                                         <tr>
298                                                                 <th></th>
299                                                                 {{foreach $th_deleted as $k=>$th}}
300                                                                         {{if in_array($k,[0,1,5])}}
301                                                                         <th>{{$th}}</th>
302                                                                         {{/if}}
303                                                                 {{/foreach}}
304                                                         </tr>
305                                                 </thead>
306                                                 <tbody>
307                                                 {{foreach $deleted as $u}}
308                                                         <tr>
309                                                                 <td><img class="avatar-nano" src="{{$u.micro}}" title="{{$u.nickname}}"></td>
310                                                                 <td><a href="{{$u.url}}" title="{{$u.nickname}}" >{{$u.name}}</a></td>
311                                                                 <td>{{$u.email}}</td>
312                                                                 <td>{{$u.deleted}}</td>
313                                                         </tr>
314                                                 {{/foreach}}
315                                                 </tbody>
316                                         </table>
317                                 </div>
318                         </div>
319                         {{/if}}
320
321
322
323                         <!--
324                                 **
325                                 *
326                                 *               NEW USER Form
327                                 *
328                                 **
329                         -->
330                         <div class="panel">
331                                 <div class="section-subtitle-wrapper" role="tab" id="admin-settings-new-user">
332                                         <h4>
333                                                 <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">
334                                                         {{$h_newuser}}
335                                                 </a>
336                                         </h4>
337                                 </div>
338
339                                 <div id="admin-settings-new-user-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-new-user">
340                                         <div class="panel-body">
341                                                 {{include file="field_input.tpl" field=$newusername}}
342                                                 {{include file="field_input.tpl" field=$newusernickname}}
343                                                 {{include file="field_input.tpl" field=$newuseremail}}
344                                         </div>
345                                         <div class="panel-footer text-right">
346                                                 <button type="submit" class="btn btn-primary">{{$submit}}</button>
347                                         </div>
348
349
350                                 </div>
351                         </div>
352                 </div>
353         </form>
354 </div>