40 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
		
		
			
		
	
	
			40 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
|  | {% extends "base.html" %} | ||
|  | 
 | ||
|  | {% block content %} | ||
|  | <div class="container mt-4"> | ||
|  |     <h2>{{ _('User Management') }}</h2> | ||
|  |     <table class="table"> | ||
|  |         <thead> | ||
|  |             <tr> | ||
|  |                 <th>{{ _('Username') }}</th> | ||
|  |                 <th>{{ _('Actions') }}</th> | ||
|  |             </tr> | ||
|  |         </thead> | ||
|  |         <tbody> | ||
|  |             {% for user in users %} | ||
|  |             <tr> | ||
|  |                 <td> | ||
|  |                     {{ user.username }} | ||
|  |                     {% if user.is_admin %}<span class="badge bg-primary">Admin</span>{% endif %} | ||
|  |                 </td> | ||
|  |                 <td> | ||
|  |                     {% if user.id != current_user.id %} | ||
|  |                     <form method="POST" action="{{ url_for('admin_delete_user', user_id=user.id) }}" class="d-inline"> | ||
|  |                         <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"> | ||
|  |                         <button type="submit" class="btn btn-danger btn-sm">{{ _('Delete') }}</button> | ||
|  |                     </form> | ||
|  |                      | ||
|  |                     <form method="POST" action="{{ url_for('admin_reset_password', user_id=user.id) }}"> | ||
|  |                         <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"> | ||
|  |                         <button type="submit" class="btn btn-warning">{{ _('Reset Password') }}</button> | ||
|  |                     </form> | ||
|  |                     {% endif %} | ||
|  |                 </td> | ||
|  |             </tr> | ||
|  |             {% endfor %} | ||
|  |         </tbody> | ||
|  |     </table> | ||
|  | </div> | ||
|  | {% endblock %} | ||
|  | 
 |