From 8ccddb921abce2f67982351872c27d2fc68ce783 Mon Sep 17 00:00:00 2001 From: BOHUNG Date: Wed, 5 Feb 2020 15:37:10 +0800 Subject: [PATCH] add SignUpSetting active status --- .../images/2020131_download_school_code.xlsx | Bin 36374 -> 0 bytes .../admin/olympiamanagements_controller.rb | 71 ++++++++++++------ .../olympiamanagements_controller.rb | 37 ++++++--- app/models/olympia_school_data_fields.rb | 7 ++ app/models/olympia_student_data_field.rb | 18 +++++ app/models/sign_up_setting.rb | 15 +++- .../_student_export.xlsx.axlsx | 15 ++++ .../export_school_connection_data.html.erb | 0 .../export_sign_up_student_data.html.erb | 0 .../sign_up_student_data_list.html.erb | 6 +- .../_edit_school_data_for_index.html.erb | 35 +++++++++ 11 files changed, 168 insertions(+), 36 deletions(-) delete mode 100644 app/assets/images/2020131_download_school_code.xlsx create mode 100644 app/views/admin/olympiamanagements/_student_export.xlsx.axlsx delete mode 100644 app/views/admin/olympiamanagements/export_school_connection_data.html.erb delete mode 100644 app/views/admin/olympiamanagements/export_sign_up_student_data.html.erb create mode 100644 app/views/olympiamanagements/_edit_school_data_for_index.html.erb diff --git a/app/assets/images/2020131_download_school_code.xlsx b/app/assets/images/2020131_download_school_code.xlsx deleted file mode 100644 index 5f43ae48940197441c44e9498854b2b19b0941a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 36374 zcmZU(WmH^2(=Ix=1sfm)cMB4NySqDN(BQ6vdw}3haCdii2=4BK1ot4p<<5J)yUsc9 zy+8Kswb!nxdYh7woA`b_T3jhF+0RRz-GvzDet!3zw2rK}A2E7|Po7uX2VfoK* zRYITAZ`Kb#4QZ}@6}hQ{XX^E73n5saF^zyN(Q5;$#<`t>fpEr_$Qb;fyZ6_vzV%n2 z`9HBXj~K)yMYM=~v%_7Z?Ya(KNUvXuZ!STRLDFnVzBTnnxB{8>#rBnW*yNu$gYCz> zNJ)GLqI8Wo7=_$+-c>j5h?#7fp`PSlYbTz5-P{fcaN;4Bd&}SEe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;z2hBGNZ|*J#+Vq zA23FG#-|t#JO1cbxb4V-LuaKUSzg^IqtSYkm4_Eat@@MVuJx5{&FjZ}1=m|>)LYw? zqDcCeh7vO^nnIMXw5hfHRzVf@(Mdscl6(~D{LKdaI~zrwHhW#zZH=ALdfQBjHk%Yd zCYyyN89JvJgEsj36k%O|*z{p5N~b!mNgZcL#Udru^jB(~3!?0~Xk?>Sz9vCM`QA`| zj(DflzIU&gyNWpfDNmF=es@qDXPj+XlxAAQG=*)7rvAsA1Kp{cPrwuQyJyU;QtMWK z@E=m%8kQ}fmz5Jxs_F6ab-R?)ZTU4dVKo}?`n6RNO_Vq0bwI=(=a|mWKgjUxI>?0v zxtxx&%LC+E-AUFsVPuaz%%G3bVaLmcllPhxJh&TUH99wvbPc!*ZilM5K*Z%La$U-M z4V7#UC3xn~w6F`nlweH^0tTbc1{cv=q6y#!rlE2H(kKnqvHkets9!hQZ0>ex$~0;6 z!5HC83Vb~Ldq?4k}!9(PBcbLZjAfXx&ZGqCeJpsZKoS2a`A`igYs?@i zy;vN$n5)AXQ=6?X*UGxW9$u)Kis7669(S`l(@Vu;ajNsmgR&ML-dA!TuVAj~Nz_)k z9JQcGroVca5f^v0aW-Wpcm9r8&?l)Gm4wbG;6}4;wGPD6`O|rl>x=~)eR119fnZ^* znQB1H(cP+T9XXc3P*F@#j2&jo_Qg>RP`{wYRZ?GeX5@`EFDYkhl}aY!B-axrjuHbI z`)qBZgwt*pCJ5+Z#`zb?lCi!7GHqM7!EM03}7iBP-twOY3ny#7cVh7CpAU+u@?&|(xb00F}l;*|3aUfl^QqbuY&pNr?z1Q7FMM z#b@K6P0q>F100D!vf3&hH(3ZG*i*u2pF diff --git a/app/controllers/admin/olympiamanagements_controller.rb b/app/controllers/admin/olympiamanagements_controller.rb index d88682f..13ca7ba 100644 --- a/app/controllers/admin/olympiamanagements_controller.rb +++ b/app/controllers/admin/olympiamanagements_controller.rb @@ -77,7 +77,7 @@ class Admin::OlympiamanagementsController < OrbitAdminController redirect_to :back end elsif params[:type] == 'sign_up_setting' - @sign_up_setting = SignUpSetting.find(params[:id]) rescue SignUpSetting.new + @sign_up_setting = SignUpSetting.find(params[:id]) rescue SignUpSetting.where(:active=>true).last if @sign_up_setting.nil? render_404_html else @@ -206,7 +206,6 @@ class Admin::OlympiamanagementsController < OrbitAdminController end end def sign_up_setting - @sign_up_setting = (SignUpSetting.all.length == 0) ? (SignUpSetting.new) : (SignUpSetting.last) @site_locales = Site.first.in_use_locales @site_locales.delete(I18n.locale) @site_locales.insert(0,I18n.locale) @@ -228,32 +227,59 @@ class Admin::OlympiamanagementsController < OrbitAdminController def sign_up_student_data_list page_num = params[:page] || 1 @field_infos = StudentDataField.first.student_data_fields - @sign_up_setting_id = SignUpSetting.last.id + @sign_up_setting_id = SignUpSetting.id @student_fields = OlympiaStudentDataField.where(:olympia_school_data_fields_id=>params[:olympia_school_id],:sign_up_setting_id=>@sign_up_setting_id).asc(:id).page(page_num).per(10) end def export_sign_up_student_data - # @OlympiaSchoolDataFields = OlympiaSchoolDataFields.all.asc(:id) - # dir_path = 'tmp/olypiamanagement/' - # #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 = 'school_export.xlsx' - # Dir.chdir(dir_path) do - # File.open(@filename, 'w') do |f| - # f.write render_to_string( :handlers=> [:axlsx], :formats=> [:xlsx] ,:partial=> 'school_export.xlsx',:locals=> {:@OlympiaSchoolDataFields=>@OlympiaSchoolDataFields} ) - # end - # end - # tmp_filename_data = File.read(dir_path +@filename) - # send_data(tmp_filename_data, type: 'application/xlsx', disposition: 'attachment', filename: @filename) + @student_data_fields = OlympiaStudentDataField.all.asc(:id) + dir_path = 'tmp/olypiamanagement/' + #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 + @field_infos = (StudentDataField.first || StudentDataField.new).student_data_fields + @student_data_list = [] + @fields = [ "school_code", "school_name" , "StudentName" ,"StudentSex","StudentIDNO","birth_date","StudentClass","StudentPhone","StudentCode","StudentAddress","StudentArea","StudentIdentity"] + @student_data_fields.each do |field| + @tmp_student_data = [] + @fields.each do |field_name| + @value = field[field_name] rescue "" + @index = @field_infos.map{|hash| hash.keys[0]}.index(field_name) rescue nil + if !@index.nil? + if !['String','Year','select_num','File'].include?(@field_infos.map{|hash| hash.values[0]}[@index]['type']) + @value = (@field_infos.map{|hash| hash.values[0]}[@index]['values'][I18n.locale.to_s][@value.to_i].to_s rescue @value) + end + else + if field_name == 'birth_date' + @value = "#{field.StudentBirthYear}-#{field.StudentBirthMonth}-#{field.StudentBirthDay}" + else + @school = OlympiaSchoolDataFields.find(field.olympia_school_data_fields_id) rescue nil + if !@school.nil? + @value = @school[field_name].to_s + end + end + end + @tmp_student_data << @value + end + @student_data_list << @tmp_student_data + end + #render :html => @student_data_list and return + @filename = 'student_export.xlsx' + Dir.chdir(dir_path) do + File.open(@filename, 'w') do |f| + f.write render_to_string( :handlers=> [:axlsx], :formats=> [:xlsx] ,:partial=> 'student_export.xlsx',:locals=> {:@student_data_list=>@student_data_list,:@fields=>@fields} ) + end + end + tmp_filename_data = File.read(dir_path +@filename) + send_data(tmp_filename_data, type: 'application/xlsx', disposition: 'attachment', filename: @filename) end def download_scan_file_of_certificate - @sign_up_setting_id = SignUpSetting.last.id + @sign_up_setting_id = @sign_up_setting.id if !params[:student_id].to_s.blank? - @student = OlympiaStudentDataField.where(:student_id=>params[:student_id]).first + @student = OlympiaStudentDataField.find(params[:student_id]) rescue nil if @student.nil? redirect_to :back else tmp_filename_data = @student.olympia_student_images.last.student_file.file.read - send_data(tmp_filename_data, type: 'image/jpg', disposition: 'attachment', filename: "#{params[:student_name]}.jpg") + send_data(tmp_filename_data, type: 'image/jpg', disposition: 'attachment', filename: "#{@student.StudentName}.jpg") end else @student_data_list = OlympiaStudentDataField.where(:sign_up_setting_id=>@sign_up_setting_id) @@ -290,7 +316,7 @@ class Admin::OlympiamanagementsController < OrbitAdminController end end def add_sign_up_student_data - @olympia_school_data_field = OlympiaSchoolDataFields.where(:account_number=>session[:olympia_login_id]).first + @olympia_school_data_field = OlympiaSchoolDataFields.find(params[:school_id]) rescue nil redirect_to :back if @olympia_school_data_field.nil? @required_fields = [:school_contact_person_name,:department_job_title,:office_tel_number,:fax,:mobile_number,:email] @flag = true @@ -339,12 +365,12 @@ class Admin::OlympiamanagementsController < OrbitAdminController if @olympia_student_data.nil? @olympia_student_data = OlympiaStudentDataField.create(@student_params) @olympia_student_data.olympia_school_data_fields_id = @olympia_school_data_field.id - @olympia_student_data.sign_up_setting_id = SignUpSetting.last.id + @olympia_student_data.sign_up_setting_id = @sign_up_setting.id @olympia_student_data.save else @olympia_student_data.update_attributes(@student_params) end - redirect_to admin_olympiamanagements_sign_up_student_data_list_path + redirect_to admin_olympiamanagements_sign_up_student_data_list_path+"?olympia_school_id=#{params[:school_id]}" else render 'import_error_msg' end @@ -361,8 +387,9 @@ class Admin::OlympiamanagementsController < OrbitAdminController end def create_first_fields StudentDataField.create if StudentDataField.all.length == 0 - SchoolDataFields.create if StudentDataField.all.length == 0 + SchoolDataFields.create if SchoolDataFields.all.length == 0 SignUpSetting.create if SignUpSetting.all.length == 0 + @sign_up_setting = SignUpSetting.where(:active=>true).last end def download_import_file @OlympiaSchoolDataFields = OlympiaSchoolDataFields.all.asc(:id) diff --git a/app/controllers/olympiamanagements_controller.rb b/app/controllers/olympiamanagements_controller.rb index 80fb947..871856c 100644 --- a/app/controllers/olympiamanagements_controller.rb +++ b/app/controllers/olympiamanagements_controller.rb @@ -18,14 +18,15 @@ class OlympiamanagementsController < ApplicationController rescue @@error = nil end - if request.session[:olympia_login_id].to_s.blank? + @school = OlympiaSchoolDataFields.where(:account_number=>request.session[:olympia_login_id],:approved=>true).first rescue nil + if @school.nil? render_contents_in_index_page(render_to_string(:formats=> [:html] ,:partial=>'login',:locals=>{:@error=>@@error})) and return end end def login @@error = nil if !params[:login_id].to_s.blank? - if OlympiaSchoolDataFields.where(:account_number=>params[:login_id]).length == 0 + if OlympiaSchoolDataFields.where(:account_number=>params[:login_id],:approved=>true).length == 0 @@error = "no_account" else if OlympiaSchoolDataFields.where(:account_number=>params[:login_id]).first.password != params[:login_pw] @@ -43,7 +44,7 @@ class OlympiamanagementsController < ApplicationController end def set_sign_up_setting @key = Site.first.template rescue "" #for_render_pages - @sign_up_setting = SignUpSetting.last + @sign_up_setting = SignUpSetting.where(:active=>true).last data_arr = [{:url=>'/olympiamanagements/school_connection_data',:name=>t('olympiamanagement.school_connection_data')}, {:url=>'/olympiamanagements/add_sign_up_student_data',:name=>t('olympiamanagement.add_sign_up_student_data')}, {:url=>'/olympiamanagements/sign_up_student_data_list',:name=>t('olympiamanagement.sign_up_student_data_list')}, @@ -133,7 +134,21 @@ class OlympiamanagementsController < ApplicationController @page_content = render_to_string(:formats=> [:html] ,:partial=>'login',:locals=>{:@error=>@error}) else @@error = nil + @school_data_fields = [{'account_number'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true",'readonly'=>"readonly"}}, + {'school_name'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true",'readonly'=>"readonly"}}, + {'school_code'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true",'readonly'=>"readonly"}}, + {'school_address'=>{'type'=>'String','size'=>'40','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true",'readonly'=>"readonly"}}, + {'class_number'=>{'type'=>'String','size'=>'5','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true",'readonly'=>"readonly"}}, + {'enrollment_limited'=>{'type'=>'Fixnum','size'=>'5','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true",'readonly'=>"readonly"}}, + {'school_contact_person_name'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true"}}, + {'department_job_title'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true"}}, + {'office_tel_number'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true"}}, + {'fax'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true"}}, + {'mobile_number'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true"}}, + {'email'=>{'type'=>'String','size'=>'40','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true"}}] + @olympia_school_data_field = OlympiaSchoolDataFields.where(:account_number=>@@session[:olympia_login_id]).first @page_content = @breadcumb + @page_content += render_to_string(:formats=> [:html] ,:partial=>'edit_school_data_for_index.html',:locals=>{:@school_data_fields=>@school_data_fields,:@olympia_school_data_field=>@olympia_school_data_field,:@@session=>@@session}) #form_for not work for rendering in Pagescontroller => edit to form end else if !@instructions_pages.empty? @@ -207,7 +222,7 @@ class OlympiamanagementsController < ApplicationController page_num = params[:page] || 1 @field_infos = StudentDataField.first.student_data_fields @olympia_school_data_fields_id = OlympiaSchoolDataFields.where(:account_number=>session[:olympia_login_id]).first.id - @sign_up_setting_id = SignUpSetting.last.id + @sign_up_setting_id = @sign_up_setting.id @student_fields = OlympiaStudentDataField.where(:olympia_school_data_fields_id=>@olympia_school_data_fields_id,:sign_up_setting_id=>@sign_up_setting_id).asc(:id).page(page_num).per(10) @page_content = render_to_string(:formats=> [:html] ,:partial=>'student_data_list.html',:locals=>{:@student_fields=>(@student_fields rescue [])}).html_safe render_contents_in_index_page(@breadcumb+@page_content) @@ -243,7 +258,10 @@ class OlympiamanagementsController < ApplicationController @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=>"#{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 + @remark_texts = @sign_up_setting.remark_field[I18n.locale.to_s].html_safe + @sign_up_setting.attributes.to_h.each do |key,value| + @remark_texts = @remark_texts.gsub("{{#{key}}}",value.to_s) + end @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 @record_fields = [['school_name','school_code'],['school_address'],['class_number','enrollment_limited'], @@ -251,7 +269,7 @@ class OlympiamanagementsController < ApplicationController @student_fields = ['serial_number','StudentName','StudentSex','StudentClass','StudentIDNO','birth_date','StudentArea','StudentIdentity'] @field_infos = StudentDataField.first.student_data_fields @olympia_school_data_fields_id = OlympiaSchoolDataFields.where(:account_number=>session[:olympia_login_id]).first.id - @sign_up_setting_id = SignUpSetting.last.id + @sign_up_setting_id = @sign_up_setting.id @student_data_list = OlympiaStudentDataField.where(:olympia_school_data_fields_id=>@olympia_school_data_fields_id,:sign_up_setting_id=>@sign_up_setting_id) @head = render_to_string(:formats=>[:html],:file=>"#{Rails.root}/app/templates/#{@key}/partial/_head.html") end @@ -264,7 +282,6 @@ class OlympiamanagementsController < ApplicationController uid = OrbitHelper.params[:uid] rescue "" tags = OrbitHelper.widget_tags categories = OrbitHelper.widget_categories || [] - @sign_up_setting = SignUpSetting.last @olympiamanagement_instruction = @sign_up_setting.registration_instructions[I18n.locale.to_s].to_s @sign_up_setting.attributes.to_h.each do |key,value| @olympiamanagement_instruction = @olympiamanagement_instruction.gsub("{{#{key}}}",value.to_s) @@ -579,10 +596,8 @@ class OlympiamanagementsController < ApplicationController if @error_msg.empty? @olympia_student_data = OlympiaStudentDataField.find(params[:id]) rescue nil if @olympia_student_data.nil? - @olympia_student_data = OlympiaStudentDataField.create(@student_params) - @olympia_student_data.olympia_school_data_fields_id = @olympia_school_data_field.id - @olympia_student_data.sign_up_setting_id = SignUpSetting.last.id - @olympia_student_data.save + @olympia_student_data = OlympiaStudentDataField.create(@student_params.merge({ + :olympia_school_data_fields_id=>@olympia_school_data_field.id,:sign_up_setting_id => @sign_up_setting.id})) else @olympia_student_data.update_attributes(@student_params) end diff --git a/app/models/olympia_school_data_fields.rb b/app/models/olympia_school_data_fields.rb index 6a16fab..da8b34a 100644 --- a/app/models/olympia_school_data_fields.rb +++ b/app/models/olympia_school_data_fields.rb @@ -22,6 +22,9 @@ class OlympiaSchoolDataFields field :enrollment , type: Fixnum , default: 0 field :approved , type: Boolean , default: true field :sign_up_setting_id , type: String , default: SignUpSetting.last.id.to_s + after_destroy do |record| + OlympiaStudentDataField.where(:olympia_school_data_fields_id => record.id,:sign_up_setting_id=>SignUpSetting.last.id).destroy_all + end after_initialize do if !self.new_record? if self.approved.nil? @@ -32,6 +35,10 @@ class OlympiaSchoolDataFields self.enrollment = 0 self.save! end + if self.enrollment == 0 #check enrollment student number + self.enrollment = OlympiaStudentDataField.where(:olympia_school_data_fields_id=>self.id,:sign_up_setting_id=>SignUpSetting.last.id).length + self.save! + end if self.enrollment_limited.nil? self.enrollment_limited = 0 self.save! diff --git a/app/models/olympia_student_data_field.rb b/app/models/olympia_student_data_field.rb index 1b63098..d11ce38 100644 --- a/app/models/olympia_student_data_field.rb +++ b/app/models/olympia_student_data_field.rb @@ -24,6 +24,24 @@ class OlympiaStudentDataField field :sign_up_setting_id , type: String , default: '' has_many :olympia_student_images , :dependent => :destroy , autosave: true after_save :check_file + after_create do |record| + if !record.olympia_school_data_fields_id.blank? + @school = OlympiaSchoolDataFields.find(record.olympia_school_data_fields_id) rescue nil + if !@school.nil? + @school.enrollment = @school.enrollment + 1 + @school.save + end + end + end + after_destroy do |record| + if !record.olympia_school_data_fields_id.blank? + @school = OlympiaSchoolDataFields.find(record.olympia_school_data_fields_id) rescue nil + if !@school.nil? + @school.enrollment = @school.enrollment - 1 + @school.save + end + end + end after_initialize do if !self.new_record? if self.approved.nil? diff --git a/app/models/sign_up_setting.rb b/app/models/sign_up_setting.rb index ae04947..a826cdc 100644 --- a/app/models/sign_up_setting.rb +++ b/app/models/sign_up_setting.rb @@ -18,9 +18,13 @@ class SignUpSetting field :end_minute , type: String , default: Time.now.strftime("%M") field :default_password , type: String , default: "" field :set_default_password , type: Boolean , default: false - field :remark_field , type: Hash , default: {:zh_tw=>"",:en=>""} + field :remark_field , type: Hash , default: {:zh_tw=>"注意事項:
+請於2019年5月3日前(以郵戳為憑),將本報名表正本(需核章)以掛號方式郵寄至【11677台北市文山區汀州路4段88號科教中心,收件人: IJSO選訓委員會】,逾期概不受理報名。
+
+

