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
Fix meeting name positioning and labels
Oliver Günther00ebf752011f
diff --git a/modules/meeting/app/components/meetings/index/form_component.html.erb b/modules/meeting/app/components/meetings/index/form_component.html.erbindex de2d14d02d7..953c65b6b98 100644--- a/modules/meeting/app/components/meetings/index/form_component.html.erb+++ b/modules/meeting/app/components/meetings/index/form_component.html.erb@@ -43,10 +43,6 @@render(Meeting::TimeGroup.new(f, meeting: @meeting))end- modal_body.with_row(mt: 3) do- render(Meeting::Duration.new(f, meeting: @meeting))- end-if @meeting.is_a?(RecurringMeeting)modal_body.with_row(mt: 3) doflex_layout(classes: "FormControl-horizontalGroup") do |frequency_row|@@ -77,27 +73,41 @@endmodal_body.with_row(mt: 3) do- render(RecurringMeeting::EndAfter.new(f))- end-- modal_body.with_row(mt: 3,- hidden: @meeting.end_after_iterations?,- data: {- value: "specific_date",- target_name: "end_after",- "show-when-value-selected-target": "effect" }- ) do- render(RecurringMeeting::SpecificDate.new(f, meeting: @meeting))- end+ flex_layout(classes: "FormControl-horizontalGroup") do |frequency_row|+ frequency_row.with_column(flex: 1) do+ render(RecurringMeeting::EndAfter.new(f))+ end- modal_body.with_row(mt: 3,- hidden: @meeting.end_after_specific_date?,- data: {- value: "iterations",- target_name: "end_after",- "show-when-value-selected-target": "effect"- }) do- render(RecurringMeeting::Iterations.new(f))+ frequency_row.with_column(+ flex: 1,+ hidden: @meeting.frequency_working_days?,+ data: {+ target_name: "frequency",+ not_value: "working_days",+ set_visibility: "true",+ "show-when-value-selected-target": "effect"+ }) do+ flex_layout do |end_after|+ end_after.with_row(hidden: @meeting.end_after_iterations?,+ data: {+ value: "specific_date",+ target_name: "end_after",+ "show-when-value-selected-target": "effect" }+ ) do+ render(RecurringMeeting::SpecificDate.new(f, meeting: @meeting))+ end++ end_after.with_row(hidden: @meeting.end_after_specific_date?,+ data: {+ value: "iterations",+ target_name: "end_after",+ "show-when-value-selected-target": "effect"+ }) do+ render(RecurringMeeting::Iterations.new(f))+ end+ end+ end+ endendelsemodal_body.with_row dodiff --git a/modules/meeting/app/components/meetings/side_panel/details_form_component.html.erb b/modules/meeting/app/components/meetings/side_panel/details_form_component.html.erbindex cdc2bbc4d52..cc719ac1358 100644--- a/modules/meeting/app/components/meetings/side_panel/details_form_component.html.erb+++ b/modules/meeting/app/components/meetings/side_panel/details_form_component.html.erb@@ -17,10 +17,6 @@render(Meeting::TimeGroup.new(f, meeting: @meeting))end- modal_body.with_row(mt: 3) do- render(Meeting::Duration.new(f, meeting: @meeting))- end-modal_body.with_row(mt: 3) dorender(Meeting::Location.new(f, meeting: @meeting))enddiff --git a/modules/meeting/app/forms/meeting/duration.rb b/modules/meeting/app/forms/meeting/duration.rbdeleted file mode 100644index 8e61bd6e91a..00000000000--- a/modules/meeting/app/forms/meeting/duration.rb+++ /dev/null@@ -1,57 +0,0 @@-#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) the OpenProject GmbH-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License version 3.-#-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-# Copyright (C) 2006-2013 Jean-Philippe Lang-# Copyright (C) 2010-2013 the ChiliProject Team-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License-# as published by the Free Software Foundation; either version 2-# of the License, or (at your option) any later version.-#-# This program is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-# GNU General Public License for more details.-#-# You should have received a copy of the GNU General Public License-# along with this program; if not, write to the Free Software-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-#-# See COPYRIGHT and LICENSE files for more details.-#++--class Meeting::Duration < ApplicationForm- form do |meeting_form|- meeting_form.text_field(- name: :duration,- type: :number,- min: 0,- max: 24,- step: 0.05,- value: @value,- placeholder: Meeting.human_attribute_name(:duration),- label: Meeting.human_attribute_name(:duration),- visually_hide_label: false,- required: true,- leading_visual: { icon: :stopwatch },- caption: I18n.t("text_in_hours")- )- end-- def initialize(meeting:)- super()-- @value =- if meeting.is_a?(RecurringMeeting) && meeting.template- meeting.template.duration- else- meeting.duration- end- end-enddiff --git a/modules/meeting/app/forms/meeting/location.rb b/modules/meeting/app/forms/meeting/location.rbindex 996b17e033b..4d5be511d7a 100644--- a/modules/meeting/app/forms/meeting/location.rb+++ b/modules/meeting/app/forms/meeting/location.rb@@ -33,8 +33,7 @@ class Meeting::Location < ApplicationFormvalue: @value,placeholder: Meeting.human_attribute_name(:location),label: Meeting.human_attribute_name(:location),- visually_hide_label: false,- leading_visual: { icon: :location }+ visually_hide_label: false)enddiff --git a/modules/meeting/app/forms/meeting/time_group.rb b/modules/meeting/app/forms/meeting/time_group.rbindex 62edad4736d..0c6d1ff31b3 100644--- a/modules/meeting/app/forms/meeting/time_group.rb+++ b/modules/meeting/app/forms/meeting/time_group.rb@@ -35,9 +35,8 @@ class Meeting::TimeGroup < ApplicationFormname: :start_date,type: "date",value: @initial_date,- placeholder: Meeting.human_attribute_name(:start_date),- label: Meeting.human_attribute_name(:start_date),- leading_visual: { icon: :calendar },+ placeholder: @meeting.class.human_attribute_name(:start_date),+ label: @meeting.class.human_attribute_name(:start_date),required: true,autofocus: false,data: {@@ -51,20 +50,39 @@ class Meeting::TimeGroup < ApplicationFormvalue: @initial_time,placeholder: Meeting.human_attribute_name(:start_time),label: Meeting.human_attribute_name(:start_time),- leading_visual: { icon: :clock },required: true,caption: formatted_time_zone_offset,data: {action: "input->recurring-meetings--form#updateFrequencyText"})+ group.text_field(+ name: :duration,+ type: :number,+ min: 0,+ max: 24,+ step: 0.05,+ value: @duration,+ placeholder: Meeting.human_attribute_name(:duration),+ label: Meeting.human_attribute_name(:duration),+ visually_hide_label: false,+ required: true,+ caption: I18n.t("text_in_hours")+ )endenddef initialize(meeting:)super()+ @meeting = meeting@initial_time = meeting.start_time_hour.presence || format_time(meeting.start_time, include_date: false, format: "%H:%M")@initial_date = meeting.start_date.presence || format_time_as_date(meeting.start_time, format: "%Y-%m-%d")+ @duration =+ if meeting.is_a?(RecurringMeeting) && meeting.template+ meeting.template.duration+ else+ meeting.duration+ endendenddiff --git a/modules/meeting/app/forms/recurring_meeting/specific_date.rb b/modules/meeting/app/forms/recurring_meeting/specific_date.rbindex 8860012a3f7..53af8088134 100644--- a/modules/meeting/app/forms/recurring_meeting/specific_date.rb+++ b/modules/meeting/app/forms/recurring_meeting/specific_date.rb@@ -34,7 +34,6 @@ class RecurringMeeting::SpecificDate < ApplicationFormvalue: @value,placeholder: Meeting.human_attribute_name(:end_date),label: Meeting.human_attribute_name(:end_date),- leading_visual: { icon: :calendar },required: false,autofocus: false)diff --git a/modules/meeting/config/locales/en.yml b/modules/meeting/config/locales/en.ymlindex ce94b217a9f..a9184809b5d 100644--- a/modules/meeting/config/locales/en.yml+++ b/modules/meeting/config/locales/en.yml@@ -64,7 +64,8 @@ en:recurring_meeting:frequency: "Frequency"interval: "Interval"- end_after: "End after"+ start_date: "Starts on"+ end_after: "End series after"iterations: "Occurrences"errors:messages:@@ -244,8 +245,8 @@ en:working_days: "Every working day"weekly: "Weekly"end_after:- specific_date: "A specific date"- iterations: "A number of occurrences"+ specific_date: "a specific date"+ iterations: "a number of occurrences"starts: "Starts"in_words:daily_interval: "Every %{interval} days"diff --git a/modules/meeting/spec/features/recurring_meetings/recurring_meeting_create_spec.rb b/modules/meeting/spec/features/recurring_meetings/recurring_meeting_create_spec.rbindex 68c6823986e..2435b456a62 100644--- a/modules/meeting/spec/features/recurring_meetings/recurring_meeting_create_spec.rb+++ b/modules/meeting/spec/features/recurring_meetings/recurring_meeting_create_spec.rb@@ -76,7 +76,7 @@ RSpec.describe "Recurring meetings creation",meetings_page.set_title "Some title"- meetings_page.set_start_date "2024-12-31"+ meetings_page.set_starts_on "2024-12-31"meetings_page.set_start_time "13:30"meetings_page.set_duration "1.5"meetings_page.set_end_date "2025-01-15"diff --git a/modules/meeting/spec/features/recurring_meetings/recurring_meeting_crud_spec.rb b/modules/meeting/spec/features/recurring_meetings/recurring_meeting_crud_spec.rbindex 35291cc7378..25880aa37f3 100644--- a/modules/meeting/spec/features/recurring_meetings/recurring_meeting_crud_spec.rb+++ b/modules/meeting/spec/features/recurring_meetings/recurring_meeting_crud_spec.rb@@ -121,13 +121,13 @@ RSpec.describe "Recurring meetings CRUD",it "can edit the details of a recurring meeting" doshow_page.visit!- show_page.expect_subtitle text: "Weekly on Tuesday at 01:30 PM, ends on 01/14/2025"+ show_page.expect_subtitle text: "Every week on Tuesday at 01:30 PM, ends on 01/14/2025"show_page.edit_meeting_seriesshow_page.in_edit_dialog dopage.select("Daily", from: "Frequency")meetings_page.set_start_time "11:00"- page.select("A number of occurrences", from: "End after")+ page.select("a number of occurrences", from: "End series after")page.fill_in("Occurrences", with: "8")sleep 0.5diff --git a/modules/meeting/spec/support/pages/meetings/index.rb b/modules/meeting/spec/support/pages/meetings/index.rbindex 6b7a49f9c3c..85eeb113f83 100644--- a/modules/meeting/spec/support/pages/meetings/index.rb+++ b/modules/meeting/spec/support/pages/meetings/index.rb@@ -52,7 +52,11 @@ module Pages::Meetingsenddef set_start_date(date)- fill_in "Date", with: date, fill_options: { clear: :backspace }+ fill_in "Date", with: date+ end++ def set_starts_on(date)+ fill_in "Starts on", with: dateenddef set_start_time(time)