Sha256: 23ee9810b296e2d72958ece761485e93719d473a7b67479959ae9dafd6309ce9
Contents?: true
Size: 1.14 KB
Versions: 6
Compression:
Stored size: 1.14 KB
Contents
<template> <Head :title="`<%= human_name %> #${<%= singular_table_name %>.id}`" /> <p v-if="flash.notice" class="notice">{{ flash.notice }}</p> <h1><%= human_name %> #{{ <%= singular_table_name %>.id }}</h1> <<%= inertia_component_name %> :<%= singular_table_name %>="<%= singular_table_name %>" /> <div> <Link :href="`<%= js_edit_resource_path %>`">Edit this <%= human_name.downcase %></Link> | <Link href="<%= js_resources_path %>">Back to <%= human_name.pluralize.downcase %></Link> <br /> <Link :href="`<%= js_resource_path %>`" @click="onDestroy" as="button" method="delete" > Destroy this <%= human_name.downcase %> </Link> </div> </template> <script setup> import { Link, Head } from '@inertiajs/vue3' import <%= inertia_component_name %> from './<%= inertia_component_name %>.vue' const { <%= singular_table_name %>, flash } = defineProps(['<%= singular_table_name %>', 'flash']) const onDestroy = (e) => { if (!confirm('Are you sure you want to delete this <%= human_name.downcase %>?')) { e.preventDefault() } } </script> <style scoped> .notice { color: green; } </style>
Version data entries
6 entries across 6 versions & 1 rubygems