OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Make structured meeting the default
Oliver Güntherf4e477622b06
diff --git a/modules/meeting/app/views/meetings/_form.html.erb b/modules/meeting/app/views/meetings/_form.html.erbindex ff354c53445..26cac65acb0 100644--- a/modules/meeting/app/views/meetings/_form.html.erb+++ b/modules/meeting/app/views/meetings/_form.html.erb@@ -35,51 +35,53 @@ See COPYRIGHT and LICENSE files for more details.<%= f.text_field :title, :required => true, :size => 60, container_class: '-wide' %></div>- <div class="form--field -required -align-start">- <label class="form--label" for="meeting_type"><%= Meeting.human_attribute_name(:type) %></label>- <div class="form--field-container">- <div class="op-tile-block">- <label class="op-tile-block--tile form--radio-button-container -wide"- for="meeting_type_classic"- data-test-selector="op-tile-block">- <div class="op-tile-block--content">- <%= styled_radio_button_tag 'meeting[type]',- 'classic',- true,- no_label: true,- class: 'radio-button' %>- <div>+ <% if @meeting.new_record? %>+ <div class="form--field -required -align-start">+ <label class="form--label" for="meeting_type"><%= Meeting.human_attribute_name(:type) %></label>+ <div class="form--field-container">+ <div class="op-tile-block">+ <label class="op-tile-block--tile form--radio-button-container -wide"+ for="meeting_type_dynamic"+ data-test-selector="op-tile-block">+ <div class="op-tile-block--content">+ <%= styled_radio_button_tag 'meeting[type]',+ 'dynamic',+ true,+ no_label: true,+ class: 'radio-button' %>+ <div><span data-test-selector="op-tile-block-title" class="op-tile-block--title">- <%= t('meeting.types.classic') %>+ <%= t('meeting.types.structured') %></span>- <p class="op-tile-block--description">- <%= t('meeting.types.classic_text') %>- </p>+ <p class="op-tile-block--description">+ <%= t('meeting.types.structured_text') %>+ </p>+ </div></div>- </div>- </label>- <label class="op-tile-block--tile form--radio-button-container -wide"- for="meeting_type_dynamic"- data-test-selector="op-tile-block">- <div class="op-tile-block--content">- <%= styled_radio_button_tag 'meeting[type]',- 'dynamic',- false,- no_label: true,- class: 'radio-button' %>- <div>+ </label>+ <label class="op-tile-block--tile form--radio-button-container -wide"+ for="meeting_type_classic"+ data-test-selector="op-tile-block">+ <div class="op-tile-block--content">+ <%= styled_radio_button_tag 'meeting[type]',+ 'classic',+ false,+ no_label: true,+ class: 'radio-button' %>+ <div><span data-test-selector="op-tile-block-title" class="op-tile-block--title">- <%= t('meeting.types.structured') %>+ <%= t('meeting.types.classic') %></span>- <p class="op-tile-block--description">- <%= t('meeting.types.structured_text') %>- </p>+ <p class="op-tile-block--description">+ <%= t('meeting.types.classic_text') %>+ </p>+ </div></div>- </div>- </label>+ </label>+ </div></div></div>- </div>+ <% end %><% if global_meeting_create_context? %><div class="form--field -required">@@ -110,7 +112,7 @@ See COPYRIGHT and LICENSE files for more details.<div class="form--field -required"><label for="meeting_start_date" class="form--label"><%= Meeting.human_attribute_name(:start_date) %><span class="hidden-for-sighted">- <%= t(:label_start_date)%><%= t(:text_hint_date_format) %>+ <%= t(:label_start_date) %><%= t(:text_hint_date_format) %></span></label>@@ -128,13 +130,13 @@ See COPYRIGHT and LICENSE files for more details.</label></label><%= f.text_field :start_time_hour,- id: 'meeting-form-start-time',- required: true,- type: 'time',- no_label: true,- step: 5.minutes,- suffix: Time.zone.to_s,- container_class: '-xslim' %>+ id: 'meeting-form-start-time',+ required: true,+ type: 'time',+ no_label: true,+ step: 5.minutes,+ suffix: Time.zone.to_s,+ container_class: '-xslim' %></div></div>@@ -142,15 +144,15 @@ See COPYRIGHT and LICENSE files for more details.<label for="meeting-form-duration" class="form--label"><%= Meeting.human_attribute_name(:duration) %></label><div class="form--field-container"><%= f.number_field :duration,- id: 'meeting-form-duration',- required: true,- size: 5,- no_label: true,- min: 0.00,- step: 0.25,- max: 168,- suffix: t(:text_in_hours),- container_class: '-xslim' %>+ id: 'meeting-form-duration',+ required: true,+ size: 5,+ no_label: true,+ min: 0.00,+ step: 0.25,+ max: 168,+ suffix: t(:text_in_hours),+ container_class: '-xslim' %></div></div>diff --git a/modules/meeting/spec/features/meetings_copy_spec.rb b/modules/meeting/spec/features/meetings_copy_spec.rbindex a7558b9ad4e..0bd102932c9 100644--- a/modules/meeting/spec/features/meetings_copy_spec.rb+++ b/modules/meeting/spec/features/meetings_copy_spec.rb@@ -94,6 +94,8 @@ RSpec.describe 'Meetings copy', :js, :with_cuprite doexpect(page).to have_field 'Time', with: start_time.strftime("%H:%M")+ choose 'Classic'+click_button "Create"# Be on the new meeting's page with copied over attributesdiff --git a/modules/meeting/spec/features/meetings_new_spec.rb b/modules/meeting/spec/features/meetings_new_spec.rbindex 49ecffb621c..d8885752d8d 100644--- a/modules/meeting/spec/features/meetings_new_spec.rb+++ b/modules/meeting/spec/features/meetings_new_spec.rb@@ -87,6 +87,7 @@ RSpec.describe 'Meetings new', :js, with_cuprite: false doexpect_angular_frontend_initialized # Wait for project dropdown to be readynew_page.set_title 'Some title'+ new_page.set_type 'Classic'new_page.set_project projectnew_page.set_start_date '2013-03-28'@@ -133,6 +134,7 @@ RSpec.describe 'Meetings new', :js, with_cuprite: false dobefore donew_page.visit!new_page.set_title 'Some title'+ new_page.set_type 'Classic'new_page.set_start_date '2013-03-28'new_page.set_start_time '13:30'new_page.set_duration '1.5'@@ -168,6 +170,7 @@ RSpec.describe 'Meetings new', :js, with_cuprite: false doexpect_angular_frontend_initialized # Wait for project dropdown to be readynew_page.set_title 'Some title'+ new_page.set_type 'Classic'new_page.set_project project@@ -185,6 +188,7 @@ RSpec.describe 'Meetings new', :js, with_cuprite: false dobefore donew_page.visit!new_page.set_title 'Some title'+ new_page.set_type 'Classic'endit 'renders a validation error' do@@ -242,6 +246,7 @@ RSpec.describe 'Meetings new', :js, with_cuprite: false donew_page.visit!new_page.set_title 'Some title'+ new_page.set_type 'Classic'new_page.set_start_date '2013-03-28'new_page.set_start_time '13:30'new_page.set_duration '1.5'@@ -298,6 +303,7 @@ RSpec.describe 'Meetings new', :js, with_cuprite: false doit 'allows creating meeting in a project without members' donew_page.visit!+ new_page.set_type 'Classic'new_page.set_title 'Some title'show_page = new_page.click_create@@ -327,6 +333,7 @@ RSpec.describe 'Meetings new', :js, with_cuprite: false donew_page.visit!new_page.set_title 'Some title'+ new_page.set_type 'Classic'show_page = new_page.click_create