From 2301d6843497514fbd1a1483ec23f831989f7c98 Mon Sep 17 00:00:00 2001 From: Noah Lancien Date: Wed, 13 May 2026 17:36:41 +0200 Subject: [PATCH] feat: :sparkles: Suggest existing tags in media edition --- app/Http/Controllers/MediaController.php | 2 ++ .../components/media-manager/media-editor/MmEditComponent.vue | 3 +++ .../media-manager/media-editor/tabs/MeEditComponent.vue | 4 ++-- resources/views/layouts/media_edit.blade.php | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/MediaController.php b/app/Http/Controllers/MediaController.php index 26b0d8e..a487634 100644 --- a/app/Http/Controllers/MediaController.php +++ b/app/Http/Controllers/MediaController.php @@ -84,6 +84,7 @@ class MediaController extends Controller $naturesfichier = ArcadiaNatureFichier::all(); $typescontenu = ArcadiaTypeContenu::all(); $anglesprisevue = ArcadiaAnglePriseVue::all(); + $tags = Tag::query()->orderBy('libelle')->get(); /** @var int|null */ $dossier_id = $request->d; @@ -131,6 +132,7 @@ class MediaController extends Controller 'naturesfichier' => $naturesfichier, 'typescontenu' => $typescontenu, 'anglesprisevue' => $anglesprisevue, + 'tags' => $tags, 'langues' => $langues, 'copyrights' => $copyrights, 'etiquettes' => $etiquettes, diff --git a/resources/js/components/media-manager/media-editor/MmEditComponent.vue b/resources/js/components/media-manager/media-editor/MmEditComponent.vue index 53a4819..28df2bc 100644 --- a/resources/js/components/media-manager/media-editor/MmEditComponent.vue +++ b/resources/js/components/media-manager/media-editor/MmEditComponent.vue @@ -92,6 +92,7 @@ :naturesfichier="naturesfichier" :typescontenu="typescontenu" :anglesprisevue="anglesprisevue" + :tags="tags" @closeEdit="close" /> @@ -131,6 +132,7 @@ export default { this.naturesfichier = data.naturesfichier; this.typescontenu = data.typescontenu; this.anglesprisevue = data.anglesprisevue; + this.tags = data.tags; if (this.open !== undefined) { this.$store.commit({ type: "updateMedia", @@ -172,6 +174,7 @@ export default { naturesfichier: [], typescontenu: [], anglesprisevue: [], + tags: [], }; }, watch: { diff --git a/resources/js/components/media-manager/media-editor/tabs/MeEditComponent.vue b/resources/js/components/media-manager/media-editor/tabs/MeEditComponent.vue index 3c485de..f515857 100644 --- a/resources/js/components/media-manager/media-editor/tabs/MeEditComponent.vue +++ b/resources/js/components/media-manager/media-editor/tabs/MeEditComponent.vue @@ -368,7 +368,7 @@
$naturesfichier, 'typescontenu' => $typescontenu, 'anglesprisevue' => $anglesprisevue, + 'tags' => $tags, ]; if(session('autoOpen')) { $dataVue['open'] = session('autoOpen');