This commit is contained in:
BOHUNG 2020-01-28 20:48:13 +08:00
parent 1c8a479249
commit 9e74d57d66
9 changed files with 136 additions and 10 deletions

BIN
app/assets/images/edit.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
app/assets/images/trash.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -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();
});
});

View File

@ -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;
}

View File

@ -0,0 +1,6 @@
.fieldset_title{
margin: 0 15px 20px 15px;
padding: 5px;
font-size: 1.2em;
font-weight: bold;
}

View File

@ -0,0 +1,29 @@
<link rel="stylesheet" media="screen" type="text/css" href="/assets/admin/olympiamanagement.scss">
<link rel="stylesheet" media="print" type="text/css" href="/assets/admin/olympiamanagement.scss">
<script src="/assets/admin/olympiamanagement.js"></script>
<fieldset class="fieldset_block">
<legend class="fieldset_title"><%=t('olympiamanagement.class_setting')%></legend>
<div class="col_text">
<li class="col" for="MinClass"><%= t('olympiamanagement.class_number')+"(#{t('olympiamanagement.spacing')})"%></li>
<li class="col_r"><input name="MinClass" type="text" id="MinClass" value="" size="5" class="col_input"></li>
<span style="float:left;">~</span>
<li class="col_r"><input name="MaxClass" type="text" id="MaxClass" value="" size="5" class="col_input"></li>
</div>
<div class="col_text">
<li class="col" for="Person"><%= t('olympiamanagement.enrollment_available') %></li><li class="col_r"><input name="Person" type="text" id="Person" value="" size="5" class="col_input"></li>
</div>
<div style="clear:both;"></div>
<input type="submit" name="Submit" value="<%=t('olympiamanagement.confirm')%>">
<input type="reset" name="Submit" value="<%=t('olympiamanagement.cancel')%>">
</fieldset>
<table cellspacing="0" class="ts_rowsonly" width="100%" id="RSS_Table_page_contest_admin_1">
<thead>
<tr>
<th><%= t('olympiamanagement.class_number') %></th>
<th><%= t('olympiamanagement.enrollment_available') %></th>
<th><%= t('olympiamanagement.action') %></th>
</tr>
</thead>
<tbody>
</tbody>
</table>

View File

@ -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
class_number: Number of class in school
spacing: spacing
enrollment_available: Enrollment available
confirm: Confirm
cancel: Cancel
action: Action
edit: Edit
delete: Delete

View File

@ -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: 匯入修改學校班級數
import_editing_number_of_school_class: 匯入修改學校班級數
class_number: 全校班級數
spacing: 間距
enrollment_available: 可報名人數
confirm: 確定
cancel: 取消
action: 動作
edit: 編輯
delete: 刪除

View File

@ -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'