✨ feat(website.twig): Ajoute une maquette pour la liste des sites internet.
This commit is contained in:
@@ -1,10 +1,92 @@
|
||||
{% extends 'artemis/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
Liste des site internet
|
||||
Liste des sites internet
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="p-6 bg-gray-900 min-h-screen text-white">
|
||||
<h1 class="text-3xl font-bold text-white mb-6">Liste des Sites Internet</h1>
|
||||
|
||||
{# DÉBUT DES DONNÉES FACTICES POUR LA PRÉVISUALISATION #}
|
||||
{% set websites = [
|
||||
{name: 'Site Alpha', client: 'SARL Alpha Conseil', ndd: 'alpha-conseil.fr', status: 'Actif'},
|
||||
{name: 'Boulangerie Bruno', client: 'EURL Pains et Délices', ndd: 'bruno-boulanger.com', status: 'En Développement'},
|
||||
{name: 'SARL Gamma', client: 'Gamma Immobilier', ndd: 'gamma-immo.net', status: 'Suspendu'},
|
||||
{name: 'Assurances Zenith', client: 'Cabinet Zenith', ndd: 'zenith-assure.fr', status: 'Actif'},
|
||||
{name: 'Projet Beta', client: 'Association Beta', ndd: 'beta-projet.org', status: 'Archivé'},
|
||||
] %}
|
||||
{# FIN DES DONNÉES FACTICES #}
|
||||
|
||||
<div class="bg-gray-800 shadow-xl rounded-lg overflow-hidden">
|
||||
<table class="min-w-full divide-y divide-gray-700">
|
||||
<thead class="bg-gray-700">
|
||||
<tr>
|
||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">
|
||||
Nom du Site
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">
|
||||
Client
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">
|
||||
Nom de Domaine (NDD)
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">
|
||||
Statut
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="bg-gray-800 divide-y divide-gray-700">
|
||||
{#
|
||||
NOTE : La variable 'websites' est définie ici avec des données factices.
|
||||
En production, elle devra être passée par votre contrôleur.
|
||||
#}
|
||||
{% if websites is defined and websites is not empty %}
|
||||
{% for website in websites %}
|
||||
<tr>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-white">
|
||||
{{ website.name }}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-400">
|
||||
{{ website.client }}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-blue-400 hover:text-blue-300">
|
||||
<a href="http://{{ website.ndd }}" target="_blank">{{ website.ndd }}</a>
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
{% set statusClass = 'bg-gray-600 text-gray-200' %}
|
||||
{% if website.status == 'Actif' %}
|
||||
{% set statusClass = 'bg-green-700/50 text-green-300' %}
|
||||
{% elseif website.status == 'Suspendu' %}
|
||||
{% set statusClass = 'bg-red-700/50 text-red-300' %}
|
||||
{% elseif website.status == 'En Développement' %}
|
||||
{% set statusClass = 'bg-yellow-700/50 text-yellow-300' %}
|
||||
{% else %}
|
||||
{% set statusClass = 'bg-indigo-700/50 text-indigo-300' %}
|
||||
{% endif %}
|
||||
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full {{ statusClass }}">
|
||||
{{ website.status }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4" class="px-6 py-4 text-center text-sm text-gray-400">
|
||||
Aucun site web trouvé.
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{# Bloc pour ajouter un site, si nécessaire #}
|
||||
<div class="mt-6 text-right">
|
||||
<a href="{{ path('artemis_esyweb') }}" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 focus:ring-offset-gray-900">
|
||||
+ Ajouter un nouveau site
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user