socialforge/app/views/users/_my_joinedcourse.html.erb

40 lines
1.3 KiB
Plaintext

<div class="content-title-top">
<% if @memberships.empty? %>
<% if @user != User.current %>
<p class="font_description">
<%= l(:label_project_course_un) %>
</p>
<% else %>
<p class="font_description">
<%= l(:label_project_cousre_studentun) %>
<%= link_to"#{l(:label_course_join_student)}",{:controller=>'courses',:action=>'index'}, :class => 'icon icon-add' %>
<%= link_to "#{l(:label_course_new)}", {:controller => 'courses', :action => 'new'}, :class => 'icon icon-add' %>
</p>
<% end %>
<% else %>
<div class="user_course_list menu-div">
<div class="menu">
<%= link_to "#{l(:label_course_new)}", new_course_path, class: 'icon icon-add' if @user == User.current %>
<ul>
<li mode='doing' class="on"><%= l('user.courses.doing')%></li>
<li mode='end'><%= l('user.courses.done')%></li>
</ul>
</div>
<div class="dyn_list_wrapper" mode='doing'>
<div class='created_course'>
<%= render :partial => 'course_form', :locals => {:memberships => @memberships_doing} %>
</div>
</div>
<div class="dyn_list_wrapper hidden" mode='end'>
<div class="created_course ">
<%= render :partial => 'course_form', :locals => {:memberships => @memberships_done} %>
</div>
</div>
</div>
<% end %>
</div>