libertarian-party/partynest

View on GitHub
app/views/staffs/people/index.html.erb

Summary

Maintainability
Test Coverage
<div class="container">
  <%= nav_breadcrumb(
    [translate(:staff_services), staff_root_path],
    Person.model_name.human(count: 0),
  ) %>

  <% if policy([:staff, Person]).new? %>
    <div class="btn-group" role="group">
      <% if policy([:staff, Person]).new? %>
        <%= link_to translate(:create),
                    new_staff_person_path,
                    class: 'btn btn-primary',
                    role: :button %>
      <% end %>
    </div>
  <% end %>

  <%= render partial: 'table', locals: { people: @people } %>
  <%= pagination @people %>
</div>