✨ feat(templates/website): Ajoute l'affichage des métadonnées et informations du site.
This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
|
||||
<div class="mb-8 p-6 bg-gray-800 rounded-lg shadow-xl border-t-4 border-indigo-500">
|
||||
<h2 class="text-3xl font-bold text-indigo-400 mb-4">Metadonnées du Site</h2>
|
||||
|
||||
<div class="grid grid-cols-1 sm:grid-cols-3 gap-6">
|
||||
|
||||
{# Type du Site #}
|
||||
<div class="border-l-4 border-blue-500 pl-4">
|
||||
<p class="text-sm font-medium text-gray-400">Type de Site</p>
|
||||
<p class="text-xl font-semibold text-gray-100">
|
||||
{{ website.type | default('Non spécifié') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{# Statut du Site #}
|
||||
{% set statusClass = 'bg-gray-600 text-gray-200' %}
|
||||
{% if website.state == 'Actif' %}
|
||||
{% set statusClass = 'bg-green-700/50 text-green-300' %}
|
||||
{% elseif website.state == 'Suspendu' %}
|
||||
{% set statusClass = 'bg-red-700/50 text-red-300' %}
|
||||
{% elseif website.state == 'En Développement' %}
|
||||
{% set statusClass = 'bg-yellow-700/50 text-yellow-300' %}
|
||||
{% elseif website.state == 'validate' %}
|
||||
{% set statusClass = 'bg-zinc-700/50 text-zinc-300' %}
|
||||
{% elseif website.state == 'created' %}
|
||||
{% set statusClass = 'bg-stone-700/50 text-stone-300' %}
|
||||
{% else %}
|
||||
{% set statusClass = 'bg-indigo-700/50 text-indigo-300' %}
|
||||
{% endif %}
|
||||
|
||||
<div class="border-l-4 border-orange-500 pl-4">
|
||||
<p class="text-sm font-medium text-gray-400">Statut Actuel</p>
|
||||
<span class="inline-block px-3 py-1 text-sm font-bold rounded-full mt-1 {{ statusClass }} text-white shadow">
|
||||
{{ ('esyWeb_'~ website.state)|trans| default('Indéfini') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{# UUID #}
|
||||
<div class="border-l-4 border-teal-500 pl-4">
|
||||
<p class="text-sm font-medium text-gray-400">UUID (Identifiant)</p>
|
||||
<p class="text-lg font-mono text-gray-200 truncate" title="{{ website.uuid | default('UUID non disponible') }}">
|
||||
{{ website.uuid | default('N/A') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
||||
|
||||
<section class="bg-gray-800 p-6 rounded-lg shadow-xl hover:shadow-2xl transition duration-300">
|
||||
<h2 class="text-2xl font-bold text-teal-400 mb-4 border-b border-gray-700 pb-2">🌐 Serveur</h2>
|
||||
<dl class="space-y-3">
|
||||
<div class="flex justify-between items-center">
|
||||
<dt class="font-medium text-gray-300">Nom du serveur :</dt>
|
||||
<dd class="text-right text-gray-100 font-semibold">{{ website.server.name | default('N/A') }}</dd>
|
||||
</div>
|
||||
<div class="flex justify-between items-center">
|
||||
<dt class="font-medium text-gray-300">Adresse IP Externe :</dt>
|
||||
<dd class="text-right text-gray-100 font-semibold">
|
||||
<span class="font-mono bg-gray-700 px-2 py-0.5 rounded text-sm">{{ website.server.externalIp | default('N/A') }}</span>
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section class="bg-gray-800 p-6 rounded-lg shadow-xl hover:shadow-2xl transition duration-300">
|
||||
<h2 class="text-2xl font-bold text-orange-400 mb-4 border-b border-gray-700 pb-2">🤝 Revendeur</h2>
|
||||
<p class="text-xl font-semibold mb-3">{{ website.revendeur.raisonSocial | default('Raison Sociale Inconnue') }}</p>
|
||||
{% if website.revendeur.id is defined %}
|
||||
<a target="_blank" href="{{ path('artemis_revendeur_view',{id:website.revendeur.id}) }}" class="text-orange-300 hover:text-orange-200 transition duration-300 text-sm inline-flex items-center">
|
||||
Voir la fiche revendeur
|
||||
<svg class="ml-1 w-4 h-4" 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="M14 5l7 7m0 0l-7 7m7-7H3"></path></svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<section class="mt-8 bg-gray-800 p-6 rounded-lg shadow-xl">
|
||||
<h2 class="text-2xl font-bold text-purple-400 mb-4 border-b border-gray-700 pb-2">👤 Client</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<h3 class="text-xl font-semibold text-gray-200 mb-3">{{ website.customer.raisonSocial | default('Raison Sociale Inconnue') }}</h3>
|
||||
<p class="text-sm text-gray-400 mb-4">Type : <span class="font-medium text-purple-300">{{ website.customer.type|trans | default('N/A') }}</span></p>
|
||||
|
||||
<div class="space-y-2 text-gray-300">
|
||||
<p><strong class="text-gray-100">Adresse :</strong> {{ website.customer.address | default('N/A') }}</p>
|
||||
<p><strong class="text-gray-100">Code Postal :</strong> {{ website.customer.zipcode | default('N/A') }}</p>
|
||||
<p><strong class="text-gray-100">Ville :</strong> {{ website.customer.city | default('N/A') }}</p>
|
||||
<p><strong class="text-gray-100">Pays :</strong> {{ website.customer.country | default('N/A') }}</p>
|
||||
</div>
|
||||
|
||||
{% if website.customer.id is defined %}
|
||||
<a target="_blank" href="{{ path('artemis_intranet_customer_view',{id:website.customer.id}) }}" class="mt-4 text-purple-300 hover:text-purple-200 transition duration-300 text-sm inline-flex items-center">
|
||||
Voir la fiche client
|
||||
<svg class="ml-1 w-4 h-4" 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="M14 5l7 7m0 0l-7 7m7-7H3"></path></svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="md:border-l md:border-gray-700 md:pl-6">
|
||||
<h3 class="text-xl font-semibold text-gray-200 mb-3">📞 Contact Principal</h3>
|
||||
<dl class="space-y-2">
|
||||
<div class="text-gray-300">
|
||||
<dt class="font-medium text-gray-100">Nom :</dt>
|
||||
<dd class="text-gray-200">{{ website.customer.mainContact.name | default('N/A') }} {{ website.customer.mainContact.surname | default('') }}</dd>
|
||||
</div>
|
||||
<div class="text-gray-300">
|
||||
<dt class="font-medium text-gray-100">Email :</dt>
|
||||
<dd>
|
||||
{% if website.customer.mainContact.email is defined %}
|
||||
<a href="mailto:{{ website.customer.mainContact.email }}" class="text-blue-400 hover:text-blue-300">{{ website.customer.mainContact.email }}</a>
|
||||
{% else %}
|
||||
N/A
|
||||
{% endif %}
|
||||
</dd>
|
||||
</div>
|
||||
<div class="text-gray-300">
|
||||
<dt class="font-medium text-gray-100">Téléphone :</dt>
|
||||
<dd>
|
||||
{% if website.customer.mainContact.phone is defined %}
|
||||
<a href="tel:{{ website.customer.mainContact.phone }}" class="text-blue-400 hover:text-blue-300">{{ website.customer.mainContact.phone }}</a>
|
||||
{% else %}
|
||||
N/A
|
||||
{% endif %}
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user