2015-03-17 15:30:15 +08:00
|
|
|
<div id="Header" >
|
|
|
|
<!-- logo -->
|
|
|
|
<div class="logo fl" >
|
|
|
|
<a href="#" target="_blank">
|
|
|
|
<%=link_to image_tag("/images/logo.png",weight:"35px", height: "30px")%>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 导航栏 -->
|
|
|
|
<div id="TopNav" class="fl">
|
|
|
|
<%= render_dynamic_nav if User.current.logged? || !Setting.login_required? -%>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="TopUser" class="fr">
|
2015-03-18 16:16:18 +08:00
|
|
|
<div id="menu">
|
|
|
|
<ul class="menu">
|
2015-03-17 15:30:15 +08:00
|
|
|
<!--右侧登录、登出、注册按钮-->
|
|
|
|
<% if User.current.logged? -%>
|
|
|
|
|
2015-03-18 16:16:18 +08:00
|
|
|
<li id="current_user_li">
|
2015-04-22 16:37:24 +08:00
|
|
|
<%= link_to "#{User.current.login}<span class='pic_triangle'></span>".html_safe, {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.user_domain}, :class => "uses_name"%>
|
2015-04-22 16:47:13 +08:00
|
|
|
<ul id="user_sub_menu" style="left:130px;">
|
2015-03-17 15:30:15 +08:00
|
|
|
<% unless User.current.projects.empty? %>
|
|
|
|
<li id="my_projects_li">
|
2015-03-18 16:16:18 +08:00
|
|
|
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain}, :class => "parent" %>
|
2015-03-17 15:30:15 +08:00
|
|
|
<ul id="my_projects_ul">
|
|
|
|
<% User.current.projects.each do |project| %>
|
|
|
|
<li title="<%=project.name%>">
|
|
|
|
<%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.project_domain } %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if @show_course == 1 && User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) %>
|
|
|
|
<% user_course = get_user_course User.current%>
|
|
|
|
<% unless user_course.empty? %>
|
|
|
|
<li id="my_courses_li">
|
2015-03-18 16:16:18 +08:00
|
|
|
<%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id}, :class => "parent" %>
|
2015-03-17 15:30:15 +08:00
|
|
|
<ul id="my_courses_ul">
|
|
|
|
<% user_course.each do |course| %>
|
|
|
|
<li title="<%=course.name%>">
|
|
|
|
<%= link_to course.name, {:controller => 'courses',:action => 'show',:id => course.id} %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<li>
|
|
|
|
<%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<% end -%>
|
2015-03-18 16:16:18 +08:00
|
|
|
<%= header_render_menu :account_menu -%>
|
2015-03-17 15:30:15 +08:00
|
|
|
</ul>
|
|
|
|
</div><!--topuser_nav end-->
|
|
|
|
</div>
|
|
|
|
</div>
|