From 41ca98636d4d365faa3bea973db1967fbc8a447f Mon Sep 17 00:00:00 2001 From: chiu Date: Sat, 5 Oct 2019 00:11:39 +0800 Subject: [PATCH 01/18] add reviwer field in admin's form --- app/controllers/admin/seminars_controller.rb | 15 +++++---- app/models/seminar_main.rb | 5 +-- app/models/seminar_review.rb | 12 +++++++ app/views/admin/seminars/_form.html.erb | 33 ++++++++++++++++++-- config/locales/en.yml | 5 +++ config/locales/zh_tw.yml | 5 +++ 6 files changed, 64 insertions(+), 11 deletions(-) create mode 100644 app/models/seminar_review.rb diff --git a/app/controllers/admin/seminars_controller.rb b/app/controllers/admin/seminars_controller.rb index 800e67a..d95ad02 100644 --- a/app/controllers/admin/seminars_controller.rb +++ b/app/controllers/admin/seminars_controller.rb @@ -58,11 +58,10 @@ class Admin::SeminarsController < OrbitAdminController end def new - + @member = nil @seminar = SeminarMain.new - @seminar_items = SeminarItem.all - + @review = @seminar.seminar_reviews.new() end def create @@ -85,9 +84,14 @@ class Admin::SeminarsController < OrbitAdminController end def edit - @seminar_items = SeminarItem.all - + attribute = SeminarMain.where(id: params[:id]) + if attribute.first.seminar_reviews.first.nil? + @review = attribute.first.seminar_reviews.new() + else + @review = attribute.first.seminar_reviews.first + end + @member = MemberProfile.find(@review.reviewer_id) rescue nil end def update @@ -190,5 +194,4 @@ class Admin::SeminarsController < OrbitAdminController params.require(:seminar_main).permit! end - end diff --git a/app/models/seminar_main.rb b/app/models/seminar_main.rb index 7b284ad..c9badcc 100644 --- a/app/models/seminar_main.rb +++ b/app/models/seminar_main.rb @@ -35,13 +35,14 @@ class SeminarMain has_many :seminar_item_contents, :autosave => true, :dependent => :destroy has_many :seminar_signups, :autosave => true, :dependent => :destroy has_many :seminar_signup_fields, :autosave => true, :dependent => :destroy - + has_many :seminar_reviews, :autosave => true, :dependent => :destroy + accepts_nested_attributes_for :seminar_links, :allow_destroy => true accepts_nested_attributes_for :seminar_files, :allow_destroy => true accepts_nested_attributes_for :seminar_item_contents, :allow_destroy => true accepts_nested_attributes_for :seminar_signups, :allow_destroy => true accepts_nested_attributes_for :seminar_signup_fields, :allow_destroy => true - + accepts_nested_attributes_for :seminar_reviews, :allow_destroy => true def self.time_range(date1 = null, date2 = null) diff --git a/app/models/seminar_review.rb b/app/models/seminar_review.rb new file mode 100644 index 0000000..8ed7aee --- /dev/null +++ b/app/models/seminar_review.rb @@ -0,0 +1,12 @@ +# encoding: utf-8 +require "orbit_form_helper" +class SeminarReview + + include Mongoid::Document + include Mongoid::Timestamps + + field :review_start_date, :type => Date, :default => Time.now + field :review_end_date, :type => Date, :default => Time.now + field :reviewer_id + belongs_to :seminar_main +end diff --git a/app/views/admin/seminars/_form.html.erb b/app/views/admin/seminars/_form.html.erb index f6e9605..e6c94fd 100644 --- a/app/views/admin/seminars/_form.html.erb +++ b/app/views/admin/seminars/_form.html.erb @@ -18,7 +18,8 @@ @@ -102,12 +103,38 @@
<%= f.text_field :contribute_file_count %> - (空白無限制) + (<%= t('seminar.blank_no_limit') %>)
- + +
+ <%= f.fields_for :seminar_reviews,@review do |seminar_reviews_form| %> +
+ +
+ <% if !@member.nil? %> + <%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'seminar_main[seminar_reviews_attributes][0][reviewer_id][]', email_members:@member} %> + <% else %> + <%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'seminar_main[seminar_reviews_attributes][0][reviewer_id][]', email_members:[]} %> + <% end %> +
+
+
+ +
+ <%= seminar_reviews_form.datetime_picker :review_start_date, :no_label => true, :format=>"yyyy/MM/dd", :new_record => @seminar.new_record? %> +
+
+
+ +
+ <%= seminar_reviews_form.datetime_picker :review_end_date, :no_label => true, :format=>"yyyy/MM/dd", :new_record => @seminar.new_record? %> +
+
+ <% end %> +
diff --git a/config/locales/en.yml b/config/locales/en.yml index 010de05..9c345f4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -15,6 +15,11 @@ en: verification_failed: 驗證碼錯誤 seminar: + reviewer: 審查委員 + review_end_date: 審查結束日期 + review_start_date: 審查開始日期 + review: 審稿 + blank_no_limit: 空白無限制 export_csv: 匯出CSV recaptcha: 驗證碼 yes_: 是 diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index dcc1eac..47acaf9 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -15,6 +15,11 @@ zh_tw: verification_failed: 驗證碼錯誤 seminar: + reviewer: 審查委員 + review_end_date: 審查結束日期 + review_start_date: 審查開始日期 + review: 審稿 + blank_no_limit: 空白無限制 export_csv: 匯出CSV recaptcha: 驗證碼 yes_: 是 From e8af319429a1a3bcf171d340bb69594030054741 Mon Sep 17 00:00:00 2001 From: chiu Date: Mon, 28 Oct 2019 21:12:56 +0800 Subject: [PATCH 02/18] Update show_data.html.erb fix error --- app/views/seminars/show_data.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/seminars/show_data.html.erb b/app/views/seminars/show_data.html.erb index d0a0183..50b843b 100644 --- a/app/views/seminars/show_data.html.erb +++ b/app/views/seminars/show_data.html.erb @@ -1,5 +1,5 @@ <% # encoding: utf-8 %> - +<%= yield %> <% data = action_data @seminar = data["seminar"] From 60b15e4a4da4614659d30d328e1727783ff7b503 Mon Sep 17 00:00:00 2001 From: chiu Date: Mon, 28 Oct 2019 21:19:15 +0800 Subject: [PATCH 03/18] Update seminars_controller.rb fix error --- app/controllers/seminars_controller.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/controllers/seminars_controller.rb b/app/controllers/seminars_controller.rb index d513de4..9a6e0e2 100644 --- a/app/controllers/seminars_controller.rb +++ b/app/controllers/seminars_controller.rb @@ -36,8 +36,6 @@ class SeminarsController < ApplicationController time_now = Time.now - session = OrbitHelper.get_session - params = OrbitHelper.params seminar = SeminarMain.find_by(uid: params[:uid]) From 7814c23c92aaff7ae204ad22fafa50100307776e Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 29 Oct 2019 22:00:31 +0800 Subject: [PATCH 04/18] Update seminars_controller.rb fix error --- app/controllers/seminars_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/seminars_controller.rb b/app/controllers/seminars_controller.rb index 9a6e0e2..5fac0fc 100644 --- a/app/controllers/seminars_controller.rb +++ b/app/controllers/seminars_controller.rb @@ -40,7 +40,7 @@ class SeminarsController < ApplicationController seminar = SeminarMain.find_by(uid: params[:uid]) - if !seminar.registration_status.blank? and seminar.signup_start_date <= time_now and ( seminar.signup_end_date.nil? or seminar.signup_end_date+1 >= time_now ) + if !seminar.registration_status.blank? && seminar.signup_start_date <= time_now && ( seminar.signup_end_date.nil? || seminar.signup_end_date+1 >= time_now ) sign_up = ('' + t('seminar.signup') + '').html_safe elsif seminar.registration_status.blank? sign_up = t('seminar.sign_up_not_open') @@ -50,9 +50,9 @@ class SeminarsController < ApplicationController sign_up = t('seminar.sign_up_overdue') end - if !seminar.registration_status.blank? and seminar.registration_status.include?('C') and seminar.contribute_start_date <= time_now and ( seminar.contribute_end_date.nil? or seminar.contribute_end_date+1 >= time_now ) - if !session[:seminar_signup_id].blank? - if session[:seminar_main_id] == seminar.id + if !seminar.registration_status.blank? && seminar.registration_status.include?('C') && seminar.contribute_start_date <= time_now && ( seminar.contribute_end_date.nil? || seminar.contribute_end_date+1 >= time_now ) + if !@@session[:seminar_signup_id].blank? + if @@session[:seminar_main_id] == seminar.id contribute_action = ('' + t('seminar_signup.uploads') + '').html_safe else contribute_action = ('' + t('seminar_signup.con_login') + '').html_safe From 32b89b1dd71040bc628c508de4cd1e9d2ffa0abd Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 29 Oct 2019 22:01:05 +0800 Subject: [PATCH 05/18] Update show_data.html.erb fix error --- app/views/seminars/show_data.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/seminars/show_data.html.erb b/app/views/seminars/show_data.html.erb index 50b843b..182799a 100644 --- a/app/views/seminars/show_data.html.erb +++ b/app/views/seminars/show_data.html.erb @@ -1,4 +1,5 @@ <% # encoding: utf-8 %> +<% @@session = session %> <%= yield %> <% data = action_data From 8edb6de80765e6676c5a561c64133519bad3646a Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 29 Oct 2019 22:45:42 +0800 Subject: [PATCH 06/18] Update seminars_controller.rb fix error --- app/controllers/seminars_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/seminars_controller.rb b/app/controllers/seminars_controller.rb index 5fac0fc..6f0c8ef 100644 --- a/app/controllers/seminars_controller.rb +++ b/app/controllers/seminars_controller.rb @@ -1,6 +1,7 @@ class SeminarsController < ApplicationController helper MemberHelper + include ActionView::Context include Admin::SeminarsHelper # include SimpleCaptcha::ControllerHelpers def index From e7a0d13a38e125883933b1f83aba136496c17cad Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 29 Oct 2019 23:13:52 +0800 Subject: [PATCH 07/18] Update seminars_controller.rb fix error --- app/controllers/seminars_controller.rb | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/app/controllers/seminars_controller.rb b/app/controllers/seminars_controller.rb index 6f0c8ef..baf931f 100644 --- a/app/controllers/seminars_controller.rb +++ b/app/controllers/seminars_controller.rb @@ -1,7 +1,7 @@ class SeminarsController < ApplicationController helper MemberHelper - include ActionView::Context + include ActionView::Context #vary important (only add this can access @@session from view) include Admin::SeminarsHelper # include SimpleCaptcha::ControllerHelpers def index @@ -204,13 +204,11 @@ class SeminarsController < ApplicationController def add_file - session = OrbitHelper.get_session + if !@@session[:seminar_main_id].blank? - if !session[:seminar_main_id].blank? + seminar = SeminarMain.find_by(id: @@session[:seminar_main_id]) - seminar = SeminarMain.find_by(id: session[:seminar_main_id]) - - seminar_signup = SeminarSignup.find_by(_id: session[:seminar_signup_id], seminar_main_id: session[:seminar_main_id] ) + seminar_signup = SeminarSignup.find_by(_id: @@session[:seminar_signup_id], seminar_main_id: @@session[:seminar_main_id] ) else @@ -245,13 +243,11 @@ class SeminarsController < ApplicationController time_now = Time.now - session = OrbitHelper.get_session + if !@@session[:seminar_main_id].blank? - if !session[:seminar_main_id].blank? + seminar = SeminarMain.find_by(id: @@session[:seminar_main_id]) - seminar = SeminarMain.find_by(id: session[:seminar_main_id]) - - seminar_signup = SeminarSignup.find_by(_id: session[:seminar_signup_id], seminar_main_id: session[:seminar_main_id] ) + seminar_signup = SeminarSignup.find_by(_id: @@session[:seminar_signup_id], seminar_main_id: @@session[:seminar_main_id] ) else From ad7bebecee738d813245ee23807774e20099ca82 Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 29 Oct 2019 23:14:20 +0800 Subject: [PATCH 08/18] Update con_upload.html.erb fix error --- app/views/seminars/con_upload.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/seminars/con_upload.html.erb b/app/views/seminars/con_upload.html.erb index 6144d9e..175cf42 100644 --- a/app/views/seminars/con_upload.html.erb +++ b/app/views/seminars/con_upload.html.erb @@ -1,4 +1,6 @@ <% # encoding: utf-8 %> +<% @@session = session %> +<%= yield %> <% data = action_data @seminar = data["seminar"] From 606e438fb883e4c8e4c395f7bc57abe22ccf0fb1 Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 29 Oct 2019 23:14:38 +0800 Subject: [PATCH 09/18] Update add_file.html.erb fix error --- app/views/seminars/add_file.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/seminars/add_file.html.erb b/app/views/seminars/add_file.html.erb index a916fd6..87a7b6b 100644 --- a/app/views/seminars/add_file.html.erb +++ b/app/views/seminars/add_file.html.erb @@ -1,4 +1,6 @@ <% # encoding: utf-8 %> +<% @@session = session %> +<%= yield %> <% data = action_data @con = data["con"] From 2fdf97fcb9663f6f9b573dce5311927cd81733d6 Mon Sep 17 00:00:00 2001 From: Eric Tsai Date: Mon, 11 Nov 2019 11:10:08 +0800 Subject: [PATCH 10/18] update en locale config --- config/locales/en.yml | 110 +++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 9c345f4..7e723b3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -5,46 +5,46 @@ en: label: "" restful_actions: - act_signup: 報名資料 + act_signup: Sign Up Info #報名資料 module_name: - seminar: 研討會 + seminar: Seminar #研討會 recaptcha: errors: - verification_failed: 驗證碼錯誤 + verification_failed: Verification Failed #驗證碼錯誤 seminar: - reviewer: 審查委員 - review_end_date: 審查結束日期 - review_start_date: 審查開始日期 - review: 審稿 - blank_no_limit: 空白無限制 - export_csv: 匯出CSV - recaptcha: 驗證碼 - yes_: 是 - no_: 否 - seminar: 研討會 - title: 研討會名稱 - speaker: 主講者 - content: 內容說明 - act_place: 活動地點 - registration_status: 報名身分 - registration_status_C: 投稿者 + reviewer: Reviewer #審查委員 + review_end_date: Review End Date #審查結束日期 + review_start_date: Review Start Date #審查開始日期 + review: Reveiw #審稿 + blank_no_limit: Allow Blank Value #空白無限制 + export_csv: Export CSV #匯出CSV + recaptcha: Recaptcha #驗證碼 + yes_: Yes #是 + no_: No #否 + seminar: Seminar #研討會 + title: Conference Name #研討會名稱 + speaker: Speaker #主講者 + content: Content #內容說明 + act_place: Seminar Location #活動地點 + registration_status: Attendee Role #報名身分 + registration_status_C: Contributor #投稿者 registration_status_G: 一般報名 - seminar_start_date: 活動開始時間 - seminar_end_date: 活動結束時間 - signup_start_date: 報名開始時間 - signup_end_date: 報名結束時間 - contribute_start_date: 投稿開始時間 - contribute_end_date: 投稿結束時間 - event_during: 活動期間 - contribute_during: 投稿期間 - signup_during: 報名期間 - signup_count: 報名人數 - signup: 報名 - export: 匯出 - set_seminar_items: 項目 + seminar_start_date: Seminar Start Date #活動開始時間 + seminar_end_date: Seminar End Date #活動結束時間 + signup_start_date: Sign Up Start Date #報名開始時間 + signup_end_date: Sign Up End Date #報名結束時間 + contribute_start_date: Contribute Start Date #投稿開始時間 + contribute_end_date: Contirbute End Date #投稿結束時間 + event_during: Event During #活動期間 + contribute_during: Contribute During #投稿期間 + signup_during: Sign Up During #報名期間 + signup_count: Sign Up Count #報名人數 + signup: Sign Up #報名 + export: Export #匯出 + set_seminar_items: #項目 set_seminar_signup_field: 圈選設定 set_seminar_item_content: 項目設定 set_seminar_agreements: 個資宣告設定 @@ -52,40 +52,40 @@ en: to_require: 是否必填 sign_up_not_yet: 報名時間未開始 sign_up_not_open: 未開放報名 - sign_up_overdue: 報名時間已過 - contribute_file_count: 投稿檔案數 + sign_up_overdue: Sign Up Overdue #報名時間已過 + contribute_file_count: Count of Contribute Files #投稿檔案數 frontend: seminar: 研討會前台 seminar_item: - new_item: 新增項目 - edit_item: 編輯項目 - set_item: 設定項目 - del_item: 刪除項目 + new_item: New Item #新增項目 + edit_item: Edit Item #編輯項目 + set_item: Set Item #設定項目 + del_item: Delete Item #刪除項目 seminar_item_content: - content: 內容 + content: Content #內容 seminar_signup: - signup_time: 報名時間 + signup_time: Sign Up Time #報名時間 name: Name - unit: 單位 + unit: Unit #單位 tel: TEL phone: Mobile telephone fax: Fax - address: 地址 - email: e-mail信箱 - password: 密碼 - note: 註解 - time: (開始/結束)時間 - place: 地點 + address: Address #地址 + email: Email #e-mail信箱 + password: Password #密碼 + note: Note #註解 + time: 'Start / End Time' #(開始/結束)時間 + place: Place #地點 agree: "Accept Privacy and Personal Information Protection Policy of the Site" - signup_field: 圈選項目 - uploads: 上傳檔案 - con_login: 投稿者登入 - file_name: 稿件名稱 - file_note: 摘要 - files: 檔案 - logout: 登出 - logouting: 登出中 + signup_field: Sign Up Field #圈選項目 + uploads: Uploads #上傳檔案 + con_login: Contributor Login #投稿者登入 + file_name: File Name #稿件名稱 + file_note: Summary #摘要 + files: Files #檔案 + logout: Log Out #登出 + logouting: Logging Out #登出中 From ec8c11e5eddb2be96e9c40f1db4cce5c430fbba0 Mon Sep 17 00:00:00 2001 From: Eric Tsai Date: Mon, 11 Nov 2019 11:11:31 +0800 Subject: [PATCH 11/18] remove unwanted spaces --- config/locales/en.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 7e723b3..c23fd07 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -17,7 +17,7 @@ en: seminar: reviewer: Reviewer #審查委員 review_end_date: Review End Date #審查結束日期 - review_start_date: Review Start Date #審查開始日期 + review_start_date: Review Start Date #審查開始日期 review: Reveiw #審稿 blank_no_limit: Allow Blank Value #空白無限制 export_csv: Export CSV #匯出CSV @@ -38,16 +38,16 @@ en: signup_end_date: Sign Up End Date #報名結束時間 contribute_start_date: Contribute Start Date #投稿開始時間 contribute_end_date: Contirbute End Date #投稿結束時間 - event_during: Event During #活動期間 - contribute_during: Contribute During #投稿期間 - signup_during: Sign Up During #報名期間 - signup_count: Sign Up Count #報名人數 - signup: Sign Up #報名 - export: Export #匯出 - set_seminar_items: #項目 - set_seminar_signup_field: 圈選設定 - set_seminar_item_content: 項目設定 - set_seminar_agreements: 個資宣告設定 + event_during: Event During #活動期間 + contribute_during: Contribute During #投稿期間 + signup_during: Sign Up During #報名期間 + signup_count: Sign Up Count #報名人數 + signup: Sign Up #報名 + export: Export #匯出 + set_seminar_items: #項目 + set_seminar_signup_field: 圈選設定 + set_seminar_item_content: 項目設定 + set_seminar_agreements: 個資宣告設定 seminar_agreements_content: 個資宣告內容 to_require: 是否必填 sign_up_not_yet: 報名時間未開始 @@ -75,7 +75,7 @@ en: phone: Mobile telephone fax: Fax address: Address #地址 - email: Email #e-mail信箱 + email: Email #e-mail信箱 password: Password #密碼 note: Note #註解 time: 'Start / End Time' #(開始/結束)時間 From 3a3c62bd7868fe843ed1d34c64008b219e4f6a04 Mon Sep 17 00:00:00 2001 From: Eric Tsai Date: Mon, 11 Nov 2019 12:13:21 +0800 Subject: [PATCH 12/18] add missing en locale config --- config/locales/en.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index c23fd07..89c5687 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -44,19 +44,19 @@ en: signup_count: Sign Up Count #報名人數 signup: Sign Up #報名 export: Export #匯出 - set_seminar_items: #項目 - set_seminar_signup_field: 圈選設定 - set_seminar_item_content: 項目設定 - set_seminar_agreements: 個資宣告設定 - seminar_agreements_content: 個資宣告內容 - to_require: 是否必填 - sign_up_not_yet: 報名時間未開始 - sign_up_not_open: 未開放報名 + set_seminar_items: Items #項目 + set_seminar_signup_field: Set Sign Up Field #圈選設定 + set_seminar_item_content: Set Item Content #項目設定 + set_seminar_agreements: Personal Data Usage Agreements #個資宣告設定 + seminar_agreements_content: Content of Personal Data Usage Agreements #個資宣告內容 + to_require: Should Be Filled? #是否必填 + sign_up_not_yet: Does Not Yet Allow Sign Up #報名時間未開始 + sign_up_not_open: Does Not Open Sign Up #未開放報名 sign_up_overdue: Sign Up Overdue #報名時間已過 contribute_file_count: Count of Contribute Files #投稿檔案數 frontend: - seminar: 研討會前台 + seminar: Semianr #研討會前台 seminar_item: new_item: New Item #新增項目 From 13a8b920037b7a4e5d059cd39a65cc6174f21ec6 Mon Sep 17 00:00:00 2001 From: Eric Tsai Date: Mon, 11 Nov 2019 13:36:56 +0800 Subject: [PATCH 13/18] add password message --- app/views/seminars/show.html.erb | 2 +- config/locales/en.yml | 1 + config/locales/zh_tw.yml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/seminars/show.html.erb b/app/views/seminars/show.html.erb index b567742..767e2f7 100644 --- a/app/views/seminars/show.html.erb +++ b/app/views/seminars/show.html.erb @@ -135,7 +135,7 @@
<%= f.text_field :password, :class=>"input-medium form-control", :placeholder=> t('seminar_signup.password') %> - ( 此密碼為下次投稿上傳檔案時必須輸入的密碼。 ) + <%= t('seminar_signup.password_message') %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 89c5687..e4afe95 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -77,6 +77,7 @@ en: address: Address #地址 email: Email #e-mail信箱 password: Password #密碼 + password_message: '( This password is for uploading file when contributing. )' note: Note #註解 time: 'Start / End Time' #(開始/結束)時間 place: Place #地點 diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 47acaf9..8466812 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -77,6 +77,7 @@ zh_tw: address: 地址 email: e-mail信箱 password: 密碼 + password_message: '( 此密碼為下次投稿上傳檔案時必須輸入的密碼。 )' note: 註解 time: (開始/結束)時間 place: 地點 From 0bd8a87ca273ca933b2f06e00191ef6aab605b07 Mon Sep 17 00:00:00 2001 From: Eric Tsai Date: Mon, 11 Nov 2019 14:28:58 +0800 Subject: [PATCH 14/18] update sign up success locale message --- app/views/seminars/signup_ok.html.erb | 6 +++--- config/locales/en.yml | 1 + config/locales/zh_tw.yml | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/seminars/signup_ok.html.erb b/app/views/seminars/signup_ok.html.erb index 11ea5a4..3a1d454 100644 --- a/app/views/seminars/signup_ok.html.erb +++ b/app/views/seminars/signup_ok.html.erb @@ -1,6 +1,6 @@ <% # encoding: utf-8 %> -<% - data = action_data +<% + data = action_data %> -您的報名已成功,感謝您的參與。 \ No newline at end of file +<%= t('seminar_signup.success_message') %> diff --git a/config/locales/en.yml b/config/locales/en.yml index e4afe95..440010d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -90,3 +90,4 @@ en: files: Files #檔案 logout: Log Out #登出 logouting: Logging Out #登出中 + success_message: 'Registration successful, thank you.' diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 8466812..a222052 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -91,3 +91,4 @@ zh_tw: files: 檔案 logout: 登出 logouting: 登出中 + success_message: '您的報名已成功,感謝您的參與。' From 51a6af84432e4e61ea1394f5d0c4e9ce418bc016 Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 13 Nov 2019 00:15:18 +0800 Subject: [PATCH 15/18] Update edit_file.html.erb add ckeditor for file_note --- app/views/seminars/edit_file.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/seminars/edit_file.html.erb b/app/views/seminars/edit_file.html.erb index 80074c7..503384f 100644 --- a/app/views/seminars/edit_file.html.erb +++ b/app/views/seminars/edit_file.html.erb @@ -1,4 +1,5 @@ <% # encoding: utf-8 %> +<%= javascript_include_tag 'basic.js' %> <% data = action_data @con = data["con"] @@ -18,7 +19,7 @@
- <%= f.text_area :description, rows: 5, :class=>"input-medium form-control", :placeholder=> t('seminar_signup.file_note') %> + <%= f.text_area :description, rows: 5, :class=>"ckeditor input-medium form-control", :placeholder=> t('seminar_signup.file_note') %>
From fc737ec6a8563f787457a578087eb724a509dcb4 Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 13 Nov 2019 11:36:06 +0800 Subject: [PATCH 16/18] fix some error --- app/views/admin/seminars/seminar_signup.html.erb | 13 +++++++++---- app/views/seminars/con_upload.html.erb | 2 +- app/views/seminars/edit_file.html.erb | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/views/admin/seminars/seminar_signup.html.erb b/app/views/admin/seminars/seminar_signup.html.erb index 4a3b18b..34e343b 100644 --- a/app/views/admin/seminars/seminar_signup.html.erb +++ b/app/views/admin/seminars/seminar_signup.html.erb @@ -19,6 +19,7 @@ <%= t('seminar_signup.name')%> <%= t('seminar.registration_status')%> + <%= t('seminar_signup.file_note')%> <%= t('seminar_signup.uploads')%> @@ -36,14 +37,18 @@ - <%= t("seminar.registration_status_#{seminar_signup.status}") if !seminar_signup.status.blank? %> + <%= t("seminar.registration_status_#{seminar_signup.status}") if !seminar_signup.status.blank? %> + + +
  • <%= seminar_signup_contribute.description.to_s.html_safe %>
  • + +
      <% seminar_signup.seminar_signup_contributes.collect do |seminar_signup_contribute| %> -
    • <%= link_to (seminar_signup_contribute.title.blank? ? File.basename(seminar_signup_contribute.file.path) : seminar_signup_contribute.title) , seminar_signup_contribute.file.url, {:target => '_blank', :title => seminar_signup_contribute.description} if seminar_signup_contribute.file.file - %>
    • +
    • <%= link_to (seminar_signup_contribute.title.blank? ? File.basename(seminar_signup_contribute.file.path) : seminar_signup_contribute.title) , seminar_signup_contribute.file.url, {:target => '_blank'} if seminar_signup_contribute.file.file %> +
    • <% end %> -
    <% end %> diff --git a/app/views/seminars/con_upload.html.erb b/app/views/seminars/con_upload.html.erb index 175cf42..16c81c7 100644 --- a/app/views/seminars/con_upload.html.erb +++ b/app/views/seminars/con_upload.html.erb @@ -31,7 +31,7 @@ %> <%= seminar_signup_contribute.title %> - <%= seminar_signup_contribute.description %> + <%= seminar_signup_contribute.description.to_s.html_safe %> <%= link_to (seminar_signup_contribute.title.blank? ? File.basename(seminar_signup_contribute.file.path) : seminar_signup_contribute.title) , seminar_signup_contribute.file.url, {:target => '_blank', :title => seminar_signup_contribute.description} if seminar_signup_contribute.file.file %> <%= link_to t(:edit), OrbitHelper.url_to_show(@seminar.to_param) + '?method=edit_file&con_no=' + seminar_signup_contribute.id, :class => 'btn btn-primary' %> diff --git a/app/views/seminars/edit_file.html.erb b/app/views/seminars/edit_file.html.erb index 503384f..0c3870e 100644 --- a/app/views/seminars/edit_file.html.erb +++ b/app/views/seminars/edit_file.html.erb @@ -1,4 +1,5 @@ <% # encoding: utf-8 %> +<%= stylesheet_link_tag "lib/jquery-ui-1.12.1/jquery-ui.min.css" %> <%= javascript_include_tag 'basic.js' %> <% data = action_data From 8efa1fc2c532a14333bc0310cf5b54d75ae8593f Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 13 Nov 2019 11:40:24 +0800 Subject: [PATCH 17/18] fix error --- .../admin/seminars/seminar_signup.html.erb | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/admin/seminars/seminar_signup.html.erb b/app/views/admin/seminars/seminar_signup.html.erb index 34e343b..f38cc32 100644 --- a/app/views/admin/seminars/seminar_signup.html.erb +++ b/app/views/admin/seminars/seminar_signup.html.erb @@ -39,17 +39,17 @@ <%= t("seminar.registration_status_#{seminar_signup.status}") if !seminar_signup.status.blank? %> - -
  • <%= seminar_signup_contribute.description.to_s.html_safe %>
  • - - - -
      - <% seminar_signup.seminar_signup_contributes.collect do |seminar_signup_contribute| %> -
    • <%= link_to (seminar_signup_contribute.title.blank? ? File.basename(seminar_signup_contribute.file.path) : seminar_signup_contribute.title) , seminar_signup_contribute.file.url, {:target => '_blank'} if seminar_signup_contribute.file.file %> -
    • - <% end %> - +
        + <% seminar_signup.seminar_signup_contributes.collect do |seminar_signup_contribute| %> + +
      • <%= link_to (seminar_signup_contribute.title.blank? ? File.basename(seminar_signup_contribute.file.path) : seminar_signup_contribute.title) , seminar_signup_contribute.file.url, {:target => '_blank'} if seminar_signup_contribute.file.file %> +
      • + + +
      • <%= seminar_signup_contribute.description.to_s.html_safe %>
      • + + <% end %> +
      <% end %> From ccea066ecc7c3cd42f36e86f1134258ab4b9ab6a Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 13 Nov 2019 12:07:16 +0800 Subject: [PATCH 18/18] fix errors --- app/views/admin/seminars/seminar_signup.html.erb | 16 +++++++++------- app/views/seminars/add_file.html.erb | 4 +++- app/views/seminars/con_upload.html.erb | 2 +- config/locales/en.yml | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/views/admin/seminars/seminar_signup.html.erb b/app/views/admin/seminars/seminar_signup.html.erb index f38cc32..a1a0963 100644 --- a/app/views/admin/seminars/seminar_signup.html.erb +++ b/app/views/admin/seminars/seminar_signup.html.erb @@ -40,15 +40,17 @@ <%= t("seminar.registration_status_#{seminar_signup.status}") if !seminar_signup.status.blank? %>
        - <% seminar_signup.seminar_signup_contributes.collect do |seminar_signup_contribute| %> - -
      • <%= link_to (seminar_signup_contribute.title.blank? ? File.basename(seminar_signup_contribute.file.path) : seminar_signup_contribute.title) , seminar_signup_contribute.file.url, {:target => '_blank'} if seminar_signup_contribute.file.file %> -
      • - - + + <% seminar_signup.seminar_signup_contributes.collect do |seminar_signup_contribute| %>
      • <%= seminar_signup_contribute.description.to_s.html_safe %>
      • - + <% end %> + + + <% seminar_signup.seminar_signup_contributes.collect do |seminar_signup_contribute| %> +
      • <%= link_to (seminar_signup_contribute.title.blank? ? File.basename(seminar_signup_contribute.file.path) : seminar_signup_contribute.title) , seminar_signup_contribute.file.url, {:target => '_blank', :title => Nokogiri::HTML(seminar_signup_contribute.description).text} if seminar_signup_contribute.file.file %> +
      • <% end %> +
      <% end %> diff --git a/app/views/seminars/add_file.html.erb b/app/views/seminars/add_file.html.erb index 87a7b6b..0fadf5f 100644 --- a/app/views/seminars/add_file.html.erb +++ b/app/views/seminars/add_file.html.erb @@ -1,4 +1,6 @@ <% # encoding: utf-8 %> +<%= stylesheet_link_tag "lib/jquery-ui-1.12.1/jquery-ui.min.css" %> +<%= javascript_include_tag 'basic.js' %> <% @@session = session %> <%= yield %> <% @@ -24,7 +26,7 @@
      - <%= f.text_area :description, rows: 5, :class=>"input-medium form-control", :placeholder=> t('seminar_signup.file_note') %> + <%= f.text_area :description, rows: 5, :class=>"ckeditor input-medium form-control", :placeholder=> t('seminar_signup.file_note') %>
      diff --git a/app/views/seminars/con_upload.html.erb b/app/views/seminars/con_upload.html.erb index 16c81c7..8c65512 100644 --- a/app/views/seminars/con_upload.html.erb +++ b/app/views/seminars/con_upload.html.erb @@ -32,7 +32,7 @@ <%= seminar_signup_contribute.title %> <%= seminar_signup_contribute.description.to_s.html_safe %> - <%= link_to (seminar_signup_contribute.title.blank? ? File.basename(seminar_signup_contribute.file.path) : seminar_signup_contribute.title) , seminar_signup_contribute.file.url, {:target => '_blank', :title => seminar_signup_contribute.description} if seminar_signup_contribute.file.file %> + <%= link_to File.basename(seminar_signup_contribute.file.path), seminar_signup_contribute.file.url, {:target => '_blank', :title => Nokogiri::HTML(seminar_signup_contribute.description).text} if seminar_signup_contribute.file.file %> <%= link_to t(:edit), OrbitHelper.url_to_show(@seminar.to_param) + '?method=edit_file&con_no=' + seminar_signup_contribute.id, :class => 'btn btn-primary' %>
      diff --git a/config/locales/en.yml b/config/locales/en.yml index 440010d..3a63fa3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -31,7 +31,7 @@ en: act_place: Seminar Location #活動地點 registration_status: Attendee Role #報名身分 registration_status_C: Contributor #投稿者 - registration_status_G: 一般報名 + registration_status_G: Normal sign up #一般報名 seminar_start_date: Seminar Start Date #活動開始時間 seminar_end_date: Seminar End Date #活動結束時間 signup_start_date: Sign Up Start Date #報名開始時間