Sha256: 187b11745882abef2887c909778e34bfdb52e7fddcbb04b7be81f3e751dbd0b1

Contents?: true

Size: 1.72 KB

Versions: 5

Compression:

Stored size: 1.72 KB

Contents

<%%= render "page_header" do %>
  <%%= render "page_header_breadcrumb", title: "Showing <%= human_name.downcase %>" do %>
    <li class="breadcrumb-item"><%%= link_to "Admin", admin_path %></li>
    <li class="breadcrumb-item"><%%= link_to "<%= human_name.pluralize %>", <%= index_helper(type: :path) %> %></li>
  <%% end %>

  <%%= render "page_header_actions" do %>
    <%%= link_to "Edit <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "btn btn-primary" %>
    <%%= link_to "Delete <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "btn btn-white", data: { method: :delete, confirm: "Are you sure?" } %>
  <%% end %>
<%% end %>

<div class="page-body">
  <div class="container-xl">
    <div class="card">
      <div class="card-header">
        <h3 class="card-title"><%= human_name %> details</h3>
      </div>
      <div class="card-body">
        <dl class="row">
<% attributes.reject(&:password_digest?).each do |attribute| -%>
          <dt class="col-md-3"><%= attribute.human_name %></dt>
<% if attribute.attachment? -%>
          <dd class="col-md-9"><%%= link_to <%= singular_name %>.<%= attribute.column_name %>.filename, <%= singular_name %>.<%= attribute.column_name %> if <%= singular_name %>.<%= attribute.column_name %>.attached? %></dd>
<% elsif attribute.attachments? -%>
    <%% <%= singular_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
          <dd class="col-md-9"><%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %></dd>
    <%% end %>
<% else -%>
          <dd class="col-md-9"><%%= @<%= singular_name %>.<%= attribute.column_name %> %></dd>
<% end -%>
<% end -%>
        </dl>
      </div>
    </div>
  </div>
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
administration-zero-1.0.6 lib/generators/admin/scaffold/templates/erb/show.html.erb.tt
administration-zero-1.0.5 lib/generators/admin/scaffold/templates/erb/show.html.erb.tt
administration-zero-1.0.4 lib/generators/admin/scaffold/templates/erb/show.html.erb.tt
administration-zero-1.0.3 lib/generators/admin/scaffold/templates/erb/show.html.erb.tt
administration-zero-1.0.2 lib/generators/admin/scaffold/templates/erb/show.html.erb.tt