From c349dd1621d14854ddbcd43ab239aa1ffbc69143 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sat, 27 Apr 2019 10:45:43 +0800 Subject: [PATCH] .. --- app/controllers/welcome_controller.rb | 2 +- app/views/layouts/base_edu_user.html.erb | 36 ++++++++++++++++++------ 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 729a9564..c9d41c0a 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -218,7 +218,7 @@ class WelcomeController < ApplicationController @tea_users = User.where(homepage_teacher: 1).includes(:user_extensions).limit(10).order("experience desc") @stu_users = User.includes(:user_extensions).where(user_extensions: {identity: 1}).limit(10).order("experience desc") - render :layout => 'base_local' + render :layout => 'educoder' end # 自动导入用户 diff --git a/app/views/layouts/base_edu_user.html.erb b/app/views/layouts/base_edu_user.html.erb index 37ba85ca..8de851ea 100644 --- a/app/views/layouts/base_edu_user.html.erb +++ b/app/views/layouts/base_edu_user.html.erb @@ -7,23 +7,43 @@ <%= csrf_meta_tag %> <%= favicon %> - <%= stylesheet_link_tag 'css/font-awesome','educoder/edu-main','educoder/edu-all','/assets/iconfont/iconfont.css', :media => 'all' %> + <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/font-awesome','educoder/edu-main','educoder/edu-all','educoder/magic-check.css','/assets/iconfont/iconfont.css', :media => 'all' %> <%= javascript_heads %> + <%= javascript_include_tag 'edu/application', 'educoder/edu_application','educoder/edu_account',"educoder/edu_user" %> + <%= yield :header_tags -%> + + + + -
-
- <%= render :partial => 'layouts/logined_header' %> +
+
+ <% if User.current.logged? %> + <%= render :partial => 'layouts/logined_header' %> + <% else%> + <%= render :partial => 'layouts/unlogin_header' %> + <% end%>
-
+
<%= yield %>
- + <%= render :partial => 'users/returnTop_btn' %>
- + + <%#= render :partial => 'layouts/public_left_info' %> <%= render :partial => 'layouts/footer' %>
@@ -35,6 +55,4 @@
-<%= javascript_heads_local %> -<%= javascript_include_tag 'edu/application', 'educoder/edu_application',"educoder/edu_user" %> \ No newline at end of file