]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/templates/admin/users.tpl
New function for contact suggestions
[friendica.git] / view / theme / frio / templates / admin / users.tpl
1 <script type="text/javascript" src="view/theme/frio/js/mod_admin.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
2 <link rel="stylesheet" href="view/theme/frio/css/mod_admin.css?v={{$smarty.const.FRIENDICA_VERSION}}" 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 panel-heading" role="tab" id="admin-settings-pending">
22                                         <h2>
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                                         </h2>
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>
35                                                                         <div class="checkbox">
36                                                                                 <input type="checkbox" id="admin-settings-pending-select" class="selecttoggle" data-select-class="pending_ckbx"/>
37                                                                                 <label for="admin-settings-pending-select"></label>
38                                                                         </div>
39                                                                 </th>
40                                                                 {{foreach $th_pending as $th}}<th>{{$th}}</th>{{/foreach}}
41                                                                 <th></th>
42                                                         </tr>
43                                                 </thead>
44                                                 <tbody>
45                                         {{foreach $pending as $u}}
46                                                         <tr>
47                                                                 <td>
48                                                                         <div class="checkbox">
49                                                                                 <input type="checkbox" class="pending_ckbx" id="id_pending_{{$u.hash}}" name="pending[]" value="{{$u.hash}}" />
50                                                                                 <label for="id_pending_{{$u.hash}}"></label>
51                                                                         </div>
52                                                                 </td>
53                                                                 <td>{{$u.created}}</td>
54                                                                 <td>{{$u.name}}</td>
55                                                                 <td>{{$u.email}}</td>
56                                                                 <td>
57                                                                         <a href="{{$baseurl}}/admin/users/allow/{{$u.uid}}?t={{$form_security_token}}" class="admin-settings-action-link" title="{{$approve}}"><i class="fa fa-check" aria-hidden="true"></i></a>
58                                                                         <a href="{{$baseurl}}/admin/users/deny/{{$u.uid}}?t={{$form_security_token}}" class="admin-settings-action-link" title="{{$deny}}"><i class="fa fa-trash-o" aria-hidden="true"></i></a>
59                                                                 </td>
60                                                         </tr>
61                                                 {{if $u.note}}
62                                                         <tr class="details">
63                                                                 <td></td>
64                                                                 <th>{{$pendingnotetext}}</th>
65                                                                 <td colspan="4">{{$u.note}}</td>
66                                                         </tr>
67                                                 {{/if}}
68                                         {{/foreach}}
69                                                 </tbody>
70                                         </table>
71                                         <div class="panel-footer">
72                                                 <button type="submit" name="page_users_deny" value="1" class="btn btn-primary">
73                                                         <i class="fa fa-trash-o" aria-hidden="true"></i> {{$deny}}
74                                                 </button>
75                                                 <button type="submit" name="page_users_approve" value="1" class="btn btn-warinig">
76                                                         <i class="fa fa-check" aria-hidden="true"></i> {{$approve}}
77                                                 </button>
78                                         </div>
79                                 {{else}}
80                                         <div class="panel-body text-center text-muted">{{$no_pending}}</div>
81                                 {{/if}}
82                                 </div>
83                         </div>
84
85                         <!--
86                                 **
87                                 *
88                                 *               USERS Table
89                                 *
90                                 **
91                         -->
92                         <div class="panel">
93                                 <div class="section-subtitle-wrapper panel-heading" role="tab" id="admin-settings-user">
94                                         <h2>
95                                                 <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">
96                                                         {{$h_users}} ({{count($users)}})
97                                                 </a>
98                                         </h2>
99                                 </div>
100
101                                 <div id="admin-settings-user-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-user">
102
103                                 {{if $users}}
104                                         <table id="users" class="table table-hover">
105                                                 <thead>
106                                                         <tr>
107                                                                 <th>
108                                                                         <div class="checkbox">
109                                                                                 <input type="checkbox" id="admin-settings-users-select" class="selecttoggle" data-select-class="users_ckbx"/>
110                                                                                 <label for="admin-settings-users-select"></label>
111                                                                         </div>
112                                                                 </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-secret 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                                                                 {{if $u.blocked}}
226                                                                         <a href="{{$baseurl}}/admin/users/unblock/{{$u.uid}}?t={{$form_security_token}}" class="admin-settings-action-link" title="{{$unblock}}">
227                                                                                 <i class="fa fa-circle-o" aria-hidden="true"></i>
228                                                                         </a>
229                                                                 {{else}}
230                                                                         <a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" class="admin-settings-action-link" title="{{$block}}">
231                                                                                 <i class="fa fa-ban" aria-hidden="true"></i>
232                                                                         </a>
233                                                                 {{/if}}
234                                                                         <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}}')">
235                                                                                 <i class="fa fa-trash" aria-hidden="true"></i>
236                                                                         </a>
237                                                         {{else}}
238                                                                         &nbsp;
239                                                         {{/if}}
240                                                                 </td>
241                                                         </tr>
242                                                 {{/foreach}}
243                                                 </tbody>
244                                         </table>
245                                         <div class="panel-footer">
246                                                 <button type="submit" name="page_users_block" value="1" class="btn btn-warning">
247                                                         <i class="fa fa-ban" aria-hidden="true"></i> {{$block}}
248                                                 </button>
249                                                 <button type="submit" name="page_users_unblock" value="1" class="btn btn-default">
250                                                         <i class="fa fa-circle-o" aria-hidden="true"></i> {{$unblock}}
251                                                 </button>
252                                                 <button type="submit" name="page_users_delete" value="1" class="btn btn-danger" onclick="return confirm_delete('{{$confirm_delete_multi}}')">
253                                                         <i class="fa fa-trash" aria-hidden="true"></i> {{$delete}}
254                                                 </button>
255                                         </div>
256                                 {{else}}
257                                         <div class="panel-body text-center bg-danger">NO USERS?!?</div>
258                                 {{/if}}
259                                 </div>
260                         </div>
261
262                         <!--
263                                 **
264                                 *
265                                 *               DELETED Users table
266                                 *
267                                 **
268                         -->
269                         {{if $deleted}}
270                         <div class="panel">
271                                 <div class="section-subtitle-wrapper panel-heading" role="tab" id="admin-settings-deleted">
272                                         <h2>
273                                                 <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">
274                                                         {{$h_deleted}} ({{count($deleted)}})
275                                                 </a>
276                                         </h2>
277                                 </div>
278
279                                 <div id="admin-settings-deleted-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-deleted">
280                                         <table id="deleted" class="table table-hover">
281                                                 <thead>
282                                                         <tr>
283                                                                 <th></th>
284                                                                 {{foreach $th_deleted as $k=>$th}}
285                                                                         {{if in_array($k,[0,1,5])}}
286                                                                         <th>{{$th}}</th>
287                                                                         {{/if}}
288                                                                 {{/foreach}}
289                                                         </tr>
290                                                 </thead>
291                                                 <tbody>
292                                                 {{foreach $deleted as $u}}
293                                                         <tr>
294                                                                 <td><img class="avatar-nano" src="{{$u.micro}}" title="{{$u.nickname}}"></td>
295                                                                 <td><a href="{{$u.url}}" title="{{$u.nickname}}" >{{$u.name}}</a></td>
296                                                                 <td>{{$u.email}}</td>
297                                                                 <td>{{$u.deleted}}</td>
298                                                         </tr>
299                                                 {{/foreach}}
300                                                 </tbody>
301                                         </table>
302                                 </div>
303                         </div>
304                         {{/if}}
305
306
307
308                         <!--
309                                 **
310                                 *
311                                 *               NEW USER Form
312                                 *
313                                 **
314                         -->
315                         <div class="panel">
316                                 <div class="section-subtitle-wrapper panel-heading" role="tab" id="admin-settings-new-user">
317                                         <h2>
318                                                 <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">
319                                                         {{$h_newuser}}
320                                                 </a>
321                                         </h2>
322                                 </div>
323
324                                 <div id="admin-settings-new-user-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-new-user">
325                                         <div class="panel-body">
326                                                 {{include file="field_input.tpl" field=$newusername}}
327                                                 {{include file="field_input.tpl" field=$newusernickname}}
328                                                 {{include file="field_input.tpl" field=$newuseremail}}
329                                         </div>
330                                         <div class="panel-footer">
331                                                 <button type="submit" class="btn btn-primary">{{$submit}}</button>
332                                         </div>
333                                 </div>
334                         </div>
335                 </div>
336         </form>
337 </div>