diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 36b7e8598..c4a03adcf 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -153,6 +153,7 @@ class AdminController < ApplicationController @first_page.image_width = params[:image_width] @first_page.image_height = params[:image_height] @first_page.sort_type = params[:sort_type] + @first_page.show_course = params[:show_course] if @first_page.save respond_to do |format| flash[:notice] = l(:notice_successful_update) diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 0cca7be6e..236665b7f 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -24,6 +24,7 @@ class WelcomeController < ApplicationController def index @first_page = FirstPage.where("page_type = 'project'").first + @show_course = @first_page.show_course if @first_page.nil? || @first_page.sort_type.nil? @projects = find_miracle_project(10, 3,"grade desc") else diff --git a/app/views/admin/first_page_made.html.erb b/app/views/admin/first_page_made.html.erb index b83e54db1..601b2b8d8 100644 --- a/app/views/admin/first_page_made.html.erb +++ b/app/views/admin/first_page_made.html.erb @@ -27,24 +27,28 @@ <%= text_field_tag 'image_height', params[:label_imgae_height], :value => @first_page.image_height,:size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %>

- +

+ + +

+

+ + +

<%= text_area 'first_page', 'description', :value => @first_page.description,:cols => 80, :rows => 15, :class => 'wiki-edit' %> <%= wikitoolbar_for 'first_page_description' %>

-

- - -

+ <%= submit_tag l(:button_save), :class => "small", :name => nil %> <% end %> diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index 17f0d1e60..98e14c00a 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -40,8 +40,10 @@
  • <%=link_to_user(User.current)%>