2015-07-09 15:27:49 +08:00
|
|
|
<div class="top_new">
|
|
|
|
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
|
|
|
|
<% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>
|
|
|
|
<a href="<%= url_for(:controller => 'courses', :action => 'new',) %>" class="green_n_btn fr mt2">新建课程</a>
|
|
|
|
<% else %>
|
|
|
|
<a href="<%= join_private_courses_courses_path %>" data-remote ="true" class="green_n_btn fr mt2">加入课程</a>
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
2014-05-21 18:29:56 +08:00
|
|
|
|
2015-07-09 15:27:49 +08:00
|
|
|
<div id="RSide" class="fl">
|
|
|
|
<div class="courses_box">
|
|
|
|
<div class="courses_top mb10">
|
|
|
|
<h2 class="courses_h2 fl">所有课程</h2>
|
|
|
|
<div class="courses_select fr">
|
|
|
|
<a href="<%= url_for(:controller => 'users', :action => 'user_courses')%>" class="select_btn <%= (@params['status']!='1' && @params['status']!='2') ? 'select_btn_select' : '' %> fl "> 全部</a>
|
|
|
|
<a href="<%= url_for(:controller => 'users', :action => 'user_courses', :status=>'1')%>" class="select_btn <%= (@params['status']=='1') ? 'select_btn_select' : '' %> fl ">正在进行</a>
|
|
|
|
<a href="<%= url_for(:controller => 'users', :action => 'user_courses', :status=>'2')%>" class="select_btn <%= (@params['status']=='2') ? 'select_btn_select' : '' %> fl "> 已经结束</a>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
<% for item in @list %>
|
|
|
|
<%= render :partial => 'course_form', :locals => {:item => item} %>
|
|
|
|
<% end %>
|
|
|
|
<p class="nodata" style="display:<%= @list.count > 0 ? 'none' : 'block' %>;"><%= l(:label_no_data) %></p>
|
|
|
|
</div>
|
|
|
|
<ul class="wlist" style=" border:none;">
|
|
|
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
|
|
|
</ul>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|