personal-course/app/views/admin/courses/_courses.html.erb

17 lines
789 B
Plaintext

<% @courses.each do |course| %>
<tr id="<%= dom_id course %>" class="with_action">
<td class="span1"><%= course.year %></td>
<td class="span1">
<%= link_to course.title, page_for_course(course), target: "blank"%>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<li><%= link_to t('edit'), edit_admin_course_path(course,:page => params[:page]) %></li>
<li><%= link_to t(:delete_), admin_course_path(id: course.id, :page => params[:page]), method: :delete, data: { confirm: 'Are you sure?' } %></li>
</ul>
</div>
</td>
<td><%= link_to course.course_assignments.count,course_assignments_admin_courses_path(:id=> course.id) %></td>
<td><%= course.member_profile.name rescue "" %></td>
<td><%= course.display_students rescue "" %></td>
</tr>
<% end %>