2013-11-08 20:54:45 +08:00
|
|
|
<div class="content_frame">
|
2014-06-04 16:45:20 +08:00
|
|
|
<ul class="user_course_sort">
|
2014-05-20 14:52:30 +08:00
|
|
|
<% for membership in memberships %>
|
|
|
|
<li>
|
|
|
|
<table width="660" border="0" align="center" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
|
|
|
<tr>
|
2014-12-18 09:58:16 +08:00
|
|
|
<td colspan="2" valign="top" width="50">
|
|
|
|
<%= image_tag(url_to_avatar(membership.course), :class => 'avatar') %>
|
|
|
|
</td>
|
2014-05-20 14:52:30 +08:00
|
|
|
<td>
|
|
|
|
<table width="580" border="0">
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" valign="top">
|
2014-12-18 09:58:16 +08:00
|
|
|
<span>
|
|
|
|
<%= link_to_course(membership.course) %>
|
|
|
|
</span>
|
2014-05-20 14:52:30 +08:00
|
|
|
<span style="float: right">
|
2014-06-04 16:45:20 +08:00
|
|
|
<%= render :partial => 'courses/set_course_time', :locals => {:course => membership.course} %>
|
2014-12-18 09:58:16 +08:00
|
|
|
<% if (User.current == @user && (!@user.allowed_to?(:as_teacher,membership.course)))%>
|
|
|
|
<%= join_in_course(membership.course, User.current) %>
|
2014-05-20 14:52:30 +08:00
|
|
|
<% end %>
|
2014-12-18 09:58:16 +08:00
|
|
|
|
2014-10-28 16:27:13 +08:00
|
|
|
|
2014-06-04 16:45:20 +08:00
|
|
|
<%= l(:label_x_base_courses_member, :count => membership.course.members.count) %>
|
2014-12-18 09:58:16 +08:00
|
|
|
(<%= "#{membership.course.members.count}" %>)
|
|
|
|
|
2014-05-20 14:52:30 +08:00
|
|
|
<%= l(:label_homework) %>
|
2014-12-18 09:58:16 +08:00
|
|
|
(
|
|
|
|
<span class="">
|
|
|
|
<%= link_to (membership.course.homeworks.count), {:controller => 'courses', :action => 'homework', :id => membership.course.id} %>
|
|
|
|
</span>
|
|
|
|
)
|
2014-05-20 14:52:30 +08:00
|
|
|
|
2014-06-20 10:32:51 +08:00
|
|
|
<%= l(:label_course_news) %>
|
2014-12-18 09:58:16 +08:00
|
|
|
(
|
|
|
|
<span style="color: #ed8924">
|
|
|
|
<%= link_to (membership.course.news.count), {:controller => 'news', :action => 'index', :course_id => membership.course.id} %>
|
|
|
|
</span>)
|
|
|
|
</span>
|
|
|
|
</td>
|
2014-05-20 14:52:30 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2014-08-28 17:30:08 +08:00
|
|
|
<td colspan="2" width="580" style="word-break:break-all;word-wrap: break-word;">
|
2014-05-20 14:52:30 +08:00
|
|
|
<p class="font_description">
|
2014-08-20 17:16:14 +08:00
|
|
|
<%= textilizable membership.course.short_description %>
|
|
|
|
</p>
|
|
|
|
</td>
|
2014-05-20 14:52:30 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
|
2014-06-04 16:45:20 +08:00
|
|
|
<% @course = Course.find_by_extra(membership.course.extra) %>
|
2014-05-20 14:52:30 +08:00
|
|
|
<% unless (@course.nil? || @course.teacher.nil? || @course.teacher.name.nil?) %>
|
2014-12-18 09:58:16 +08:00
|
|
|
<span class="font-lighter" style="float: left">
|
|
|
|
<%= l(:label_main_teacher) %>
|
|
|
|
: <%= link_to(@course.teacher.realname, user_path(@course.teacher)) %>
|
|
|
|
</span>
|
|
|
|
<span style="float: right; padding-left: 8px">
|
|
|
|
<%= l(:label_course_term) %>
|
|
|
|
: <%= @course.time %><%= @course.term %>
|
|
|
|
</span>
|
2014-05-20 14:52:30 +08:00
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<%= call_hook :view_account_left_bottom, :user => @user %>
|