_participants_panel.html.erb 1017 B

12345678910111213141516171819202122232425262728293031
  1. <div class="panel panel-primary">
  2. <div class="panel-heading">
  3. Course Members
  4. </div>
  5. <table class="panel-body table table-striped table-bordered table-hover">
  6. <tbody>
  7. <% for course_participation in @course.course_participations %>
  8. <tr>
  9. <td>
  10. <%= render course_participation.user %>
  11. </td>
  12. <td>
  13. <%= course_participation.role.to_s.capitalize %>
  14. </td>
  15. <% if current_user.is_administrator_at?(@course.school) || current_user.admin? %>
  16. <td>
  17. <%= form_for course_participation, html: { method: :delete } do |f| %>
  18. <%= f.submit "Remove", class: "btn btn-danger" %>
  19. <% end %>
  20. </td>
  21. <% end %>
  22. </tr>
  23. <% end %>
  24. </tbody>
  25. </table>
  26. <div class="panel-footer">
  27. <% if current_user.is_administrator_at?(@course.school) || current_user.admin? %>
  28. <%= render partial: 'course_participations/form' %>
  29. <% end %>
  30. </div>
  31. </div>