]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/templates/admin/users.tpl
Improved protocol storing
[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-md 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                                                                                 <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}}">
227                                                                                         {{if $u.blocked == 0}}
228                                                                                         <i class="fa fa-ban" aria-hidden="true"></i>
229                                                                                         {{else}}
230                                                                                         <i class="fa fa-circle-o" aria-hidden="true"></i>
231                                                                                         {{/if}}
232                                                                                 </a>
233                                                                                 <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}}')">
234                                                                                         <i class="fa fa-trash" aria-hidden="true"></i>
235                                                                                 </a>
236                                                                                 {{else}}
237                                                                                 &nbsp;
238                                                                                 {{/if}}
239                                                                         </td>
240                                                                 </tr>
241                                                         {{/foreach}}
242                                                         </tbody>
243                                                 </table>
244                                         </div>
245                                         {{else}}
246                                         <div class="panel-body text-center bg-danger">NO USERS?!?</div>
247                                         {{/if}}
248                                         <div class="panel-footer">
249                                                 {{if $users}}
250                                                 <div class="row">
251                                                         <div class="col-xs-3 admin-settings-footer-elements">
252                                                                 <div class="checkbox">
253                                                                         <input type="checkbox" id="admin-settings-users-select" class="selecttoggle" data-select-class="users_ckbx"/>
254                                                                         <label for="admin-settings-users-select"></label>
255                                                                 </div>
256                                                         </div>
257                                                         <div class="col-xs-9 admin-settings-footer-elements text-right">
258                                                                 <button type="submit" name="page_users_block" value="1" class="btn btn-warning">
259                                                                         <i class="fa fa-ban" aria-hidden="true"></i> {{$block}} / <i class="fa fa-circle-o" aria-hidden="true"></i> {{$unblock}}
260                                                                 </button>
261                                                                 <button type="submit" name="page_users_delete" value="1" class="btn btn-danger" onclick="return confirm_delete('{{$confirm_delete_multi}}')">
262                                                                         <i class="fa fa-trash" aria-hidden="true"></i> {{$delete}}
263                                                                 </button>
264                                                         </div>
265                                                 </div>
266                                                 {{/if}}
267                                         </div>
268                                 </div>
269                         </div>
270
271
272                         <!--
273                                 **
274                                 *
275                                 *               DELETED Users table
276                                 *
277                                 **
278                         -->
279                         {{if $deleted}}
280                         <div class="panel">
281                                 <div class="section-subtitle-wrapper" role="tab" id="admin-settings-deleted">
282                                         <h4>
283                                                 <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">
284                                                         {{$h_deleted}} ({{count($deleted)}})
285                                                 </a>
286                                         </h4>
287                                 </div>
288
289                                 <div id="admin-settings-deleted-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-deleted">
290                                         <table id="deleted" class="table table-hover">
291                                                 <thead>
292                                                         <tr>
293                                                                 <th></th>
294                                                                 {{foreach $th_deleted as $k=>$th}}
295                                                                         {{if in_array($k,[0,1,5])}}
296                                                                         <th>{{$th}}</th>
297                                                                         {{/if}}
298                                                                 {{/foreach}}
299                                                         </tr>
300                                                 </thead>
301                                                 <tbody>
302                                                 {{foreach $deleted as $u}}
303                                                         <tr>
304                                                                 <td><img class="avatar-nano" src="{{$u.micro}}" title="{{$u.nickname}}"></td>
305                                                                 <td><a href="{{$u.url}}" title="{{$u.nickname}}" >{{$u.name}}</a></td>
306                                                                 <td>{{$u.email}}</td>
307                                                                 <td>{{$u.deleted}}</td>
308                                                         </tr>
309                                                 {{/foreach}}
310                                                 </tbody>
311                                         </table>
312                                 </div>
313                         </div>
314                         {{/if}}
315
316
317
318                         <!--
319                                 **
320                                 *
321                                 *               NEW USER Form
322                                 *
323                                 **
324                         -->
325                         <div class="panel">
326                                 <div class="section-subtitle-wrapper" role="tab" id="admin-settings-new-user">
327                                         <h4>
328                                                 <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">
329                                                         {{$h_newuser}}
330                                                 </a>
331                                         </h4>
332                                 </div>
333
334                                 <div id="admin-settings-new-user-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-new-user">
335                                         <div class="panel-body">
336                                                 {{include file="field_input.tpl" field=$newusername}}
337                                                 {{include file="field_input.tpl" field=$newusernickname}}
338                                                 {{include file="field_input.tpl" field=$newuseremail}}
339                                         </div>
340                                         <div class="panel-footer text-right">
341                                                 <button type="submit" class="btn btn-primary">{{$submit}}</button>
342                                         </div>
343
344
345                                 </div>
346                         </div>
347                 </div>
348         </form>
349 </div>