Met des pictos sur la page clients et aligne les contrôles
Ajouter / Enregistrer (primary), Réinitialiser la couleur, Archiver / Réactiver et Supprimer deviennent des icônes groupées ; les SVG sont centralisés dans la macro _icons.html. Hauteurs communes (--control, --control-sm) pour champs, pastilles de couleur et boutons-icônes ; les pastilles ne s'étirent plus. Tiret devant les projets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
80d22caea8
commit
d2d8e94aba
4 files changed
+62
-26
No files matched your search
+30
-17
@@ -1,4 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
{% import "_icons.html" as icons %}
|
||||
{% block title %}Clients{% endblock %}
|
||||
{% block content %}
|
||||
<section class="card">
|
||||
@@ -6,7 +7,7 @@
|
||||
<form method="post" action="/ui/clients" class="row">
|
||||
<input type="color" name="color" value="{{ next_color }}" aria-label="Couleur du client">
|
||||
<input name="name" required placeholder="Nom du client" aria-label="Nom du client" class="grow">
|
||||
<button class="btn primary">Ajouter</button>
|
||||
<button class="btn icon primary" title="Ajouter le client" aria-label="Ajouter le client">{% call icons::icon("plus") %}{% endcall %}</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@@ -20,17 +21,22 @@
|
||||
<form method="post" action="/ui/clients/{{ c.client.id }}" class="row grow">
|
||||
<input type="color" name="color" value="{{ c.client.color }}" aria-label="Couleur du client">
|
||||
<input name="name" value="{{ c.client.name }}" required aria-label="Nom du client" class="title-input">
|
||||
<button class="btn">Enregistrer</button>
|
||||
<button class="btn icon primary" title="Enregistrer" aria-label="Enregistrer">{% call icons::icon("check") %}{% endcall %}</button>
|
||||
</form>
|
||||
<div class="row">
|
||||
{% if c.client.archived %}<span class="badge">archivé</span>{% endif %}
|
||||
<form method="post" action="/ui/clients/{{ c.client.id }}/archive">
|
||||
<form id="archive-client-{{ c.client.id }}" method="post" action="/ui/clients/{{ c.client.id }}/archive" hidden>
|
||||
<input type="hidden" name="archived" value="{{ !c.client.archived }}">
|
||||
<button class="btn">{% if c.client.archived %}Réactiver{% else %}Archiver{% endif %}</button>
|
||||
</form>
|
||||
<form method="post" action="/ui/clients/{{ c.client.id }}/delete" data-confirm="Supprimer ce client, ses projets et tout le temps saisi ?">
|
||||
<button class="btn danger">Supprimer</button>
|
||||
</form>
|
||||
<form id="delete-client-{{ c.client.id }}" method="post" action="/ui/clients/{{ c.client.id }}/delete" data-confirm="Supprimer ce client, ses projets et tout le temps saisi ?" hidden></form>
|
||||
<div class="btn-group">
|
||||
{% if c.client.archived %}
|
||||
<button class="btn icon" form="archive-client-{{ c.client.id }}" title="Réactiver" aria-label="Réactiver">{% call icons::icon("unarchive") %}{% endcall %}</button>
|
||||
{% else %}
|
||||
<button class="btn icon" form="archive-client-{{ c.client.id }}" title="Archiver" aria-label="Archiver">{% call icons::icon("archive") %}{% endcall %}</button>
|
||||
{% endif %}
|
||||
<button class="btn icon danger" form="delete-client-{{ c.client.id }}" title="Supprimer" aria-label="Supprimer">{% call icons::icon("trash") %}{% endcall %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -41,20 +47,27 @@
|
||||
<input type="color" name="color" value="{{ p.effective_color }}" aria-label="Couleur du projet"
|
||||
title="{% if p.color.is_some() %}Couleur propre au projet{% else %}Couleur du client{% endif %}">
|
||||
<input name="name" value="{{ p.name }}" required aria-label="Nom du projet">
|
||||
<button class="btn small">Enregistrer</button>
|
||||
{% if p.color.is_some() %}
|
||||
<button class="btn small" name="inherit" value="true" title="Reprendre la couleur du client">↺</button>
|
||||
{% endif %}
|
||||
<div class="btn-group">
|
||||
<button class="btn small icon primary" title="Enregistrer" aria-label="Enregistrer">{% call icons::icon("check") %}{% endcall %}</button>
|
||||
{% if p.color.is_some() %}
|
||||
<button class="btn small icon" name="inherit" value="true" title="Reprendre la couleur du client" aria-label="Reprendre la couleur du client">{% call icons::icon("reset") %}{% endcall %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
{% if p.archived %}<span class="badge">archivé</span>{% endif %}
|
||||
<form method="post" action="/ui/projects/{{ p.id }}/archive">
|
||||
<form id="archive-project-{{ p.id }}" method="post" action="/ui/projects/{{ p.id }}/archive" hidden>
|
||||
<input type="hidden" name="archived" value="{{ !p.archived }}">
|
||||
<button class="btn small">{% if p.archived %}Réactiver{% else %}Archiver{% endif %}</button>
|
||||
</form>
|
||||
<form method="post" action="/ui/projects/{{ p.id }}/delete" data-confirm="Supprimer ce projet et tout le temps saisi dessus ?">
|
||||
<button class="btn small danger">Supprimer</button>
|
||||
</form>
|
||||
<form id="delete-project-{{ p.id }}" method="post" action="/ui/projects/{{ p.id }}/delete" data-confirm="Supprimer ce projet et tout le temps saisi dessus ?" hidden></form>
|
||||
<div class="btn-group">
|
||||
{% if p.archived %}
|
||||
<button class="btn small icon" form="archive-project-{{ p.id }}" title="Réactiver" aria-label="Réactiver">{% call icons::icon("unarchive") %}{% endcall %}</button>
|
||||
{% else %}
|
||||
<button class="btn small icon" form="archive-project-{{ p.id }}" title="Archiver" aria-label="Archiver">{% call icons::icon("archive") %}{% endcall %}</button>
|
||||
{% endif %}
|
||||
<button class="btn small icon danger" form="delete-project-{{ p.id }}" title="Supprimer" aria-label="Supprimer">{% call icons::icon("trash") %}{% endcall %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
@@ -63,7 +76,7 @@
|
||||
<form method="post" action="/ui/clients/{{ c.client.id }}/projects" class="row">
|
||||
<input type="color" name="color" value="{{ c.client.color }}" aria-label="Couleur du projet" title="Garder la couleur du client ou en choisir une autre">
|
||||
<input name="name" required placeholder="Nouveau projet" aria-label="Nouveau projet" class="grow">
|
||||
<button class="btn">Ajouter le projet</button>
|
||||
<button class="btn icon primary" title="Ajouter le projet" aria-label="Ajouter le projet">{% call icons::icon("plus") %}{% endcall %}</button>
|
||||
</form>
|
||||
</section>
|
||||
{% endfor %}
|
||||
|
||||
Reference in new issue
Block a user