diasporadiaries

a platform for writing stories with personal accounts and messages
git clone https://git.parazyd.org/diasporadiaries
Log | Files | Refs | Submodules | README | LICENSE

users.html (3020B)


      1 {% include 'header.html' %}
      2 
      3   <title>Users | Diaspora Diaries</title>
      4 
      5 {% include 'nav.html' %}
      6 
      7   <main role="main" class="container-fluid">
      8 
      9   <h1 class="cover-heading">Users</h1>
     10   <hr>
     11 
     12   <div class="table-responsive">
     13   <table class="table table-sm table-striped table-hover">
     14     <thead class="thead-dark">
     15       <tr>
     16         <th scope="col">#</th>
     17         <th scope="col">Name</th>
     18         <th scope="col">Email</th>
     19         <th scope="col">Password</th>
     20         <th scope="col">Cap</th>
     21         <th scope="col">Active</th>
     22         <th scope="col">First seen</th>
     23         <th scope="col">Apply</th>
     24         <th scope="col">Delete</th>
     25       </tr>
     26     </thead>
     27     <tbody>
     28     {% for i in users %}
     29       <tr>
     30         <th scope="row">
     31           <form action="/users" method="POST" id="form_{{ i['id'] }}">
     32             <input type="hidden" name="id" value="{{ i['id'] }}">
     33           </form>
     34           {{ i['id'] }}
     35         </th>
     36         <td>
     37           <a href="/profile?id={{ i['id'] }}">{{ i['name'] }}</a>
     38         </td>
     39         <td>{{ i['email'] }}</td>
     40         <td><input form="form_{{ i['id'] }}" class="form-control" type="text" name="password" placeholder="New password"></td>
     41         <td><input form="form_{{ i['id'] }}" class="form-control" type="text" name="cap" placeholder="{{ i['cap'] }} (0=writer, 2=admin)"></td>
     42         <td>{{ i['is_active'] }}</td>
     43         <td>{{ parsetime(i['first_seen']) }}</td>
     44         <td>
     45           <button type="submit" form="form_{{ i['id'] }}" class="btn btn-outline-success">
     46             <span class="fa fa-check"></span>
     47           </button>
     48         </td>
     49         <td>
     50           <button type="button" class="btn btn-outline-danger" data-toggle="modal" data-target="#deleteModal_{{ i['id'] }}">
     51             <span class="fa fa-times"></span>
     52           </button>
     53 
     54 
     55           <div class="modal fade" id="deleteModal_{{ i['id'] }}" tabindex="-1" role="dialog" aria-labelledby="deleteModal_{{ i['id'] }}_Title" aria-hidden="true">
     56             <div class="modal-dialog modal-dialog-centered" role="document">
     57               <div class="modal-content">
     58                 <div class="modal-header">
     59                   <h5 class="modal-title" id="deleteModal_{{ i['id'] }}_LongTitle">Delete user?</h5>
     60                   <button type="button" class="close" data-dismiss="modal" aria-label="Close">
     61                     <span aria-hidden="true">&times;</span>
     62                   </button>
     63                 </div>
     64                 <div class="modal-body">
     65                   <p>Are you sure you wish to delete this user?</p>
     66                 </div>
     67                 <div class="modal-footer">
     68                   <button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Close</button>
     69                   <a href="/users?delid={{ i['id'] }}" class="btn btn-outline-danger">Delete</a>
     70                 </div>
     71               </div>
     72             </div>
     73           </div>
     74         </td>
     75       </tr>
     76     {% endfor %}
     77     </tbody>
     78   </table>
     79   </div>
     80 
     81   </main>
     82 
     83 {% include 'footer.html' %}