From a0a8868c249c474d808360922a37b439a2032641 Mon Sep 17 00:00:00 2001 From: linhk <304431313@.com> Date: Tue, 19 Aug 2014 15:44:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E7=9A=84?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=A1=B9=E7=9B=AEtab=E9=A1=B5=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_header.html.erb | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index 3116a9a68..b943cf565 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -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 %>
  • <%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id} %>
  • + <% end %> <% end -%> <% end %> -
  • <%= 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 %> +
  • + <%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %> <% if hasCourse %>
  • + <% end %>
  • <%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%>