<%%= render 'notice' %>
<h1><%= plural_table_name.titleize %></h1>
<%% if @<%= plural_table_name %>.any? %> <div class=“table-container”>
<table class="table is-striped"> <thead> <tr> <th>#</th> <% attributes.reject(&:password_digest?).each do |attribute| -%> <th><%= attribute.human_name %></th> <% end -%> <th colspan="3"></th> </tr> </thead> <tbody> <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> <tr> <td><%%= <%= singular_table_name %>.id %></td> <% attributes.reject(&:password_digest?).each do |attribute| -%> <td><%%= <%= singular_table_name %>.<%= attribute.column_name %> %></td> <% end -%> <td class="action"> <%%= link_to icon("far", "eye"), <%= model_resource_name %>, title: "Show" %> <%%= link_to icon("far", "edit"), edit_<%= singular_route_name %>_path(<%= singular_table_name %>), title: "Edit" %> <%%= link_to icon("far", "trash-alt"), <%= model_resource_name %>, title: "Destroy", method: :delete, data: { confirm: 'Are you sure?' } %> </td> </tr> <%% end %> </tbody> </table>
</div> <%% else %> <div class=“box is-shadowless has-background-light has-text-centered”>
<%%= icon("fas", "cloud-sun", class: "fa-5x", style: "padding-bottom: 15px") %> <br /> Let's input some data?
</div> <%% end %>
<section class=“box has-background-light is-shadowless”>
<div class="columns"> <div class="column is-11 is-offset-1"> <%%= link_to 'New <%= singular_table_name.titleize %>', new_<%= singular_route_name %>_path, class: "button is-link" %> </div> </div>
</section>