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

29 lines
1.7 KiB
Plaintext
Raw Normal View History

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) %>
2015-07-10 15:38:49 +08:00
<a href="<%= url_for(:controller => 'courses', :action => 'new',) %>" class="green_n_btn fr mt2" target="_blank">新建课程</a>
2015-07-09 15:27:49 +08:00
<% 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!='1' && @params!='2') ? 'select_btn_select' : '' %> fl "> 全部</a>
<a href="<%= url_for(:controller => 'users', :action => 'user_courses', :status=>'1')%>" class="select_btn <%= (@params=='1') ? 'select_btn_select' : '' %> fl ">正在进行</a>
<a href="<%= url_for(:controller => 'users', :action => 'user_courses', :status=>'2')%>" class="select_btn <%= (@params=='2') ? 'select_btn_select' : '' %> fl "> 已经结束</a>
2015-07-09 15:27:49 +08:00
</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>