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