libertarian-party/partynest

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

Summary

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

  <%= render partial: 'staffs/people/nav_tabs',
             locals: { person: @person, tab: :person_comments } %>

  <% unless @person_comments.nil? %>
    <%= render partial: 'list', locals: { person_comments: @person_comments } %>
  <% end %>

  <div class="mt-2">
    <%= simple_form_for [:staff, @person, @person_comment] do |f| %>
      <%= f.error_notification %>

      <%= f.input :text %>
      <%= f.input :attachment, direct_upload: true %>

      <%= f.button :submit %>
    <% end %>
  </div>
</div>