diff --git a/app/controllers/olympiamanagements_controller.rb b/app/controllers/olympiamanagements_controller.rb
index 19979ed..5092667 100644
--- a/app/controllers/olympiamanagements_controller.rb
+++ b/app/controllers/olympiamanagements_controller.rb
@@ -50,7 +50,7 @@ class OlympiamanagementsController < ApplicationController
{:url=>'/olympiamanagements/edit_password',:name=>t('olympiamanagement.edit_password')},
{:url=>'/olympiamanagements/print_registration_form',:name=>t('olympiamanagement.print_registration_form')},
{:url=>'/olympiamanagements/logout',:name=>t('olympiamanagement.logout')}]
- @breadcumb = render_to_string(:formats=> [:html] ,:partial=>'breadcumb',:locals=>{:data_arr=>data_arr,:@title=>I18n.t('olypiamanagement.sign_up_title')})
+ @breadcumb = render_to_string(:formats=> [:html] ,:partial=>'breadcumb',:locals=>{:data_arr=>data_arr,:@title=>I18n.t('olympiamanagement.sign_up_title')})
end
def index
uid = OrbitHelper.params[:uid] rescue ""
@@ -84,7 +84,7 @@ class OlympiamanagementsController < ApplicationController
end
end
data_arr = @page.child_page.map{|page| {:url=>"/#{I18n.locale}#{page.url}",:name=>page.name}}
- @breadcumb = render_to_string(:formats=> [:html] ,:partial=>'breadcumb',:locals=>{:data_arr=>data_arr,:@title=>I18n.t('olypiamanagement.sign_up_title')})
+ @breadcumb = render_to_string(:formats=> [:html] ,:partial=>'breadcumb',:locals=>{:data_arr=>data_arr,:@title=>I18n.t('olympiamanagement.sign_up_title')})
@olympiamanagement_instruction = @breadcumb + @olympiamanagement_instruction.html_safe
else
if !@instructions_pages.empty?
@@ -140,7 +140,7 @@ class OlympiamanagementsController < ApplicationController
@instructions_pages.each{|page| page.destroy}
end
data_arr = @page.child_page.map{|page| {:url=>"/#{I18n.locale}#{page.url}",:name=>page.name}}
- @breadcumb = render_to_string(:formats=> [:html] ,:partial=>'breadcumb',:locals=>{:data_arr=>data_arr,:@title=>I18n.t('olypiamanagement.sign_up_title')})
+ @breadcumb = render_to_string(:formats=> [:html] ,:partial=>'breadcumb',:locals=>{:data_arr=>data_arr,:@title=>I18n.t('olympiamanagement.sign_up_title')})
@page_content = @breadcumb+'
'+t('olympiamanagement.sign_up_hint')+'
'
end
{
@@ -242,8 +242,8 @@ class OlympiamanagementsController < ApplicationController
end
def print_registration_form
@page = Page.where(:layout=>"olympia_managements_index",:parent_page_id=>(Page.where(:name=> ((I18n.locale.to_s == "en") ? "Home" : "首頁")).first.id)).first
- data_arr = @page.child_page.map{|page| {:url=>"/#{I18n.locale}#{page.url}",:name=>page.name}}
- @breadcumb = render_to_string(:formats=> [:html] ,:partial=>'breadcumb',:locals=>{:data_arr=>data_arr,:@title=>I18n.t('olypiamanagement.sign_up_title')})
+ data_arr = @page.child_page.map{|page| {:url=>"#{request.protocol}#{request.host_with_port}/#{I18n.locale}#{page.url}",:name=>page.name}}
+ @breadcumb = render_to_string(:formats=> [:html] ,:partial=>'breadcumb',:locals=>{:data_arr=>data_arr,:@title=>I18n.t('olympiamanagement.sign_up_title')})
@remark_texts =SignUpSetting.last.remark_field[I18n.locale.to_s].html_safe
@record_form_title = ((I18n.locale.to_s == "zh_tw") ? "#{Time.now.year}年國中科學奧林匹亞競賽國家代表隊選拔初選報名表" : "#{Time.now.year} Year International Junior Science Olympiad National Team Selection First Stage Sign up Form")
@school_data = OlympiaSchoolDataFields.where(:account_number=>session[:olympia_login_id]).first
@@ -254,7 +254,7 @@ class OlympiamanagementsController < ApplicationController
@olympia_school_data_fields_id = OlympiaSchoolDataFields.where(:account_number=>session[:olympia_login_id]).first.id
@sign_up_setting_id = SignUpSetting.last.id
@student_data_list = OlympiaStudentDataField.where(:olympia_school_data_fields_id=>@olympia_school_data_fields_id,:sign_up_setting_id=>@sign_up_setting_id)
- render :html => @student_data_list.to_a
+ @head = render_to_string(:formats=>[:html],:file=>"#{Rails.root}/app/templates/#{@key}/partial/_head.html")
end
def logout
session[:olympia_login_id] = ""
@@ -277,7 +277,7 @@ class OlympiamanagementsController < ApplicationController
end
def download_school_code
@OlympiaSchoolDataFields = OlympiaSchoolDataFields.all.asc(:id)
- dir_path = 'tmp/olypiamanagement/'
+ dir_path = 'tmp/olympiamanagement/'
#FileUtils.rm_r(dir_path, :force => true) if Dir.exist?(dir_path)
FileUtils.mkdir dir_path if !Dir.exist?(dir_path) #create dir for storing tmp_file if dir doesn't exist
@filename = 'download_school_code.xlsx'
diff --git a/app/views/admin/olympiamanagements/sign_up_setting.html.erb b/app/views/admin/olympiamanagements/sign_up_setting.html.erb
index df32b3b..6725ae8 100644
--- a/app/views/admin/olympiamanagements/sign_up_setting.html.erb
+++ b/app/views/admin/olympiamanagements/sign_up_setting.html.erb
@@ -3,7 +3,7 @@