2013-11-08 20:54:45 +08:00
|
|
|
<div class="content-title-top">
|
2013-10-10 21:33:52 +08:00
|
|
|
<% if @memberships.empty? %>
|
2013-09-30 16:20:56 +08:00
|
|
|
<% if @user != User.current %>
|
|
|
|
<p class="font_description">
|
|
|
|
<%= l(:label_project_course_un) %>
|
|
|
|
</p>
|
|
|
|
<% else %>
|
2013-10-31 15:18:42 +08:00
|
|
|
<p class="font_description">
|
2013-10-10 21:33:52 +08:00
|
|
|
<!--teacher could create the course directly-->
|
2014-01-09 08:34:30 +08:00
|
|
|
<%= l(:label_project_course_unadd) %><%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1, :project_type => 1}, :class => 'icon icon-add' %>
|
2013-10-09 16:14:11 +08:00
|
|
|
</p>
|
2013-09-30 16:20:56 +08:00
|
|
|
<% end %>
|
2014-01-24 10:55:25 +08:00
|
|
|
<% else %>
|
|
|
|
<p>
|
|
|
|
<span><%=l(:label_course_doing)%>(<%=@memberships_doing.count%>)</span>
|
|
|
|
<%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1, :project_type => 1}, :class => 'icon icon-add' %>
|
|
|
|
</p>
|
|
|
|
<div>
|
|
|
|
<%= render :partial => 'course_form', :locals => {:memberships => @memberships_doing}%>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
|
|
|
|
<p>
|
2014-03-06 09:55:14 +08:00
|
|
|
<%= link_to l(:label_course_done)+"("+@memberships_done.count.to_s+")", 'javascript:void(0);', :onclick => '$("#courses_history_block").slideToggle(400);' , style:"color:#666666" if User.current.logged? %>
|
2014-01-24 10:55:25 +08:00
|
|
|
</p>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
|
|
|
<div id="courses_history_block" class="courses_history hidden" >
|
2014-01-24 10:55:25 +08:00
|
|
|
<%= render :partial => 'course_form', :locals => {:memberships => @memberships_done}%>
|
|
|
|
</div>
|
2014-02-22 09:44:14 +08:00
|
|
|
|
2014-01-24 10:55:25 +08:00
|
|
|
<% end %>
|
2013-09-12 17:19:51 +08:00
|
|
|
</div>
|