12345678910111213141516171819202122232425262728293031 |
- <div class="panel panel-primary">
- <div class="panel-heading">
- Course Members
- </div>
- <table class="panel-body table table-striped table-bordered table-hover">
- <tbody>
- <% for course_participation in @course.course_participations %>
- <tr>
- <td>
- <%= render course_participation.user %>
- </td>
- <td>
- <%= course_participation.role.to_s.capitalize %>
- </td>
- <% if current_user.is_administrator_at?(@course.school) || current_user.admin? %>
- <td>
- <%= form_for course_participation, html: { method: :delete } do |f| %>
- <%= f.submit "Remove", class: "btn btn-danger" %>
- <% end %>
- </td>
- <% end %>
- </tr>
- <% end %>
- </tbody>
- </table>
- <div class="panel-footer">
- <% if current_user.is_administrator_at?(@course.school) || current_user.admin? %>
- <%= render partial: 'course_participations/form' %>
- <% end %>
- </div>
- </div>
|