<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" target="_blank">新建课程</a>
  <% end %>
  <div class="cl"></div>
</div>

<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>
      </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>