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