",:en=>""} field :registration_instructions , type: Hash , default: {:zh_tw=>"",:en=>""} - after_save :change_all_password + field :active , type: Boolean , default: true + after_save :change_all_password , :check_active def change_all_password if self.set_default_password OlympiaSchoolDataFields.all.each do |school_field| @@ -31,4 +35,11 @@ class SignUpSetting self.save end end + def check_active + if self.active + SignUpSetting.where.not(:id=>self.id).each do |setting| + setting.active = false + end + end + end end \ No newline at end of file diff --git a/app/views/admin/olympiamanagements/_student_export.xlsx.axlsx b/app/views/admin/olympiamanagements/_student_export.xlsx.axlsx new file mode 100644 index 0000000..41141b7 --- /dev/null +++ b/app/views/admin/olympiamanagements/_student_export.xlsx.axlsx @@ -0,0 +1,15 @@ +# encoding: utf-8 + +wb = xlsx_package.workbook +wb.add_worksheet(name: "school_class") do |sheet| + row = [] + title = sheet.styles.add_style(:bg_color => "FFFF00",:border=>{ :style => :thin, :color => "666666" },:alignment=>{ :horizontal => :center,:vertical => :center ,:wrap_text => true}) + column = sheet.styles.add_style(:alignment=>{ :horizontal => :center,:vertical => :center ,:wrap_text => true},:border=>{ :style => :thin, :color => "666666" }) + @fields.each do |field| + row << t('olympiamanagement.'+field) + end + sheet.add_row row , :style=> title,:widths => row.map{|cell| (cell.length* 11/ 2).round} + @student_data_list.each do |infos_row| + sheet.add_row infos_row , :style=> column + end +end \ No newline at end of file diff --git a/app/views/admin/olympiamanagements/export_school_connection_data.html.erb b/app/views/admin/olympiamanagements/export_school_connection_data.html.erb deleted file mode 100644 index e69de29..0000000 diff --git a/app/views/admin/olympiamanagements/export_sign_up_student_data.html.erb b/app/views/admin/olympiamanagements/export_sign_up_student_data.html.erb deleted file mode 100644 index e69de29..0000000 diff --git a/app/views/admin/olympiamanagements/sign_up_student_data_list.html.erb b/app/views/admin/olympiamanagements/sign_up_student_data_list.html.erb index 2526ce9..a590c9f 100644 --- a/app/views/admin/olympiamanagements/sign_up_student_data_list.html.erb +++ b/app/views/admin/olympiamanagements/sign_up_student_data_list.html.erb @@ -2,6 +2,10 @@ <% th_name_list = ['StudentName','StudentSex','StudentClass','birth_date','StudentIdentity','StudentArea','scan_file_of_certificate','action']%> +<% @school = (OlympiaSchoolDataFields.find(params[:olympia_school_id]) rescue nil) %> +<% if !@school.nil? %> +

