Sha256: e72e6175289cce61a6c4b18c2981829cb7c034a4338b21a05b30e2d163add398

Contents?: true

Size: 1.52 KB

Versions: 1

Compression:

Stored size: 1.52 KB

Contents

<div class="panel">
  <h1 class="title--actions">
    <%%= <%= singular_table_name.classify %>.model_name.human %>
    <%%= link_to t('actions.new') + <%= singular_table_name.classify %>.model_name.human, new_<%= prefixed_plain_model_url %>_path, class: "button button--primary" %>
  </h1>

  <table class="table table--horizontal">
    <thead>
      <tr>
  <% attributes.reject(&:password_digest?).each do |attribute| -%>
        <th><%%= <%= singular_table_name.classify %>.human_attribute_name(:<%= attribute.name %>) %></th>
  <% end -%>
        <th></th>
      </tr>
    </thead>

    <tbody>
      <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
        <tr>
  <% attributes.reject(&:password_digest?).each do |attribute| -%>
          <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
  <% end -%>
          <td>
            <%%= link_to <%= "[:#{prefix}, #{singular_table_name}]" %>, title: t('actions.show'), class: "button--tiny button--primary" do -%><i class="fa fa-file"></i><%% end %>
            <%%= link_to edit_<%= prefixed_plain_model_url %>_path(<%= singular_table_name %>), title: t('actions.edit'), class: "button--tiny button--warning" do -%><i class="fa fa-pencil"></i><%% end %>
            <%%= link_to <%= "[:#{prefix}, #{singular_table_name}]" %>, method: :delete, data: { confirm: 'Are you sure?' }, title: t('actions.destroy'), class: "button--tiny button--danger" do -%><i class="fa fa-times"></i><%% end %>
          </td>
        </tr>
      <%% end %>
    </tbody>
  </table>

</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
admin_help-0.1.4 lib/generators/admin/scaffold_controller/templates/views/erb/index.html.erb.erb