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:
@@ -270,8 +270,18 @@ const ROLE_LABEL = { admin: 'Admin', contributor: 'Contributor', observer: 'Obse
|
||||
:color-hex="project.category.color_hex"
|
||||
/>
|
||||
</div>
|
||||
<!-- Actions admin : Éditer (vers form complet) + Supprimer -->
|
||||
<div v-if="isAuthenticated" class="flex items-center gap-2">
|
||||
<RouterLink
|
||||
:to="{ name: 'admin-project-edit', params: { slug: project.slug } }"
|
||||
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">
|
||||
<path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"/>
|
||||
</svg>
|
||||
Éditer
|
||||
</RouterLink>
|
||||
<button
|
||||
v-if="isAuthenticated"
|
||||
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"
|
||||
@@ -282,6 +292,7 @@ const ROLE_LABEL = { admin: 'Admin', contributor: 'Contributor', observer: 'Obse
|
||||
Supprimer
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Titre + métadonnées -->
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user