Files
gexp/templates/users.html
T

67 lines
2.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% block title %}إدارة المستخدمين - سجل العقارات اللبناني{% endblock %}
{% block content %}
<div class="admin-container">
<div class="page-header">
<h1>إدارة النظام والمستخدمين</h1>
</div>
{% if backup_msg %}
<div class="success-banner">{{ backup_msg }}</div>
{% endif %}
<div class="admin-section">
<h3>💾 نسخ احتياطي لقاعدة البيانات</h3>
<p>قم بإنشاء نسخة احتياطية من قاعدة البيانات الحالية.</p>
<a href="/auth/backup" class="btn btn-success">إنشاء نسخة احتياطية</a>
</div>
<div class="admin-section">
<h3> إضافة مستخدم جديد</h3>
<form method="post" action="/auth/users/create" class="add-user-form">
<div class="form-group">
<label for="username">اسم المستخدم</label>
<input type="text" id="username" name="username" required>
</div>
<div class="form-group">
<label for="password">كلمة المرور</label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit" class="btn btn-primary">إضافة</button>
</form>
</div>
<div class="admin-section">
<h3>👥 المستخدمين</h3>
<div class="table-wrapper">
<table class="results-table">
<thead>
<tr>
<th>الرقم</th>
<th>اسم المستخدم</th>
<th>تاريخ الإنشاء</th>
<th></th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td>{{ user.id }}</td>
<td>{{ user.username }}</td>
<td>{{ user.created_at }}</td>
<td>
<form method="post" action="/auth/users/delete/{{ user.id }}" onsubmit="return confirm('هل أنت متأكد من حذف هذا المستخدم؟');" style="display:inline;">
<button type="submit" class="btn btn-sm btn-danger">حذف</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}