| <!doctype html> |
| <html lang="fr"> |
| <head> |
| <meta charset="UTF-8" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| <title> |
| {% block title %}Administration{% endblock %} - {{ app_name }} |
| </title> |
| <script src="https://cdn.tailwindcss.com"></script> |
| <link |
| rel="stylesheet" |
| href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" |
| /> |
| <style> |
| body { |
| font-family: |
| "Inter", |
| system-ui, |
| -apple-system, |
| sans-serif; |
| } |
| .sidebar-link { |
| transition: all 0.2s ease; |
| } |
| .sidebar-link:hover { |
| background-color: rgba(234, 179, 8, 0.1); |
| border-left-color: #eab308; |
| } |
| .sidebar-link.active { |
| background-color: rgba(234, 179, 8, 0.15); |
| border-left-color: #eab308; |
| color: #eab308; |
| } |
| </style> |
| </head> |
| <body class="bg-gray-900 text-gray-100 min-h-screen"> |
| <div class="flex min-h-screen"> |
| |
| <aside |
| class="w-64 bg-gray-800 border-r border-gray-700 fixed h-full" |
| > |
| |
| <div class="p-6 border-b border-gray-700"> |
| <div class="flex items-center space-x-3"> |
| {% if app_logo %} |
| <img |
| src="{{ app_logo }}" |
| alt="{{ app_name }}" |
| class="w-10 h-10 rounded-lg" |
| /> |
| {% else %} |
| <div |
| class="w-10 h-10 bg-gradient-to-br from-yellow-400 to-yellow-600 rounded-lg flex items-center justify-center" |
| > |
| <i class="fas fa-cog text-white text-lg"></i> |
| </div> |
| {% endif %} |
| <div> |
| <h1 class="text-lg font-bold text-yellow-400"> |
| {{ app_name }} |
| </h1> |
| <p class="text-xs text-gray-400">Administration</p> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <nav class="p-4 space-y-2"> |
| <a |
| href="{{ url_for('admin_panel.dashboard') }}" |
| class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if request.endpoint == 'admin_panel.dashboard' %}active{% endif %}" |
| > |
| <i class="fas fa-tachometer-alt w-5 mr-3"></i> |
| Tableau de Bord |
| </a> |
|
|
| <a |
| href="{{ url_for('admin_panel.users') }}" |
| class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if 'users' in request.endpoint or 'user_detail' in request.endpoint %}active{% endif %}" |
| > |
| <i class="fas fa-users w-5 mr-3"></i> |
| Utilisateurs |
| </a> |
|
|
| <a |
| href="{{ url_for('admin_panel.withdrawals') }}" |
| class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if 'withdrawal' in request.endpoint %}active{% endif %}" |
| > |
| <i class="fas fa-money-bill-wave w-5 mr-3"></i> |
| Retraits {% if pending_withdrawals_count is defined and |
| pending_withdrawals_count > 0 %} |
| <span |
| class="ml-auto bg-red-500 text-white text-xs font-bold px-2 py-1 rounded-full" |
| >{{ pending_withdrawals_count }}</span |
| > |
| {% endif %} |
| </a> |
|
|
| <a |
| href="{{ url_for('admin_panel.transactions') }}" |
| class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if request.endpoint == 'admin_panel.transactions' %}active{% endif %}" |
| > |
| <i class="fas fa-exchange-alt w-5 mr-3"></i> |
| Transactions |
| </a> |
|
|
| <a |
| href="{{ url_for('admin_panel.referral_commissions') }}" |
| class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if 'referral_commissions' in request.endpoint %}active{% endif %}" |
| > |
| <i class="fas fa-share-nodes w-5 mr-3"></i> |
| Commissions Parrainage |
| </a> |
|
|
| <a |
| href="{{ url_for('admin_panel.metals') }}" |
| class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if 'metals' in request.endpoint %}active{% endif %}" |
| > |
| <i class="fas fa-gem w-5 mr-3"></i> |
| Plans / Métaux |
| </a> |
|
|
| <div class="pt-4 mt-4 border-t border-gray-700"> |
| <p |
| class="px-4 text-xs text-gray-500 uppercase tracking-wider mb-2" |
| > |
| Configuration |
| </p> |
|
|
| <a |
| href="{{ url_for('admin_panel.settings') }}" |
| class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if 'settings' in request.endpoint %}active{% endif %}" |
| > |
| <i class="fas fa-sliders-h w-5 mr-3"></i> |
| Paramètres Généraux |
| </a> |
|
|
| <a |
| href="{{ url_for('admin_tasks.list_tasks') }}" |
| class="sidebar-link flex items-center px-4 py-3 rounded-lg border-l-4 border-transparent text-gray-300 hover:text-yellow-400 {% if 'tasks' in request.endpoint %}active{% endif %}" |
| > |
| <i class="fas fa-clock w-5 mr-3"></i> |
| Tâches Planifiées |
| </a> |
| </div> |
| </nav> |
|
|
| |
| <div |
| class="absolute bottom-0 left-0 right-0 p-4 border-t border-gray-700" |
| > |
| <a |
| href="{{ url_for('main.index') }}" |
| class="flex items-center px-4 py-2 text-gray-400 hover:text-yellow-400 transition-colors" |
| > |
| <i class="fas fa-arrow-left w-5 mr-3"></i> |
| Retour au Site |
| </a> |
| </div> |
| </aside> |
|
|
| |
| <div class="flex-1 ml-64"> |
| |
| <header |
| class="bg-gray-800 border-b border-gray-700 px-8 py-4 sticky top-0 z-10" |
| > |
| <div class="flex items-center justify-between"> |
| <h2 class="text-xl font-semibold text-white"> |
| {% block page_title %}Administration{% endblock %} |
| </h2> |
| <div class="flex items-center space-x-4"> |
| <span class="text-sm text-gray-400"> |
| <i |
| class="fas fa-shield-alt mr-2 text-green-400" |
| ></i> |
| Accès Administration |
| </span> |
| </div> |
| </div> |
| </header> |
|
|
| |
| {% with messages = get_flashed_messages(with_categories=true) %} |
| {% if messages %} |
| <div class="px-8 pt-4"> |
| {% for category, message in messages %} |
| <div |
| class="mb-4 p-4 rounded-lg {% if category == 'error' %}bg-red-900/50 border border-red-600 text-red-200{% elif category == 'success' %}bg-green-900/50 border border-green-600 text-green-200{% elif category == 'warning' %}bg-yellow-900/50 border border-yellow-600 text-yellow-200{% else %}bg-blue-900/50 border border-blue-600 text-blue-200{% endif %}" |
| > |
| <div class="flex items-center"> |
| <i |
| class="fas {% if category == 'error' %}fa-exclamation-circle{% elif category == 'success' %}fa-check-circle{% elif category == 'warning' %}fa-exclamation-triangle{% else %}fa-info-circle{% endif %} mr-3" |
| ></i> |
| {{ message }} |
| </div> |
| </div> |
| {% endfor %} |
| </div> |
| {% endif %} {% endwith %} |
|
|
| |
| <main class="p-8">{% block content %}{% endblock %}</main> |
| </div> |
| </div> |
|
|
| {% block scripts %}{% endblock %} |
| </body> |
| </html> |
|
|