]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/templates/admin/users.tpl
Frio: add template for admin/users
[friendica.git] / view / theme / frio / templates / admin / users.tpl
1
2 <script>
3         function confirm_delete(uname){
4                 return confirm( "{{$confirm_delete}}".format(uname));
5         }
6         function confirm_delete_multi(){
7                 return confirm("{{$confirm_delete_multi}}");
8         }
9         function selectall(cls){
10                 $("."+cls).prop("checked", true);
11                 return false;
12         }
13         function unselectall(cls){
14                 $("."+cls).prop("checked", false);
15                 return false;
16         }
17         function details(uid) {
18                 $("#user-"+uid+"-detail").toggleClass("hidden");
19                 return false;
20         }
21 </script>
22 <style>
23         tr.details td,
24         tr.details th
25                 { border-top: 0!important; }
26 </style>
27
28 <div class="panel panel-default">
29         <div class="panel-body"><h1>{{$title}} - {{$page}}</h1></div>
30 </div>
31
32         <form action="{{$baseurl}}/admin/users" method="post">
33     <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
34
35
36                 <!--
37                         **
38                         *
39                         *               PENDING Users table
40                         *
41                         **
42                 -->
43                 <div class="panel panel-default">
44                         <div class="panel-heading"><h3 class="panel-title">{{$h_pending}}</h3></div>
45
46                         {{if $pending}}
47                                 <table id='pending' class="table table-hover">
48                                         <thead>
49                                         <tr>
50                                                 {{foreach $th_pending as $th}}<th>{{$th}}</th>{{/foreach}}
51                                                 <th>
52                                                         <a href='#' onclick="return selectall('pending_ckbx');"><i class="fa fa-check-square-o" aria-hidden="true"></i></a>
53                                                         <a href='#' onclick="return unselectall('pending_ckbx');"><i class="fa fa-square-o" aria-hidden="true"></i></a>
54                                                 </th>
55                                                 <th></th>
56                                         </tr>
57                                         </thead>
58                                         <tbody>
59                                 {{foreach $pending as $u}}
60                                         <tr>
61                                                 <td>{{$u.created}}</td>
62                                                 <td >{{$u.name}}</td>
63                                                 <td>{{$u.email}}</td>
64                                                 <td ><input type="checkbox" class="pending_ckbx" id="id_pending_{{$u.hash}}" name="pending[]" value="{{$u.hash}}" /></td>
65                                                 <td>
66                                                         <a href="{{$baseurl}}/regmod/allow/{{$u.hash}}" title='{{$approve}}'><i class="fa fa-thumbs-up" aria-hidden="true"></i></a>
67                                                         <a href="{{$baseurl}}/regmod/deny/{{$u.hash}}" title='{{$deny}}'><i class="fa fa-thumbs-down" aria-hidden="true"></i></a>
68                                                 </td>
69                                         </tr>
70                                         <tr class="details">
71                                                 <th>{{$pendingnotetext}}</th>
72                                                 <td colspan="4">{{$u.note}}</td>
73                                         </tr>
74                                 {{/foreach}}
75                                         </tbody>
76                                 </table>
77                                 <div class="panel-footer text-right">
78                                         <button type="submit" name="page_users_deny" class="btn btn-primary"><i class="fa fa-thumbs-down" aria-hidden="true"></i> {{$deny}}</button>
79                                         <button type="submit" name="page_users_approve" class="btn btn-warinig"><i class="fa fa-thumbs-up" aria-hidden="true"></i> {{$approve}}</button>
80                                 </div>
81                         {{else}}
82                                 <div class="panel-body text-center text-muted">{{$no_pending}}</div>
83                         {{/if}}
84                 </div>
85
86 <!--
87         **
88         *
89         *               USERS Table
90         *
91         **
92 -->
93         <div class="panel panel-default">
94                 <div class="panel-heading"><h3 class="panel-title">{{$h_users}}</h3></div>
95                 {{if $users}}
96
97                         <table id='users' class="table table-hover">
98                                 <thead>
99                                 <tr>
100                                         <th></th>
101                                         {{foreach $th_users as $k=>$th}}
102                                         {{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])) }}
103                                         <th>
104                                                 <a href="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th.1}}">
105                                                         {{if $order_users == $th.1}}
106                                                                 {{if $order_direction_users == "+"}}
107                                                                 &#8595;
108                                                                 {{else}}
109                                                                 &#8593;
110                                                                 {{/if}}
111                                                         {{else}}
112                                                                 &#8597;
113                                                         {{/if}}
114                                                 {{$th.0}}</a>
115                                         </th>
116                                         {{/if}}
117                                         {{/foreach}}
118                                         <th>
119                                                 <a href='#' onclick="return selectall('users_ckbx');"><i class="fa fa-check-square-o" aria-hidden="true"></i></a>
120                                                 <a href='#' onclick="return unselectall('users_ckbx');"><i class="fa fa-square-o" aria-hidden="true"></i></a>
121                                         </th>
122                                         <th></th>
123                                 </tr>
124                                 </thead>
125                                 <tbody>
126                                 {{foreach $users as $u}}
127                                         <tr id="user-{{$u.uid}}">
128                                                 <td><img class='icon' src="{{$u.micro}}" title="{{$u.nickname}}"></td>
129                                                 <td><a href="{{$u.url}}" title="{{$u.nickname}}"> {{$u.name}}</a></td>
130                                                 <td>{{$u.email}}</td>
131                                                 {{if $order_users == $th_users.2.1}}
132                                                 <td class='register_date'>{{$u.register_date}}</td>
133                                                 {{/if}}
134
135                                                 {{if $order_users == $th_users.3.1}}
136                                                 <td class='login_date'>{{$u.login_date}}</td>
137                                                 {{/if}}
138
139                                                 {{if $order_users == $th_users.4.1}}
140                                                 <td class='lastitem_date'>{{$u.lastitem_date}}</td>
141                                                 {{/if}}
142
143                                                 {{if !in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.4.1]) }}
144                                                 <td>{{$u.page_flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}} {{if $u.account_expired}}({{$accountexpired}}){{/if}}</td>
145                                                 {{/if}}
146                                                 <td>
147                                                 {{if $u.is_deletable}}
148                                                         <input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/></td>
149                                                 {{else}}
150                                                         &nbsp;
151                                                 {{/if}}
152                                                 <td class="text-right">
153                                                         <a href="#" onclick="return details({{$u.uid}})"><i class="fa fa-bars" aria-hidden="true"></i>
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.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('{{$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 text-right">
199                                                 <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>
200                                                 <button type="submit" name="page_users_delete" class="btn btn-danger" onclick="return confirm_delete_multi()"><i class="fa fa-trash" aria-hidden="true"></i> {{$delete}}</button>
201                         </div>
202                 {{else}}
203                         <div class="panel-body text-center bg-danger">NO USERS?!?</div>
204                 {{/if}}
205                 </div>
206
207
208
209         </form>
210
211
212
213
214
215 <!--
216         **
217         *
218         *               DELETED Users table
219         *
220         **
221 -->
222         {{if $deleted}}
223         <div class="panel panel-default">
224                 <div class="panel-heading"><h3 class="panel-title">{{$h_deleted}}</h3></div>
225                 <table id='deleted' class="table table-hover">
226                         <thead>
227                         <tr>
228                                 <th></th>
229                                 {{foreach $th_deleted as $k=>$th}}
230                                         {{if in_array($k,[0,1,5])}}
231                                         <th>{{$th}}</th>
232                                         {{/if}}
233                                 {{/foreach}}
234                         </tr>
235                         </thead>
236                         <tbody>
237                         {{foreach $deleted as $u}}
238                                 <tr>
239                                         <td><img src="{{$u.micro}}" title="{{$u.nickname}}"></td>
240                                         <td><a href="{{$u.url}}" title="{{$u.nickname}}" >{{$u.name}}</a></td>
241                                         <td>{{$u.email}}</td>
242                                         <td>{{$u.deleted}}</td>
243                                 </tr>
244                         {{/foreach}}
245                         </tbody>
246                 </table>
247         </div>
248 {{/if}}
249
250
251
252 <!--
253         **
254         *
255         *               NEW USER Form
256         *
257         **
258 -->
259 <form action="{{$baseurl}}/admin/users" method="post">
260         <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
261
262         <div class="panel panel-default">
263                 <div class="panel-heading"><h3 class="panel-title">{{$h_newuser}}</h3></div>
264                 <div class="panel-body">
265                         {{include file="field_input.tpl" field=$newusername}}
266                         {{include file="field_input.tpl" field=$newusernickname}}
267                         {{include file="field_input.tpl" field=$newuseremail}}
268                 </div>
269                 <div class="panel-footer text-right">
270                   <button type="submit" class="btn btn-primary">{{$submit}}</button>
271           </form>
272         </div>
273 </form>