Crée une page pour lister et gérer les tutoriels ESY-WEB dans Artemis. Ajoute un formulaire pour créer de nouveaux tutoriels. Gère l'upload de fichiers mp4 pour les tutoriels.
218 lines
14 KiB
Twig
218 lines
14 KiB
Twig
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Mainframe - {% block title %}{% endblock %}</title>
|
|
<meta name="robots" content="noindex">
|
|
|
|
{{ vite_asset('admin.js',[]) }}
|
|
|
|
<link rel="stylesheet" href="{{ asset('assets/icons/css/all.min.css') }}">
|
|
|
|
|
|
<style>
|
|
/* Custom styles */
|
|
body {
|
|
font-family: 'Inter', sans-serif;
|
|
}
|
|
/* Custom scrollbar for webkit browsers */
|
|
.sidebar-scroll::-webkit-scrollbar {
|
|
width: 4px;
|
|
}
|
|
.sidebar-scroll::-webkit-scrollbar-track {
|
|
background-color: #1f2937;
|
|
}
|
|
.sidebar-scroll::-webkit-scrollbar-thumb {
|
|
background-color: #4b5563;
|
|
border-radius: 20px;
|
|
}
|
|
/* Hide submenu by default */
|
|
.submenu {
|
|
max-height: 0;
|
|
overflow: hidden;
|
|
transition: max-height 0.3s ease-out;
|
|
}
|
|
/* Show submenu when active */
|
|
.submenu.active {
|
|
max-height: 500px; /* A value large enough to contain all submenu items */
|
|
transition: max-height 0.3s ease-in;
|
|
}
|
|
/* Rotate arrow icon */
|
|
.arrow-icon {
|
|
transition: transform 0.3s ease-in-out;
|
|
}
|
|
.arrow-icon.rotate {
|
|
transform: rotate(90deg);
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
<body class="bg-gray-100 dark:bg-gray-900 text-gray-900 dark:text-gray-100">
|
|
|
|
<div class="flex h-screen bg-gray-100 dark:bg-gray-900">
|
|
<!-- Sidebar -->
|
|
<aside id="sidebar" class="fixed top-0 left-0 z-40 w-64 h-screen bg-white dark:bg-gray-800 shadow-lg transform -translate-x-full md:translate-x-0 transition-transform duration-300 ease-in-out">
|
|
<div class="flex items-center justify-center h-20 border-b dark:border-gray-700">
|
|
<h1 class="text-2xl font-bold ml-2">Mainframe</h1>
|
|
</div>
|
|
<nav class="mt-4 flex-1 sidebar-scroll overflow-y-auto" style="height: calc(100vh - 80px);">
|
|
<ul>
|
|
<!-- Dashboard Link -->
|
|
<li class="px-4 py-2">
|
|
<a href="{{ path('artemis_dashboard') }}" class="flex items-center p-2 text-base font-normal text-gray-900 dark:text-white {% if app.request.get('_route') == "artemis_dashboard"%}bg-gray-200 dark:bg-gray-700{% endif%} rounded-lg">
|
|
<svg class="w-6 h-6 text-gray-500 dark:text-gray-400" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path><path d="M12 2.252A8.014 8.014 0 0117.748 12H12V2.252z"></path></svg>
|
|
<span class="ml-3">Tableau de bord</span>
|
|
</a>
|
|
</li>
|
|
<li class="px-4 py-2">
|
|
<button class="flex items-center justify-between w-full p-2 text-base font-normal text-gray-900 dark:text-white rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none" data-submenu-toggle="cmsesyweb">
|
|
<div class="flex items-center">
|
|
<svg class="w-6 h-6 text-gray-500 dark:text-gray-400" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path><path d="M12 2.252A8.014 8.014 0 0117.748 12H12V2.252z"></path></svg>
|
|
<span class="ml-3">CMS ESY-WEB</span>
|
|
</div>
|
|
<svg class="w-4 h-4 text-gray-500 dark:text-gray-400 arrow-icon" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>
|
|
</button>
|
|
<ul id="submenu-cmsesyweb" class="submenu ml-6 mt-2 space-y-2">
|
|
<li>
|
|
<a href="{{ path('artemis_esyweb_tuto') }}" class="flex items-center p-2 text-sm font-normal text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
<span class="ml-3">Tutoriels</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="px-4 py-2">
|
|
<button class="flex items-center justify-between w-full p-2 text-base font-normal text-gray-900 dark:text-white rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none" data-submenu-toggle="infrastructure">
|
|
<div class="flex items-center">
|
|
<svg class="w-6 h-6 text-gray-500 dark:text-gray-400" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path><path d="M12 2.252A8.014 8.014 0 0117.748 12H12V2.252z"></path></svg>
|
|
<span class="ml-3">Infrastructure</span>
|
|
</div>
|
|
<svg class="w-4 h-4 text-gray-500 dark:text-gray-400 arrow-icon" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>
|
|
</button>
|
|
<ul id="submenu-infrastructure" class="submenu ml-6 mt-2 space-y-2">
|
|
<li>
|
|
<a href="{{ path('artemis_infrastructure_server') }}" class="flex items-center p-2 text-sm font-normal text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
<span class="ml-3">Serveurs</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="px-4 py-2">
|
|
<button class="flex items-center justify-between w-full p-2 text-base font-normal text-gray-900 dark:text-white rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none" data-submenu-toggle="intranet">
|
|
<div class="flex items-center">
|
|
<svg class="w-6 h-6 text-gray-500 dark:text-gray-400" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path>
|
|
<path d="M12 2.252A8.014 8.014 0 0117.748 12H12V2.252z"></path>
|
|
</svg>
|
|
<span class="ml-3">Intranet</span>
|
|
</div>
|
|
<svg class="w-4 h-4 text-gray-500 dark:text-gray-400 arrow-icon" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path>
|
|
</svg>
|
|
</button>
|
|
<ul id="submenu-intranet" class="submenu ml-6 mt-2 space-y-2">
|
|
<li>
|
|
<a href="{{ path('artemis_intranet_customer') }}" class="flex items-center p-2 text-base font-normal text-gray-900 dark:text-white {% if app.request.get('_route') == 'artemis_intranet_customer' %}bg-gray-200 dark:bg-gray-700{% endif %} rounded-lg">
|
|
<span class="ml-3">Client(s)</span>
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</li>
|
|
<li class="px-4 py-2">
|
|
<button class="flex items-center justify-between w-full p-2 text-base font-normal text-gray-900 dark:text-white rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none" data-submenu-toggle="revendeur">
|
|
<div class="flex items-center">
|
|
<svg class="w-6 h-6 text-gray-500 dark:text-gray-400" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path><path d="M12 2.252A8.014 8.014 0 0117.748 12H12V2.252z"></path></svg>
|
|
<span class="ml-3">Revendeur</span>
|
|
</div>
|
|
<svg class="w-4 h-4 text-gray-500 dark:text-gray-400 arrow-icon" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>
|
|
</button>
|
|
<ul id="submenu-revendeur" class="submenu ml-6 mt-2 space-y-2">
|
|
<li>
|
|
<a href="{{ path('artemis_revendeur') }}" class="flex items-center p-2 text-sm font-normal text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
<span class="ml-3">Revendeur</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
{% if is_granted('ROLE_ADMIN') %}
|
|
<li class="px-4 py-2">
|
|
<button class="flex items-center justify-between w-full p-2 text-base font-normal text-gray-900 dark:text-white rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none" data-submenu-toggle="settings">
|
|
<div class="flex items-center">
|
|
<i class="fad fa-cogs"></i>
|
|
<span class="ml-3">Paramétres</span>
|
|
</div>
|
|
<svg class="w-4 h-4 text-gray-500 dark:text-gray-400 arrow-icon" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>
|
|
</button>
|
|
<ul id="submenu-settings" class="submenu ml-6 mt-2 space-y-2">
|
|
<li>
|
|
<a href="{{ path('artemis_settings_accountAdmin') }}" class="flex items-center p-2 text-base font-normal text-gray-900 dark:text-white {% if app.request.get('_route') == "artemis_settings_accountAdmin"%}bg-gray-200 dark:bg-gray-700{% endif%} rounded-lg">
|
|
<i class="fad fa-users"></i>
|
|
<span class="ml-3">Administrateur</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
</aside>
|
|
|
|
<!-- Main content -->
|
|
<div class="flex flex-col flex-1 md:ml-64 transition-all duration-300 ease-in-out">
|
|
<!-- Header -->
|
|
<header class="flex items-center justify-between h-20 px-6 bg-white dark:bg-gray-800 border-b dark:border-gray-700">
|
|
<button id="sidebar-toggle" class="text-gray-500 dark:text-gray-400 focus:outline-none focus:text-gray-600 dark:focus:text-gray-300 md:hidden">
|
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
|
</button>
|
|
<div class="relative w-full max-w-md md:ml-0 ml-4">
|
|
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
|
<svg class="w-5 h-5 text-gray-400" viewBox="0 0 24 24" fill="none"><path d="M21 21L15 15M17 10C17 13.866 13.866 17 10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>
|
|
</span>
|
|
<input type="text" class="w-full py-2 pl-10 pr-4 text-gray-700 bg-white border rounded-md dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-500 focus:outline-none focus:ring" placeholder="Recherchée">
|
|
</div>
|
|
<div class="flex items-center">
|
|
|
|
<div class="relative">
|
|
<a href="{{ path('artemis_profils') }}" class="relative z-10 block w-8 h-8 overflow-hidden rounded-full shadow focus:outline-none">
|
|
{% if app.user.avatarOriginalName is defined and app.user.avatarOriginalName is not empty %}
|
|
<img src="{{ vich_uploader_asset(app.user,'avatar') | imagine_filter('webp') }}" alt="Avatar de {{ app.user.username }}" class="object-cover w-full h-full">
|
|
{% else %}
|
|
<img src="{{ path('artemis_avatar') }}" alt="Avatar de {{ app.user.username }}" class="object-cover w-full h-full">
|
|
{% endif %}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="flash-messages-container" class="absolute top-4 right-4 z-50 space-y-2 w-full max-w-xs">
|
|
{# This block demonstrates how Symfony flash messages would be displayed. #}
|
|
{# They are typically set in your Symfony controller and then iterated over in Twig. #}
|
|
{% for label, messages in app.flashes %}
|
|
{% for message in messages %}
|
|
<div class="p-4 rounded-lg shadow-md flex items-center justify-between transition-opacity duration-300
|
|
{% if label == 'success' %} bg-green-100 text-green-800 dark:bg-green-800 dark:text-green-100
|
|
{% elseif label == 'error' %} bg-red-100 text-red-800 dark:bg-red-800 dark:text-red-100
|
|
{% elseif label == 'warning' %} bg-yellow-100 text-yellow-800 dark:bg-yellow-800 dark:text-yellow-100
|
|
{% else %} bg-blue-100 text-blue-800 dark:bg-blue-800 dark:text-blue-100
|
|
{% endif %}">
|
|
<span>{{ message }}</span>
|
|
</div>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</div>
|
|
</header>
|
|
|
|
<!-- Content -->
|
|
<main class="flex-1 p-6 overflow-y-auto">
|
|
{% block content %}
|
|
{% endblock %}
|
|
</main>
|
|
</div>
|
|
</div>
|
|
|
|
<security-wall></security-wall>
|
|
{#<ip-wall></ip-wall>#}
|
|
<lockdown-wall></lockdown-wall>
|
|
</body>
|
|
</html>
|