<% course_file_num = visable_attachemnts_incourse(@course).count%>
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
<% if show_nav?(@course.homework_commons.count) %>
    <div class="subNav">
      <%= link_to l(:label_homework), homework_common_index_path(:course => @course.id), :class => "f12 c_blue02 ml10 fn"%>
      <%= link_to( "", homework_common_index_path(:course => @course.id,:is_new => 1), :class => 'courseMenuSetting', :title =>"#{l(:label_course_homework_new)}") if is_teacher %>
    </div>
<% end %>
<% if show_nav?(@course.news.count) %>
    <div class="subNav">
      <%= link_to "通知", course_news_index_path(@course), :class => "f12 c_blue02 ml10 fn" %>
      <%= link_to( "", new_course_news_path(@course), :class => 'courseMenuSetting', :title =>"#{l(:label_course_news_new)}") if is_teacher %>
    </div>
<% end %>
<% if show_nav?(course_file_num) %>
    <div class="subNav">
      <%= link_to l(:label_course_file), course_files_path(@course), :class => "f12 c_blue02 ml10 fn" %>
      <% if is_teacher || (@course.publish_resource == 1  && User.current.member_of_course?(@course)) %>
          <!--link_to( "+#{l(:label_upload_files)}", course_files_path(@course), :class => 'subnav_green ml95 c_white')-->
          <a class="courseMenuSetting" title="上传资源" href="javascript:void(0);" onclick="course_files_upload();"> </a>
      <% end %>
    </div>
<% end %>
<% if show_nav?(@course.boards.first ? @course.boards.first.topics.count : 0) %>
    <div class="subNav">
      <%= link_to l(:label_course_board), course_boards_path(@course), :class => "f12 c_blue02 ml10 fn" %>
      <%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'courseMenuSetting', :title =>"#{l(:label_message_new)}") %>
    </div>
<% end %>
<% if show_nav?(course_feedback_count) %>
    <div class="subNav">
      <%= link_to l(:label_course_feedback), course_feedback_path(@course), :class => "f12 c_blue02 ml10 fn" %>
      <%= link_to "", course_feedback_path(@course), :class => 'courseMenuSetting', :title =>"#{l(:label_course_feedback)}", :id => "course_jour_count"%>
    </div>
<% end %>
<% if show_nav?(course_poll_count) %>
    <div class="subNav">
      <%= link_to l(:label_poll), poll_index_path(:polls_type => "Course", :polls_group_id => @course.id), :class => " f12 c_blue02 ml10 fn"%>
      <%= link_to( "", new_poll_path(:polls_type => "Course",:polls_group_id => @course.id), :class => 'courseMenuSetting', :title =>"#{l(:label_new_poll)}") if is_teacher %>
    </div>
<% end %>
<% if show_nav?(User.current.allowed_to?(:as_teacher,@course)? @course.exercises.count : @course.exercises.where("exercise_status=2").count) %>
    <div class="subNav">
      <%= link_to "在线测验", exercise_index_path(:course_id => @course.id), :class => " f12 c_blue02 ml10 fn"%>
      <%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'courseMenuSetting', :title =>"新建试卷") if is_teacher %>
    </div>
<% end %>