@ -6,25 +6,8 @@
<li class="<%= course_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "翻转课堂", courses_path %></li>
<li class="<%= course_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "翻转课堂", courses_path %></li>
<!-- 精选实训 -->
<!-- 精选实训 -->
<li class="pr <%= shixuns_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "开发社区", shixuns_path %><img src="/images/educoder/hot-h.png" class="nav-img" /></li>
<li class="pr <%= shixuns_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "开发社区", shixuns_path %><img src="/images/educoder/hot-h.png" class="nav-img" /></li>
<% careers = Career.published.order("created_at asc") %>
<% if careers.present? %>
<li class="fl edu-menu-panel headIcon careershover <%= params[:action] == "index" && params[:controller] == "careers" ? " active" : "" %>" style="cursor: auto;">
<p>职业路径</p>
<ul class="edu-menu-list edu-menu-listnew" style="top:60px">
<% careers.each do |career| %>
<li><a href="<%= introduction_career_path(career) %>"><%= career.name %></a></li>
<% end %>
</ul>
</li>
<% end %>
<li class="<%= params[:controller] == "competitions" ? " active" : "" %>"><%= link_to "竞赛", competitions_path %></li>
<li class="<%= params[:controller] == "competitions" ? " active" : "" %>"><%= link_to "竞赛", competitions_path %></li>
<li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "问答", forums_path %></li>
<li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "问答", forums_path %></li>
<% if User.current.ec_school.present? %>
<li class="<%= ecs_controller.include?(params[:controller]) ? " active" : "" %>" id="ec_banner">
<%= link_to "认证", department_ecs_path(:school_id => User.current.ec_school) %>
</li>
<% end %>
</ul>
</ul>
<div class="posi-search" id="posi-search" style="display: none">
<div class="posi-search" id="posi-search" style="display: none">
<div class="search-all clearfix">
<div class="search-all clearfix">
@ -45,25 +28,27 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div class="fr edu-menu-panel ml15" style="height:60px;">
<% if User.current.logged? %>
<%= link_to (image_tag(url_to_avatar(User.current), :width =>"34", :height => "34", :class => "radius mt13", :nhname => "avatar_image", :alt=>"头像", :id => "nh_user_logo")), user_path(User.current),:class => "fl" %>
<div class="fr edu-menu-panel ml15" style="height:60px;">
<ul class="edu-menu-list" style="top:60px;">
<%= link_to (image_tag(url_to_avatar(User.current), :width =>"34", :height => "34", :class => "radius mt13", :nhname => "avatar_image", :alt=>"头像", :id => "nh_user_logo")), user_path(User.current),:class => "fl" %>
<span class="bor-bottom-greyE currentName task-hide"><%= User.current.show_name %></span>
<ul class="edu-menu-list" style="top:60px;">
<li><%= link_to '我的课堂', user_path(User.current) %></li>
<span class="bor-bottom-greyE currentName task-hide"><%= User.current.show_name %></span>
<li><%= link_to '我的实训', user_path(User.current, :type => 'a_shixun') %></li>
<li><%= link_to '我的课堂', user_path(User.current) %></li>
<li><%= link_to '我的实训课程', user_path(User.current, :type => 'a_path') %></li>
<li><%= link_to '我的实训', user_path(User.current, :type => 'a_shixun') %></li>
<% if User.current.partner.present? %>
<li><%= link_to '我的实训课程', user_path(User.current, :type => 'a_path') %></li>
<li><%= link_to '客户管理', partner_list_cooperate_path(User.current.partner) %></li>
<li><%= link_to '我的项目', user_path(User.current, :type => 'a_project') %></li>
<% end %>
<li><%= link_to '账号管理', my_account_path %></li>
<li><%= link_to '我的项目', user_path(User.current, :type => 'a_project') %></li>
<li class="bor-top-greyE"><%= link_to '退出', signout_path %></li>
</ul>
</div>
<% else %>
<span class="font-15 fr mt15 ml15">
<%= link_to '登录', signin_path, :class => "mr5 color-white" %>
<em class="vertical-line"></em>
<%= link_to '注册', user_join_path, :class => "ml5 color-white" %>
</span>
<% end %>
<% if User.current.department_members.count > 0 %>
<li><%= link_to '学院统计', statistics_college_path(User.current.department_members.first.try(:department)) %></li>
<% end %>
<li><%= link_to '账号管理', my_account_path %></li>
<li class="bor-top-greyE"><%= link_to '退出', signout_path %></li>
</ul>
</div>
<div class="fr head-right">
<div class="fr head-right">
<a href="javascript:void(0)" id="search-open" class="fl headIcon pointer">
<a href="javascript:void(0)" id="search-open" class="fl headIcon pointer">
<i class="iconfont icon-sousuo color-white"></i>
<i class="iconfont icon-sousuo color-white"></i>
@ -81,28 +66,12 @@
<li><%= link_to '新建项目', new_project_path() %></li>
<li><%= link_to '新建项目', new_project_path() %></li>
</ul>
</ul>
<ul class="fl with50 edu-txt-center">
<ul class="fl with50 edu-txt-center">
<li><%= link_to "加入课堂", join_private_courses_courses_path, :remote => true %></li>
<li><%= link_to "加入课堂", join_private_courses_courses_path, :remote => true %></li>
<li><%= link_to "加入项目", applied_join_project_path, :remote => true %></li>
<li><%= link_to "加入项目", applied_join_project_path, :remote => true %></li>
</ul>
</ul>
</div>
</div>
</div>
</div>
<div class="fl edu-menu-panel headIcon">
<a href="<%= user_tidings_user_path(User.current) %>">
<i class="iconfont icon-xiaoxilingdang color-white"></i>
</a>
<!--新消息提醒-->
<% new_tidings_count = User.current.tidings.where("created_at > '#{User.current.onclick_time.onclick_time}'").count %>
<% new_pri_message_count = User.current.private_messages.where("created_at > '#{User.current.onclick_time.onclick_time}'").count %>
<% count = new_tidings_count + new_pri_message_count %>
<% if count > 0 %>
<a href="<%= user_tidings_user_path(User.current) %>"><span class="newslight"><%= count > 99 ? "99+" : count %></span> </a>
<div class="edu-menu-list edu-txt-center" style="width:220px;top:60px">
<a class="font-14 padding10" style="line-height: 35px;" href="<%= user_tidings_user_path(User.current) %>">您有<span class="color-orange"><%= count %></span>条新消息,点击查看</a>
</div>
<% end %>
</div>
</div>
</div>
</div>
</div>
@ -128,11 +97,11 @@
<% notice = SystemUpdateNotice.last %>
<% notice = SystemUpdateNotice.last %>
<% if @noticed_update || ((User.current.certification == 1 || params[:controller] != "welcome") && notice.present? && notice.end_time > Time.now && notice.start_time >= (Time.now - 21600) && User.current.user_system_notices.where(:notice_type => notice.notice_type).count == 0) %>
<% if @noticed_update || ((User.current.certification == 1 || params[:controller] != "welcome") && notice.present? && notice.end_time > Time.now && notice.start_time >= (Time.now - 21600) && User.current.user_system_notices.where(:notice_type => notice.notice_type).count == 0) %>
var htmlvalue = "<%= escape_javascript(render :partial => 'account/user_update_notice', :locals => {:notice => notice})%>";
var htmlvalue = "<%= escape_javascript(render :partial => 'account/user_update_notice', :locals => {:notice => notice})%>";
pop_box_new(htmlvalue, 500, 380);
pop_box_new(htmlvalue, 500, 380);
<% UserSystemNotice.create(:user_id => User.current.id, :notice_type => notice.notice_type) %>
<% UserSystemNotice.create(:user_id => User.current.id, :notice_type => notice.notice_type) %>
<%# elsif notice.present? && notice.end_time < Time.now %>
<%# elsif notice.present? && notice.end_time < Time.now %>
<%# notice.destroy %>
<%# notice.destroy %>
<% end %>
<% end %>
});
});