Sha256: a10b49c49f16508925a65c8427e1adbd51f282ef75b1fd65c7a784cc1cf66904

Contents?: true

Size: 1.37 KB

Versions: 6

Compression:

Stored size: 1.37 KB

Contents

<template>
  <Head title="<%= human_name.pluralize %>" />

  <div className="mx-auto md:w-2/3 w-full px-8 pt-8">
    <p
      v-if="flash.notice"
      class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block"
    >
      {{ flash.notice }}
    </p>

    <div class="flex justify-between items-center">
      <h1 class="font-bold text-4xl"><%= human_name.pluralize %></h1>
      <Link
        href="<%= js_new_resource_path %>"
        class="rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium"
      >
        New <%= human_name.downcase %>
      </Link>
    </div>

    <div class="min-w-full">
      <template v-for="<%= singular_table_name %> in <%= plural_table_name %>" :key="<%= singular_table_name %>.id">
        <<%= inertia_component_name %> :<%= singular_table_name %>="<%= singular_table_name %>" />
        <p>
          <Link
            :href="`<%= js_resource_path %>`"
            class="ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium"
          >
            Show this <%= human_name.downcase %>
          </Link>
        </p>
      </template>
    </div>
  </div>
</template>

<script setup>
import { Link, Head } from '@inertiajs/vue3'
import <%= inertia_component_name %> from './<%= inertia_component_name %>.vue'

const { <%= plural_table_name %>, flash } = defineProps(['<%= plural_table_name %>', 'flash'])
</script>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
inertia_rails-contrib-0.3.0 lib/generators/inertia_tw_templates/scaffold/templates/vue/Index.vue.tt
inertia_rails-contrib-0.2.2 lib/generators/inertia_tw_templates/scaffold/templates/vue/Index.vue.tt
inertia_rails-contrib-0.2.1 lib/generators/inertia_tw_templates/scaffold/templates/vue/Index.vue.tt
inertia_rails-contrib-0.2.0 lib/generators/inertia_tw_templates/scaffold/templates/vue/Index.vue.tt
inertia_rails-contrib-0.1.1 lib/generators/inertia_tw_templates/scaffold/templates/vue/Index.vue.tt
inertia_rails-contrib-0.1.0 lib/generators/inertia_tw_templates/scaffold/templates/vue/Index.vue.tt