新header课程在项目上面

This commit is contained in:
sw 2015-06-10 16:16:23 +08:00
parent 1c808464d5
commit ff159075aa
1 changed files with 13 additions and 13 deletions

View File

@ -20,19 +20,6 @@
<li id="current_user_li">
<%= link_to "#{User.current.login}<span class='pic_triangle'></span>".html_safe, {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.host_user}, target:"_blank", :class => "uses_name"%>
<ul id="user_sub_menu" style="right: 0px;display: none;">
<% unless User.current.projects.empty? %>
<li id="my_projects_li">
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name},target:"_blank", :class => "parent" %>
<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.host_name }, target:"_blank" %>
</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? %>
@ -48,6 +35,19 @@
</li>
<% end %>
<% end %>
<% unless User.current.projects.empty? %>
<li id="my_projects_li">
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name},target:"_blank", :class => "parent" %>
<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.host_name }, target:"_blank" %>
</li>
<% end %>
</ul>
</li>
<% end %>
<li>
<%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.host_user}%>
</li>