优化2级菜单效果
This commit is contained in:
parent
60fa473608
commit
206aeeccfb
|
@ -41,6 +41,7 @@
|
|||
<%=link_to_user(User.current)%>
|
||||
<ul class="sub_menu">
|
||||
<% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
|
||||
<% hasCourse=true%>
|
||||
<li id="course_loggedas_li"><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id, host: Setting.course_domain} %>
|
||||
<ul class="course_sub_menu">
|
||||
<% User.current.courses.each do |course| %>
|
||||
|
@ -52,8 +53,13 @@
|
|||
</li>
|
||||
<% end -%>
|
||||
<li id="project_loggedas_li"><%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %>
|
||||
<ul class="project_sub_menu">
|
||||
<% User.current.projects.each do |project| %>
|
||||
|
||||
<% if hasCourse %>
|
||||
<ul class="project_sub_menu" style="top: 35px">
|
||||
<% else %>
|
||||
<ul class="project_sub_menu">
|
||||
<% end %>
|
||||
<% User.current.projects.each do |project| %>
|
||||
<li><%= link_to project.name.truncate(10, omission: '...'), {:controller => 'projects', :action => 'show',id: project.id, host: Setting.project_domain } %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue