diff --git a/app/assets/images/edit.gif b/app/assets/images/edit.gif new file mode 100644 index 0000000..3fa5e1f Binary files /dev/null and b/app/assets/images/edit.gif differ diff --git a/app/assets/images/trash.gif b/app/assets/images/trash.gif new file mode 100644 index 0000000..a752a91 Binary files /dev/null and b/app/assets/images/trash.gif differ diff --git a/app/assets/javascripts/admin/olympiamanagement.js b/app/assets/javascripts/admin/olympiamanagement.js new file mode 100644 index 0000000..14bc25e --- /dev/null +++ b/app/assets/javascripts/admin/olympiamanagement.js @@ -0,0 +1,11 @@ +$(document).ready(function(){ + $('.fieldset_block input[type="reset"]').off('click').on('click',function(){ + $('.col_input').val(''); + }); + $('.fieldset_block input[type="submit"]').off('click').on('click',function(){ + var class_number_range = []; + class_number_range.push($('.col_input input[name="MinClass"]').val()); + class_number_range.push($('.col_input input[name="MaxClass"]').val()); + class_number_range.sort(); + }); +}); \ No newline at end of file diff --git a/app/assets/stylesheets/admin/olympiamanagement.scss b/app/assets/stylesheets/admin/olympiamanagement.scss new file mode 100644 index 0000000..765bc1a --- /dev/null +++ b/app/assets/stylesheets/admin/olympiamanagement.scss @@ -0,0 +1,64 @@ +.fieldset_title{ + margin: 0 0.9375em 1.25em 0.9375em; + padding: 0.3125em; + font-size: 1.2em; + font-weight: bold; + border: 0em; + width: auto; +} +.fieldset_block{ + padding: 1.25em 0.625em 1.25em 3%; + border-width: 0.125em; + border-style: groove; + border-color: threedface; + border-image: initial; +} +.col { + float: left; + clear: both; + width: 8.125em; + margin: 0 0.625em 0px 0; + padding: 0.0625em 0 0.0625em 0; +} +.col_r { + float: left; + display: inline; + padding-bottom: 0.1875em; +} +.col_input{ + padding: 0; + width: auto; +} +.ts_rowsonly thead th { + background: #9ec630; + padding: 0.375em; + border-bottom-width: 0; +} +.ts_rowsonly th { + color: #fff; +} +.ts_rowsonly th { + padding: 0.375em 0.625em; + text-align: left; + color: #fff; + vertical-align: top; + background: #81ce25; + border-bottom: 1px solid #67ac14; +} +.ts_rowsonly .even { + background: #f5f6e2; +} +.ts_rowsonly td { + border-bottom: 1px solid #e7eab9; + padding: 0.375em 0.625em; + text-align: left; + color: #111; + vertical-align: top; +} +.ts_rowsonly { + margin: 0.625em 0 5px 0; + font-size: 1em; +} +li{ + display: block; +} \ No newline at end of file diff --git a/app/assets/stylesheets/olympiamanagement.scss b/app/assets/stylesheets/olympiamanagement.scss new file mode 100644 index 0000000..dc09099 --- /dev/null +++ b/app/assets/stylesheets/olympiamanagement.scss @@ -0,0 +1,6 @@ +.fieldset_title{ + margin: 0 15px 20px 15px; + padding: 5px; + font-size: 1.2em; + font-weight: bold; +} \ No newline at end of file diff --git a/app/views/admin/olympiamanagements/class_setting.html.erb b/app/views/admin/olympiamanagements/class_setting.html.erb index e69de29..da9c36b 100644 --- a/app/views/admin/olympiamanagements/class_setting.html.erb +++ b/app/views/admin/olympiamanagements/class_setting.html.erb @@ -0,0 +1,29 @@ + + + +
+ <%=t('olympiamanagement.class_setting')%> +
+
  • <%= t('olympiamanagement.class_number')+"(#{t('olympiamanagement.spacing')})"%>
  • +
  • + ~ +
  • +
    +
    +
  • <%= t('olympiamanagement.enrollment_available') %>
  • +
    +
    + + +
    + + + + + + + + + + +
    <%= t('olympiamanagement.class_number') %><%= t('olympiamanagement.enrollment_available') %><%= t('olympiamanagement.action') %>
    \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index 594abc8..d27d99c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,6 +1,7 @@ en: olympiamanagement: olympiamanagement: Olympia competition management + add_school_data: Add school data school_data_list: School data list class_setting: Class setting sign_up_setting: Sign up setting @@ -8,4 +9,11 @@ en: export_sign_up_student_data: Export sign up student data download_scan_file_of_certificate: Download scan file of certificate import_editing_number_of_school_class: Import editing number of school class - \ No newline at end of file + class_number: Number of class in school + spacing: spacing + enrollment_available: Enrollment available + confirm: Confirm + cancel: Cancel + action: Action + edit: Edit + delete: Delete \ No newline at end of file diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 192667a..27bcccd 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -8,4 +8,12 @@ zh_tw: export_school_connection_data: 匯出學校聯絡資料 export_sign_up_student_data: 匯出報名學生資料 download_scan_file_of_certificate: 下載獎狀掃描檔 - import_editing_number_of_school_class: 匯入修改學校班級數 \ No newline at end of file + import_editing_number_of_school_class: 匯入修改學校班級數 + class_number: 全校班級數 + spacing: 間距 + enrollment_available: 可報名人數 + confirm: 確定 + cancel: 取消 + action: 動作 + edit: 編輯 + delete: 刪除 \ No newline at end of file diff --git a/lib/olympiamanagement/engine.rb b/lib/olympiamanagement/engine.rb index 6928a67..c2a5e51 100644 --- a/lib/olympiamanagement/engine.rb +++ b/lib/olympiamanagement/engine.rb @@ -22,42 +22,42 @@ module Olympiamanagement :active_for_action=>{'admin/olympiamanagements'=>'index'}, :available_for => 'users' context_link 'olympiamanagement.add_school_data', - :link_path=>"admin_olympiamanagements_path" , + :link_path=>"admin_olympiamanagements_add_school_data_path" , :priority=>1, :active_for_action=>{'admin/olympiamanagements'=>'add_school_data'}, :available_for => 'users' context_link 'olympiamanagement.school_data_list', - :link_path=>"admin_olympiamanagements_path" , + :link_path=>"admin_olympiamanagements_school_data_list_path" , :priority=>1, :active_for_action=>{'admin/olympiamanagements'=>'school_data_list'}, :available_for => 'users' context_link 'olympiamanagement.class_setting', - :link_path=>"admin_olympiamanagements_path" , + :link_path=>"admin_olympiamanagements_class_setting_path" , :priority=>1, :active_for_action=>{'admin/olympiamanagements'=>'class_setting'}, :available_for => 'users' context_link 'olympiamanagement.sign_up_setting', - :link_path=>"admin_olympiamanagements_path" , + :link_path=>"admin_olympiamanagements_sign_up_setting_path" , :priority=>1, :active_for_action=>{'admin/olympiamanagements'=>'sign_up_setting'}, :available_for => 'users' context_link 'olympiamanagement.export_school_connection_data', - :link_path=>"admin_olympiamanagements_path" , + :link_path=>"admin_olympiamanagements_export_school_connection_data_path" , :priority=>1, :active_for_action=>{'admin/olympiamanagements'=>'export_school_connection_data'}, :available_for => 'users' context_link 'olympiamanagement.export_sign_up_student_data', - :link_path=>"admin_olympiamanagements_path" , + :link_path=>"admin_olympiamanagements_export_sign_up_student_data_path" , :priority=>1, :active_for_action=>{'admin/olympiamanagements'=>'export_sign_up_student_data'}, :available_for => 'users' context_link 'olympiamanagement.download_scan_file_of_certificate', - :link_path=>"admin_olympiamanagements_path" , + :link_path=>"admin_olympiamanagements_download_scan_file_of_certificate_path" , :priority=>1, :active_for_action=>{'admin/olympiamanagements'=>'download_scan_file_of_certificate'}, :available_for => 'users' context_link 'olympiamanagement.import_editing_number_of_school_class', - :link_path=>"admin_olympiamanagements_path" , + :link_path=>"admin_olympiamanagements_import_editing_number_of_school_class_path" , :priority=>1, :active_for_action=>{'admin/olympiamanagements'=>'import_editing_number_of_school_class'}, :available_for => 'users'