35 lines
1.7 KiB
Plaintext
35 lines
1.7 KiB
Plaintext
<% protocol = ("#{URI(request.referer).scheme}://" rescue request.protocol) %>
|
|
<% host_url = protocol+(request.host_with_port) %>
|
|
<% @selected_courses.each do |selected_course| %>
|
|
<tr id="<%= dom_id selected_course %>" class="with_action">
|
|
<% member_profile = selected_course.member_profile %>
|
|
<td class="span1"><%= selected_course.year %></td>
|
|
<td class="span1">
|
|
<%= link_to selected_course.course_title, page_for_selected_course(selected_course), target: "blank"%>
|
|
<div class="quick-edit">
|
|
<ul class="nav nav-pills hide">
|
|
<li><%= link_to t('edit'), edit_admin_selected_course_path(selected_course,:page => params[:page]) %></li>
|
|
<li><%= link_to t(:delete_), admin_selected_course_path(id: selected_course.id, :page => params[:page]), method: :delete, data: { confirm: 'Are you sure?' } %></li>
|
|
</ul>
|
|
</div>
|
|
<td>
|
|
<% if member_profile.present? %>
|
|
<%= link_to CourseAssignment.where(:course_id=>selected_course.course_id).enabled_for_student.count,show_assignments_admin_selected_courses_path(:id=> selected_course.course_id,:member_profile_name=> member_profile.name,:member_profile_uid=> member_profile.uid) %>
|
|
<% else %>
|
|
0
|
|
<% end %>
|
|
</td>
|
|
</td>
|
|
<td class="span1"><% course_url = selected_course.course_url %>
|
|
<% if selected_course.course %>
|
|
<% if course_url != "#" %>
|
|
<% course_url = host_url + course_url %>
|
|
<a title="<%=selected_course.course_title%>" href="<%=course_url%>"><%=course_url%></a>
|
|
<% end %>
|
|
<% else %>
|
|
<a title="<%=selected_course.course_title%>" href="<%=selected_course.other_course_url%>"><%=selected_course.other_course_url%></a>
|
|
<% end %>
|
|
</td>
|
|
<td><%= member_profile.name rescue "" %></td>
|
|
</tr>
|
|
<% end %> |