From 6164e98a11c2437fd6258672ad7fd636d2b66574 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Fri, 23 Sep 2022 21:04:03 +0200 Subject: Edit model using a component for the same form --- pages/models/_id/edit.vue | 50 ++++++++++++++++++++++++++++++++++++++++++++++ pages/models/_id/index.vue | 3 ++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 pages/models/_id/edit.vue (limited to 'pages/models') diff --git a/pages/models/_id/edit.vue b/pages/models/_id/edit.vue new file mode 100644 index 0000000..45755be --- /dev/null +++ b/pages/models/_id/edit.vue @@ -0,0 +1,50 @@ + + + diff --git a/pages/models/_id/index.vue b/pages/models/_id/index.vue index 909d5d9..1bb322e 100644 --- a/pages/models/_id/index.vue +++ b/pages/models/_id/index.vue @@ -50,8 +50,9 @@ p {{ model.description }} .mb-5.text-right(v-if="me && me.id == model.author_id") - button.inline-flex.leading-6.justify-center.rounded-md.border.border-transparent.bg-gray-600.py-2.px-4.mr-2.text-sm.font-medium.text-white.shadow-sm( + a.inline-flex.leading-6.justify-center.rounded-md.border.border-transparent.bg-gray-600.py-2.px-4.mr-2.text-sm.font-medium.text-white.shadow-sm( class="hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2" + :href="'/models/'+model.id+'/edit'" ) -- cgit v1.2.3-18-g5258