From 5e4571d6af6384d685d690d64504cd0a818f9db6 Mon Sep 17 00:00:00 2001 From: z9hang Date: Mon, 21 Jul 2014 11:14:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=AF=BC=E8=88=AA=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 +- app/controllers/school_controller.rb | 2 +- app/views/layouts/base_stores.html.erb | 5 +++ app/views/layouts/course_base.html.erb | 49 ++++++++++++++++++++++++++ app/views/projects/search.html.erb | 2 ++ 5 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 app/views/layouts/course_base.html.erb diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index e10d6df88..9db479eb5 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -155,7 +155,7 @@ class CoursesController < ApplicationController respond_to do |format| format.html { - render :layout => 'base' + render :layout => 'course_base' scope = Course unless params[:closed] scope = scope.active diff --git a/app/controllers/school_controller.rb b/app/controllers/school_controller.rb index 8b3692449..a7bf1edb8 100644 --- a/app/controllers/school_controller.rb +++ b/app/controllers/school_controller.rb @@ -1,5 +1,5 @@ class SchoolController < ApplicationController - + layout 'course_base' before_filter :require_admin, :only => :upload_logo def upload diff --git a/app/views/layouts/base_stores.html.erb b/app/views/layouts/base_stores.html.erb index 05b66dfce..58f763756 100644 --- a/app/views/layouts/base_stores.html.erb +++ b/app/views/layouts/base_stores.html.erb @@ -1,3 +1,8 @@ +<% @nav_dispaly_home_path_label = 1 + @nav_dispaly_main_course_label = 1 + @nav_dispaly_main_project_label = 1 + @nav_dispaly_main_contest_label = 1 %> +<% @nav_dispaly_forum_label = 1%> diff --git a/app/views/layouts/course_base.html.erb b/app/views/layouts/course_base.html.erb new file mode 100644 index 000000000..198252a52 --- /dev/null +++ b/app/views/layouts/course_base.html.erb @@ -0,0 +1,49 @@ +<% @nav_dispaly_course_all_label = 1 + @nav_dispaly_forum_label = 1 + @nav_dispaly_course_label = nil + @nav_dispaly_store_all_label = 1 %> + + + + + <%=h html_title %> + + + <%= csrf_meta_tag %> + <%= favicon %> + <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %> + <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> + <%= javascript_heads %> + <%= javascript_include_tag "jquery.leanModal.min" %> + <%= javascript_include_tag 'seems_rateable/jRating', 'seems_rateable/rateable'%> + <%= heads_for_theme %> + <%= call_hook :view_layouts_base_html_head %> + + <%= yield :header_tags -%> + + +
+
+
+ <%=render :partial => 'layouts/base_header'%> +
+
+ <%= render_flash_messages %> + <%= yield %> + <%= call_hook :view_layouts_base_content %> +
+ <%=render :partial => 'layouts/base_footer'%> +
+ +
+
+ + + + + +
+
+<%= call_hook :view_layouts_base_body_bottom %> + + diff --git a/app/views/projects/search.html.erb b/app/views/projects/search.html.erb index 36117e0bb..02bdb4f17 100644 --- a/app/views/projects/search.html.erb +++ b/app/views/projects/search.html.erb @@ -1,3 +1,5 @@ +<% @nav_dispaly_project_label = 1 + @nav_dispaly_forum_label = 1 %> <% content_for :header_tags do %> <%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %> <% end %>