feat(admin): bouton Éditer sur la fiche projet (mode admin)

La fiche projet publique /projects/:slug avait déjà des actions inline
en mode admin (Supprimer, ajouter étape, ajouter ressource, etc.), mais
pas de raccourci pour basculer vers le form d'édition complet où on
peut changer titre, slug, catégorie, status, descriptions, progression.

Ajout d'un bouton "Éditer" à côté de "Supprimer" en haut à droite (admin
only) qui pointe vers /admin/projects/:slug/edit. Style outline blanc
pour ne pas concurrencer visuellement le rouge de Supprimer.

Cohérent avec les autres tableaux admin où le clic sur le titre ouvre
maintenant l'édition.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-29 13:55:19 +02:00
parent 2b7d55581f
commit f1df7ae1b5
+22 -11
View File
@@ -270,17 +270,28 @@ const ROLE_LABEL = { admin: 'Admin', contributor: 'Contributor', observer: 'Obse
:color-hex="project.category.color_hex" :color-hex="project.category.color_hex"
/> />
</div> </div>
<button <!-- Actions admin : Éditer (vers form complet) + Supprimer -->
v-if="isAuthenticated" <div v-if="isAuthenticated" class="flex items-center gap-2">
type="button" <RouterLink
class="flex items-center gap-1.5 bg-red-500 text-white rounded-lg px-3 py-1.5 text-sm font-medium hover:bg-red-600" :to="{ name: 'admin-project-edit', params: { slug: project.slug } }"
@click="deleteProject" class="flex items-center gap-1.5 border border-donut-border bg-donut-surface rounded-lg px-3 py-1.5 text-sm font-medium text-donut-text hover:bg-gray-50"
> >
<svg viewBox="0 0 24 24" class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <svg viewBox="0 0 24 24" class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/> <path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"/>
</svg> </svg>
Supprimer Éditer
</button> </RouterLink>
<button
type="button"
class="flex items-center gap-1.5 bg-red-500 text-white rounded-lg px-3 py-1.5 text-sm font-medium hover:bg-red-600"
@click="deleteProject"
>
<svg viewBox="0 0 24 24" class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/>
</svg>
Supprimer
</button>
</div>
</div> </div>
<!-- Titre + métadonnées --> <!-- Titre + métadonnées -->