个人主页的课程项目tab页显示优化
This commit is contained in:
parent
5e600380c7
commit
a0a8868c24
|
@ -44,6 +44,13 @@
|
|||
<% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
|
||||
<% hasCourse=true%>
|
||||
|
||||
<% _bool=false %>
|
||||
<% User.current.courses.each do |course| %>
|
||||
<% if !course_endTime_timeout?(course) %>
|
||||
<% _bool=true %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if _bool %>
|
||||
<li id="course_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id} %>
|
||||
<ul class="course_sub_menu">
|
||||
<% User.current.courses.each do |course| %>
|
||||
|
@ -53,11 +60,14 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% end -%>
|
||||
<% end %>
|
||||
<li id="project_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %>
|
||||
|
||||
<% if User.current.projects.count>0 %>
|
||||
<li id="project_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %>
|
||||
<% if hasCourse %>
|
||||
<ul class="project_sub_menu" style="top: 35px">
|
||||
<% else %>
|
||||
|
@ -65,9 +75,10 @@
|
|||
<% 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 %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
<li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue