From 5d371c941c78ce67aec419e6bba345ca7e0f6e08 Mon Sep 17 00:00:00 2001 From: Ryo Takaishi Date: Tue, 12 Sep 2023 21:41:13 +0900 Subject: [PATCH 1/5] chore: no necessary to change url by event --- app/controllers/admin/conferences_controller.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/admin/conferences_controller.rb b/app/controllers/admin/conferences_controller.rb index e240bb9df..426581951 100644 --- a/app/controllers/admin/conferences_controller.rb +++ b/app/controllers/admin/conferences_controller.rb @@ -19,10 +19,7 @@ def update respond_to do |format| if @conference_form.save - if @conference.opened? - path = "/#{@conference.abbr}/#{@conference.abbr == 'cndt2020' ? 'tracks' : 'ui/'}" - ActionCable.server.broadcast('waiting_channel', { msg: 'redirect to tracks', redirectTo: path }) - end + ActionCable.server.broadcast('waiting_channel', { msg: 'redirect to tracks', redirectTo: "/#{@conference.abbr}/ui/" }) if @conference.opened? redirect_path = if referrer_controller == 'admin/proposals' admin_proposals_path else From 1d7f60111bd42bba4916880edea5d2b597a7cc80 Mon Sep 17 00:00:00 2001 From: Ryo Takaishi Date: Tue, 12 Sep 2023 21:43:23 +0900 Subject: [PATCH 2/5] fix: typo --- spec/requests/tracks_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/requests/tracks_spec.rb b/spec/requests/tracks_spec.rb index aa74b61a4..9caa376fd 100644 --- a/spec/requests/tracks_spec.rb +++ b/spec/requests/tracks_spec.rb @@ -35,7 +35,7 @@ expect(response.body).to(include('Alice様へのお知らせ')) end - context 'wnen announcement is not published' do + context 'when announcement is not published' do before do create(:speaker_announcement, speakers: [alice]) end From 3bdaf5ad4ed10eb323ed563611b66035079e59aa Mon Sep 17 00:00:00 2001 From: Ryo Takaishi Date: Fri, 15 Sep 2023 19:18:45 +0900 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20=E3=83=AA=E3=83=8F=E3=83=BC?= =?UTF-8?q?=E3=82=B5=E3=83=AB=E3=83=A2=E3=83=BC=E3=83=89=E3=81=AE=E3=82=AA?= =?UTF-8?q?=E3=83=B3=E3=82=AA=E3=83=95=E3=82=92=E5=8F=AF=E8=83=BD=E3=81=AB?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admin/conferences_controller.rb | 1 + app/forms/conference_form.rb | 4 +++- app/models/conference.rb | 1 + app/views/admin/conferences/_form.html.erb | 9 +++++++++ app/views/admin/show.html.erb | 1 + app/views/api/v1/conferences/index.json.jbuilder | 1 + app/views/api/v1/conferences/show.json.jbuilder | 1 + ...230915101121_add_rehearsal_mode_to_conferences.rb | 12 ++++++++++++ db/schema.rb | 3 ++- schemas/swagger.yml | 2 ++ spec/factories/conferences.rb | 1 + spec/models/conference_spec.rb | 1 + 12 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20230915101121_add_rehearsal_mode_to_conferences.rb diff --git a/app/controllers/admin/conferences_controller.rb b/app/controllers/admin/conferences_controller.rb index 426581951..638e15abb 100644 --- a/app/controllers/admin/conferences_controller.rb +++ b/app/controllers/admin/conferences_controller.rb @@ -36,6 +36,7 @@ def update def conference_params params.require(:conference).permit(:conference_status, + :rehearsal_mode, :cfp_result_visible, :speaker_entry, :attendee_entry, diff --git a/app/forms/conference_form.rb b/app/forms/conference_form.rb index 35e329c7c..1a3228f8b 100644 --- a/app/forms/conference_form.rb +++ b/app/forms/conference_form.rb @@ -4,6 +4,7 @@ class ConferenceForm include ActiveModel::Validations attr_accessor :conference_status + attr_accessor :rehearsal_mode attr_accessor :cfp_result_visible attr_accessor :speaker_entry attr_accessor :attendee_entry @@ -97,7 +98,7 @@ def save return if invalid? ActiveRecord::Base.transaction do - conference.update!(conference_status:, cfp_result_visible:, speaker_entry:, attendee_entry:, show_timetable:, show_sponsors:, brief:, privacy_policy:, privacy_policy_for_speaker:) + conference.update!(conference_status:, rehearsal_mode:, cfp_result_visible:, speaker_entry:, attendee_entry:, show_timetable:, show_sponsors:, brief:, privacy_policy:, privacy_policy_for_speaker:) end rescue => e puts(e) @@ -120,6 +121,7 @@ def load def default_attributes { conference_status: conference.conference_status, + rehearsal_mode: conference.rehearsal_mode, cfp_result_visible: conference.cfp_result_visible, speaker_entry: conference.speaker_entry, attendee_entry: conference.attendee_entry, diff --git a/app/models/conference.rb b/app/models/conference.rb index 6068ff3b0..36a2a60c3 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -15,6 +15,7 @@ # name :string(255) # privacy_policy :text(65535) # privacy_policy_for_speaker :text(65535) +# rehearsal_mode :boolean default(FALSE), not null # show_sponsors :boolean default(FALSE) # show_timetable :integer default("show_timetable_disabled") # speaker_entry :integer default("speaker_entry_disabled") diff --git a/app/views/admin/conferences/_form.html.erb b/app/views/admin/conferences/_form.html.erb index 1c5221632..962cc216c 100644 --- a/app/views/admin/conferences/_form.html.erb +++ b/app/views/admin/conferences/_form.html.erb @@ -22,6 +22,15 @@ +

Rehearsal Mode

+ +
+
+ <%= form.check_box :rehearsal_mode %> + <%= form.label :rehearsal_mode, 'On' %>
+
+
+

Proposal Result Visible Status

diff --git a/app/views/admin/show.html.erb b/app/views/admin/show.html.erb index afde6db10..185b21028 100644 --- a/app/views/admin/show.html.erb +++ b/app/views/admin/show.html.erb @@ -8,6 +8,7 @@

<%= @conference.name %>

  • カンファレンスステータス: <%= @conference.conference_status %>
  • +
  • リハーサルモード: <%= @conference.rehearsal_mode ? 'オン' : 'オフ' %>
  • CFPの結果公開: <%= @conference.cfp_result_visible ? '公開' : '非公開' %>
  • 登壇者のエントリー: <%= @conference.speaker_entry %>
  • 参加者の申し込み: <%= @conference.attendee_entry %>
  • diff --git a/app/views/api/v1/conferences/index.json.jbuilder b/app/views/api/v1/conferences/index.json.jbuilder index 4bb2e251d..c33c6861f 100644 --- a/app/views/api/v1/conferences/index.json.jbuilder +++ b/app/views/api/v1/conferences/index.json.jbuilder @@ -3,6 +3,7 @@ json.array!(@conferences) do |conference| json.name(conference.name) json.abbr(conference.abbr) json.status(conference.conference_status) + json.rehearsalMode(conference.rehearsal_mode) json.theme(conference.theme) json.about(conference.about) json.privacy_policy(conference.privacy_policy) diff --git a/app/views/api/v1/conferences/show.json.jbuilder b/app/views/api/v1/conferences/show.json.jbuilder index b8a444702..ef20ff725 100644 --- a/app/views/api/v1/conferences/show.json.jbuilder +++ b/app/views/api/v1/conferences/show.json.jbuilder @@ -2,6 +2,7 @@ json.id(@conference.id) json.name(@conference.name) json.abbr(@conference.abbr) json.status(@conference.conference_status) +json.rehearsalMode(@conference.rehearsal_mode) json.theme(@conference.theme) json.about(@conference.about) json.privacy_policy(@conference.privacy_policy) diff --git a/db/migrate/20230915101121_add_rehearsal_mode_to_conferences.rb b/db/migrate/20230915101121_add_rehearsal_mode_to_conferences.rb new file mode 100644 index 000000000..4aa08b217 --- /dev/null +++ b/db/migrate/20230915101121_add_rehearsal_mode_to_conferences.rb @@ -0,0 +1,12 @@ +class AddRehearsalModeToConferences < ActiveRecord::Migration[7.0] + def up + add_column :conferences, :rehearsal_mode, :boolean, default: false, null: false + Conference.all.each do |conference| + conference.update!(rehearsal_mode: false) + end + end + + def down + remove_column :conferences, :rehearsal_mode + end +end diff --git a/db/schema.rb b/db/schema.rb index 34554059c..141ad190d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_06_27_103419) do +ActiveRecord::Schema[7.0].define(version: 2023_09_15_101121) do create_table "access_logs", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| t.string "name" t.string "sub" @@ -132,6 +132,7 @@ t.string "brief" t.string "committee_name", default: "CloudNative Days Committee", null: false t.string "conference_status", default: "registered" + t.boolean "rehearsal_mode", default: false, null: false t.index ["abbr", "conference_status"], name: "index_conferences_on_abbr_and_conference_status" t.index ["abbr"], name: "index_conferences_on_abbr" end diff --git a/schemas/swagger.yml b/schemas/swagger.yml index a8ad53f6c..28297b567 100644 --- a/schemas/swagger.yml +++ b/schemas/swagger.yml @@ -1009,6 +1009,8 @@ components: type: string status: type: string + rehearsalMode: + type: boolean theme: type: string about: diff --git a/spec/factories/conferences.rb b/spec/factories/conferences.rb index 1bd9b3659..5db41d023 100644 --- a/spec/factories/conferences.rb +++ b/spec/factories/conferences.rb @@ -15,6 +15,7 @@ # name :string(255) # privacy_policy :text(65535) # privacy_policy_for_speaker :text(65535) +# rehearsal_mode :boolean default(FALSE), not null # show_sponsors :boolean default(FALSE) # show_timetable :integer default("show_timetable_disabled") # speaker_entry :integer default("speaker_entry_disabled") diff --git a/spec/models/conference_spec.rb b/spec/models/conference_spec.rb index 7db3cf1f6..0865befca 100644 --- a/spec/models/conference_spec.rb +++ b/spec/models/conference_spec.rb @@ -15,6 +15,7 @@ # name :string(255) # privacy_policy :text(65535) # privacy_policy_for_speaker :text(65535) +# rehearsal_mode :boolean default(FALSE), not null # show_sponsors :boolean default(FALSE) # show_timetable :integer default("show_timetable_disabled") # speaker_entry :integer default("speaker_entry_disabled") From a01b2971a8f58affa99cfddd2028aecbba447d28 Mon Sep 17 00:00:00 2001 From: Ryo Takaishi Date: Sun, 17 Sep 2023 14:21:07 +0900 Subject: [PATCH 4/5] =?UTF-8?q?interval=E3=81=AB=E9=96=8B=E5=A7=8B?= =?UTF-8?q?=E6=99=82=E5=88=BB=E3=81=8C=E3=81=AA=E3=81=84=E3=81=A8=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=81=AB=E3=81=AA=E3=82=8B=E3=81=AE=E3=81=A7?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/csv/cndf2023/talks.csv | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/db/csv/cndf2023/talks.csv b/db/csv/cndf2023/talks.csv index cd88157b5..052998cf1 100644 --- a/db/csv/cndf2023/talks.csv +++ b/db/csv/cndf2023/talks.csv @@ -21,13 +21,11 @@ id,conference_id,title,abstract,talk_category_id,talk_difficulty_id,track_id,con 920,9,B5 ふがふが,ようやくそれはこの高等ん監獄を思いかもな、発音の校長をきっと聞いましがあるているたのん。よく何しろ三三一年が知れですから、陰では文へはそれが人達がするなてするるのに聞いたで。また始めいろいろ国をできがくるましたから、道楽に無論お話しのようで。,73,60,42,25,18:00,18:40,http://,1,0,, 921,9,C5 ぴよぴよ,ようやくそれはこの高等ん監獄を思いかもな、発音の校長をきっと聞いましがあるているたのん。よく何しろ三三一年が知れですから、陰では文へはそれが人達がするなてするるのに聞いたで。また始めいろいろ国をできがくるましたから、道楽に無論お話しのようで。,74,61,43,25,18:00,18:40,http://,1,0,, 922,9,Closing,intermission,,,41,25,18:50,19:00,http://,0,0,, -923,9,休憩,intermission,,,,25,,,http://,0,0,, -924,9,休憩,intermission,,,,25,,,http://,0,0,, -925,9,休憩,intermission,,,,25,,,http://,0,0,, -926,9,休憩,intermission,,,,25,,,http://,0,0,, -927,9,休憩,intermission,,,,25,,,http://,0,0,, -928,9,休憩,intermission,,,,25,,,http://,0,0,, -929,9,休憩,intermission,,,,25,,,http://,0,0,, -930,9,休憩,intermission,,,,25,,,http://,0,0,, -931,9,落選,ようやくそれはこの高等ん監獄を思いかもな、発音の校長をきっと聞いましがあるているたのん。よく何しろ三三一年が知れですから、陰では文へはそれが人達がするなてするるのに聞いたで。また始めいろいろ国をできがくるましたから、道楽に無論お話しのようで。,74,61,,,,,http://,0,0,, -932,9,落選,ようやくそれはこの高等ん監獄を思いかもな、発音の校長をきっと聞いましがあるているたのん。よく何しろ三三一年が知れですから、陰では文へはそれが人達がするなてするるのに聞いたで。また始めいろいろ国をできがくるましたから、道楽に無論お話しのようで。,74,61,,,,,http://,0,0,, +923,9,休憩,intermission,,,,25,13:00,14:00,http://,0,0,, +924,9,休憩,intermission,,,,25,14:40,15:00,http://,0,0,, +925,9,休憩,intermission,,,,25,15:40,16:00,http://,0,0,, +926,9,休憩,intermission,,,,25,16:40,17:00,http://,0,0,, +927,9,休憩,intermission,,,,25,17:40,18:00,http://,0,0,, +928,9,休憩,intermission,,,,25,18:40,18:50,http://,0,0,, +939,9,落選,ようやくそれはこの高等ん監獄を思いかもな、発音の校長をきっと聞いましがあるているたのん。よく何しろ三三一年が知れですから、陰では文へはそれが人達がするなてするるのに聞いたで。また始めいろいろ国をできがくるましたから、道楽に無論お話しのようで。,74,61,,,,,http://,0,0,, +940,9,落選,ようやくそれはこの高等ん監獄を思いかもな、発音の校長をきっと聞いましがあるているたのん。よく何しろ三三一年が知れですから、陰では文へはそれが人達がするなてするるのに聞いたで。また始めいろいろ国をできがくるましたから、道楽に無論お話しのようで。,74,61,,,,,http://,0,0,, From 0c2348cd57df198bf40c8c3cafc0ce1103324f37 Mon Sep 17 00:00:00 2001 From: Ryo Takaishi Date: Sun, 17 Sep 2023 21:03:23 +0900 Subject: [PATCH 5/5] update schema --- db/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/schema.rb b/db/schema.rb index 710d20dee..86cece92b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_09_15_101121) do +ActiveRecord::Schema[7.0].define(version: 2023_09_16_121212) do create_table "access_logs", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| t.string "name" t.string "sub"