<%= "#{t('olympiamanagement.school_name')}:#{@school.school_name}".html_safe %>

+<% end %> @@ -18,7 +22,7 @@ <% elsif th_name == 'scan_file_of_certificate'%> <% if !field.olympia_student_images.map{|image| image.student_file.file}.select { |file| file.present?}.empty? %> - + <% else %> <% end %> diff --git a/app/views/olympiamanagements/_edit_school_data_for_index.html.erb b/app/views/olympiamanagements/_edit_school_data_for_index.html.erb new file mode 100644 index 0000000..e4fee8d --- /dev/null +++ b/app/views/olympiamanagements/_edit_school_data_for_index.html.erb @@ -0,0 +1,35 @@ + + + +
+ <%=t('olympiamanagement.school_connection_data')%> +
+ + + "> + <% @school_data_fields.each do |field| %> +
+ <% @extra_class = ((field.values[0]["required"] == "true")? " required" : "")%> + <% @extra_text = ((field.values[0]["required"] == "true")? "*" : "")%> +
  • <%= @extra_text+t('olympiamanagement.'+field.keys[0]) %>
  • + <% if field.values[0]["type"] != 'select' %> + " value="<%= (field.keys[0]=="enrollment_limited"&&(@olympia_school_data_field[field.keys[0]].nil? || @olympia_school_data_field[field.keys[0]] == 0) ) ? ClassSettingFields.all.select{|class_setting_field| class_setting_field.class_number_range[0] <= @olympia_school_data_field.class_number && class_setting_field.class_number_range[1] >= @olympia_school_data_field.class_number}.first.enrollment_available.to_s : @olympia_school_data_field[field.keys[0]] %>" size="<%=field.values[0]["size"]%>" type="text" id="<%= field.keys[0] %>" class="col_input<%= @extra_class%>" <%=field.values[0]["readonly"]%>/> + <% else%> + <% @please_choice = (I18n.locale.to_s == "zh_tw") ? "請選擇" : "Please select." %> + + <% end %> +
  • + <% if(!field.values[0]["hint"][I18n.locale.to_s].blank? rescue false) %> + <%=field.values[0][:hint][I18n.locale.to_s]%> + <% end %> +
    + <% end %> +
    + + + +
    \ No newline at end of file
    <%= "#{field.StudentBirthYear}-#{field.StudentBirthMonth}-#{field.StudentBirthDay}" %><%= "#{field.StudentName}.gif" %><%= "><%= "#{field.StudentName}.jpg" %><%= ">