Sha256: 10156e9a99e63dabd30e32fb9d493d55805e02a8428fca493f6df5514bc4f040
Contents?: true
Size: 1.35 KB
Versions: 4
Compression:
Stored size: 1.35 KB
Contents
<div class="md:flex items-center justify-between mb-4"> <h1 class="text-xl"> <%= link_to resource.friendly_name.pluralize, resource.index_path, class: "text-indigo-500" %> / <%= link_to resource.display_name(@record), resource.show_path(@record), class: "text-indigo-500 font-bold" %> </h1> <div class="flex items-center px-4"> <div class="mr-2"> <%= link_to "Edit", resource.edit_path(@record), class: "block bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 px-4 border border-gray-400 rounded shadow" %> </div> <%= button_to "Delete", resource.show_path(@record), method: :delete, data: { confirm: "Are you sure?" }, class: "bg-white hover:bg-gray-100 text-red-500 font-semibold py-2 px-4 border border-red-500 rounded shadow pointer-cursor" %> </div> </div> <div class="divide-y"> <% resource.attributes.values.each do |attribute| %> <% next if attribute.field.nil? %> <% next unless attribute.field.visible?(action_name) %> <div class="px-4 py-3 md:grid md:grid-cols-4 md:gap-4 md:px-6"> <div class="text-sm font-medium text-gray-500"> <%= attribute.field.attribute_name.to_s.titleize %> </div> <div class="md:col-span-3"> <%= render partial: attribute.field.to_partial_path("show"), locals: { field: attribute.field, record: @record } %> </div> </div> <% end %> </div>
Version data entries
4 entries across 4 versions & 1 rubygems