Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

155 lines
5.4 KiB

  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).attr('checked','checked');
  10. return false;
  11. }
  12. </script>
  13. <div id='adminpage'>
  14. <h1>{{$title}} - {{$page}}</h1>
  15. <form action="{{$baseurl}}/admin/users" method="post">
  16. <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
  17. <h3>{{$h_pending}}</h3>
  18. {{if $pending}}
  19. <table id='pending'>
  20. <thead>
  21. <tr>
  22. {{foreach $th_pending as $th}}<th>{{$th}}</th>{{/foreach}}
  23. <th></th>
  24. <th></th>
  25. </tr>
  26. </thead>
  27. <tbody>
  28. {{foreach $pending as $u}}
  29. <tr>
  30. <td class="created">{{$u.created}}</td>
  31. <td class="name">{{$u.name}}</td>
  32. <td class="email">{{$u.email}}</td>
  33. <td class="checkbox"><input type="checkbox" class="pending_ckbx" id="id_pending_{{$u.hash}}" name="pending[]" value="{{$u.hash}}" /></td>
  34. <td class="tools">
  35. <a href="{{$baseurl}}/regmod/allow/{{$u.hash}}" title='{{$approve}}'><span class='icon like'></span></a>
  36. <a href="{{$baseurl}}/regmod/deny/{{$u.hash}}" title='{{$deny}}'><span class='icon dislike'></span></a>
  37. </td>
  38. </tr>
  39. <tr>
  40. <td class="pendingnote"><p><span>{{$pendingnotetext}}:</span> {{$u.note}}</p></td>
  41. </tr>
  42. {{/foreach}}
  43. </tbody>
  44. </table>
  45. <div class='selectall'><a href='#' onclick="return selectall('pending_ckbx');">{{$select_all}}</a></div>
  46. <div class="submit"><input type="submit" name="page_users_deny" value="{{$deny|escape:'html'}}"/> <input type="submit" name="page_users_approve" value="{{$approve|escape:'html'}}" /></div>
  47. {{else}}
  48. <p>{{$no_pending}}</p>
  49. {{/if}}
  50. <h3>{{$h_users}}</h3>
  51. {{if $users}}
  52. <table id='users'>
  53. <thead>
  54. <tr>
  55. <th></th>
  56. {{foreach $th_users as $th}}
  57. <th>
  58. <a href="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th.1}}">
  59. {{if $order_users == $th.1}}
  60. {{if $order_direction_users == "+"}}
  61. &#8595;
  62. {{else}}
  63. &#8593;
  64. {{/if}}
  65. {{else}}
  66. &#8597;
  67. {{/if}}
  68. {{$th.0}}</a>
  69. </th>
  70. {{/foreach}}
  71. <th></th>
  72. <th></th>
  73. </tr>
  74. </thead>
  75. <tbody>
  76. {{foreach $users as $u}}
  77. <tr>
  78. <td><img class='icon' src="{{$u.micro}}" alt="{{$u.nickname}}" title="{{$u.nickname}}"></td>
  79. <td class='name'><a href="{{$u.url}}" title="{{$u.nickname}}" >{{$u.name}}</a></td>
  80. <td class='email'>{{$u.email}}</td>
  81. <td class='register_date'>{{$u.register_date}}</td>
  82. <td class='login_date'>{{$u.login_date}}</td>
  83. <td class='lastitem_date'>{{$u.lastitem_date}}</td>
  84. <td class='login_date'>{{$u.page_flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}} {{if $u.account_expired}}({{$accountexpired}}){{/if}}</td>
  85. <td class="checkbox">
  86. {{if $u.is_deletable}}
  87. <input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/></td>
  88. {{else}}
  89. &nbsp;
  90. {{/if}}
  91. <td class="tools">
  92. {{if $u.is_deletable}}
  93. <a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" title='{{if $u.blocked}}{{$unblock}}{{else}}{{$block}}{{/if}}'><span class='icon block {{if $u.blocked==0}}dim{{/if}}'></span></a>
  94. <a href="{{$baseurl}}/admin/users/delete/{{$u.uid}}?t={{$form_security_token}}" title='{{$delete}}' onclick="return confirm_delete('{{$u.name}}')"><span class='icon drop'></span></a>
  95. {{else}}
  96. &nbsp;
  97. {{/if}}
  98. </td>
  99. </tr>
  100. {{/foreach}}
  101. </tbody>
  102. </table>
  103. <div class='selectall'><a href='#' onclick="return selectall('users_ckbx');">{{$select_all}}</a></div>
  104. <div class="submit"><input type="submit" name="page_users_block" value="{{$block|escape:'html'}}/{{$unblock|escape:'html'}}" /> <input type="submit" name="page_users_delete" value="{{$delete|escape:'html'}}" onclick="return confirm_delete_multi()" /></div>
  105. {{else}}
  106. NO USERS?!?
  107. {{/if}}
  108. </form>
  109. {{if $deleted}}
  110. <h3>{{$h_deleted}}</h3>
  111. <table id='deleted'>
  112. <thead>
  113. <tr>
  114. <th></th>
  115. {{foreach $th_deleted as $th}}<th>{{$th}}</th>{{/foreach}}
  116. </tr>
  117. </thead>
  118. <tbody>
  119. {{foreach $deleted as $u}}
  120. <tr>
  121. <td><img class='icon' src="{{$u.micro}}" alt="{{$u.nickname}}" title="{{$u.nickname}}"></td>
  122. <td class='name'><a href="{{$u.url}}" title="{{$u.nickname}}" >{{$u.name}}</a></td>
  123. <td class='email'>{{$u.email}}</td>
  124. <td class='register_date'>{{$u.register_date}}</td>
  125. <td class='login_date'>{{$u.login_date}}</td>
  126. <td class='lastitem_date'>{{$u.lastitem_date}}</td>
  127. <td class='login_date'>{{$u.deleted}}</td>
  128. </tr>
  129. {{/foreach}}
  130. </tbody>
  131. </table>
  132. {{/if}}
  133. <h3>{{$h_newuser}}</h3>
  134. <form action="{{$baseurl}}/admin/users" method="post">
  135. <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
  136. <table id='users'>
  137. <tbody>
  138. <tr>
  139. <td>{{include file="field_input.tpl" field=$newusername}}</td>
  140. </tr>
  141. <tr>
  142. <td>{{include file="field_input.tpl" field=$newusernickname}}</td>
  143. </tr>
  144. <tr>
  145. <td>{{include file="field_input.tpl" field=$newuseremail}}</td>
  146. </tr>
  147. </tbody>
  148. </table>
  149. <div class="submit"><input type="submit" name="add_new_user_submit" value="{{$submit|escape:'html'}}" /></div>
  150. </form>
  151. </div>