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
Update strings and tweak layout
Mir Bhatiac83e4705bb17
diff --git a/modules/meeting/app/components/meetings/email_updates_banner_component.rb b/modules/meeting/app/components/meetings/email_updates_banner_component.rbindex cd73f78ae4b..dbc8e91a1f9 100644--- a/modules/meeting/app/components/meetings/email_updates_banner_component.rb+++ b/modules/meeting/app/components/meetings/email_updates_banner_component.rb@@ -37,23 +37,41 @@ module Meetingsenddef call- render(Primer::Alpha::Banner.new(description:, scheme:))+ render(Primer::Alpha::Banner.new(description:, scheme:, icon:))endprivate- def description- return I18n.t("text_email_updates_enabled") if @override == :enabled- return I18n.t("text_email_updates_muted") if @override == :muted+ def type+ if @meeting.is_a?(RecurringMeeting) || (@meeting.recurring? && @meeting.templated?)+ "template"+ elsif @meeting.recurring?+ "occurrence"+ else+ "onetime"+ end+ end++ def status+ if @override.present?+ @override.to_s+ elsif @meeting.notify?+ "enabled"+ else+ "disabled"+ end+ end- @meeting.notify? ? I18n.t("text_email_updates_enabled") : I18n.t("text_email_updates_muted")+ def description+ I18n.t("meeting.notifications.banner.#{type}.#{status}")enddef scheme- return :default if @override == :enabled- return :warning if @override == :muted+ status == "enabled" ? :default : :warning+ end- @meeting.notify? ? :default : :warning+ def icon+ status == "enabled" ? :info : nilendendenddiff --git a/modules/meeting/app/components/meetings/index/form_component.html.erb b/modules/meeting/app/components/meetings/index/form_component.html.erbindex e69fe474ef0..cb171af2958 100644--- a/modules/meeting/app/components/meetings/index/form_component.html.erb+++ b/modules/meeting/app/components/meetings/index/form_component.html.erb@@ -29,12 +29,6 @@endend- if @meeting.is_a?(RecurringMeeting) && @meeting.persisted?- modal_body.with_row(mb: 3) do- render(Meetings::EmailUpdatesBannerComponent.new(@meeting))- end- end-if @project.nil?modal_body.with_row(mb: 3) dorender(Meeting::ProjectAutocompleter.new(f))@@ -141,6 +135,12 @@endend+ if @meeting.is_a?(RecurringMeeting) && @meeting.persisted?+ modal_body.with_row(mt: 3) do+ render(Meetings::EmailUpdatesBannerComponent.new(@meeting))+ end+ end+if (@meeting.is_a?(RecurringMeeting) && [email protected]?) || @meeting.is_a?(Meeting)modal_body.with_row(mt: 3) dorender(Meeting::SendEmailUpdates.new(f, meeting: @meeting, copy_from: @copy_from))@@ -168,7 +168,7 @@visibility_class: "d-none"}) do- render(Meetings::EmailUpdatesBannerComponent.new(@meeting, override: :muted))+ render(Meetings::EmailUpdatesBannerComponent.new(@meeting, override: :disabled))endendenddiff --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 9fb0a101449..694486de80b 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@@ -16,15 +16,15 @@endmodal_body.with_row(mb: 3) do- render(Meetings::EmailUpdatesBannerComponent.new(@meeting))+ render(Meeting::TimeGroup.new(f, meeting: @meeting))endmodal_body.with_row(mb: 3) do- render(Meeting::TimeGroup.new(f, meeting: @meeting))+ render(Meeting::Location.new(f, meeting: @meeting))endmodal_body.with_row do- render(Meeting::Location.new(f, meeting: @meeting))+ render(Meetings::EmailUpdatesBannerComponent.new(@meeting))endmodal_body.with_row dodiff --git a/modules/meeting/app/components/meetings/side_panel/toggle_notifications_dialog_component.html.erb b/modules/meeting/app/components/meetings/side_panel/toggle_notifications_dialog_component.html.erbindex 08aaf591c3c..7e504d71997 100644--- a/modules/meeting/app/components/meetings/side_panel/toggle_notifications_dialog_component.html.erb+++ b/modules/meeting/app/components/meetings/side_panel/toggle_notifications_dialog_component.html.erb@@ -40,7 +40,7 @@ See COPYRIGHT and LICENSE files for more details.)) do |dialog|dialog.with_confirmation_message do |message|- message.with_heading(tag: :h2) { heading }+ message.with_heading(tag: :h2) { title }message.with_description_content(confirmation_message)endenddiff --git a/modules/meeting/app/components/meetings/side_panel/toggle_notifications_dialog_component.rb b/modules/meeting/app/components/meetings/side_panel/toggle_notifications_dialog_component.rbindex beb150a25f4..7e72eb5b042 100644--- a/modules/meeting/app/components/meetings/side_panel/toggle_notifications_dialog_component.rb+++ b/modules/meeting/app/components/meetings/side_panel/toggle_notifications_dialog_component.rb@@ -46,15 +46,7 @@ module Meetingsdef titleif @meeting.notify?- I18n.t("meeting.notifications.dialog.title.mute")- else- I18n.t("meeting.notifications.dialog.title.enable")- end- end-- def heading- if @meeting.notify?- I18n.t("meeting.notifications.dialog.title.mute")+ I18n.t("meeting.notifications.dialog.title.disable")elseI18n.t("meeting.notifications.dialog.title.enable")end@@ -62,7 +54,7 @@ module Meetingsdef confirmation_messageif @meeting.notify?- I18n.t("meeting.notifications.dialog.message.mute")+ I18n.t("meeting.notifications.dialog.message.disable")elseI18n.t("meeting.notifications.dialog.message.enable")end@@ -70,7 +62,7 @@ module Meetingsdef confirm_button_textif @meeting.notify?- I18n.t("meeting.notifications.dialog.confirm_label.mute")+ I18n.t("meeting.notifications.dialog.confirm_label.disable")elseI18n.t("meeting.notifications.dialog.confirm_label.enable")enddiff --git a/modules/meeting/config/locales/en.yml b/modules/meeting/config/locales/en.ymlindex 9aa2f4c08dd..cf47223a922 100644--- a/modules/meeting/config/locales/en.yml+++ b/modules/meeting/config/locales/en.yml@@ -297,17 +297,37 @@ en:dialog:title:enable: "Enable email calendar updates?"- mute: "Mute email calendar updates?"+ disable: "Disable email calendar updates?"message:enable: >- All participants will receive updated calendar invites via email informing them of changes to the meeting.- One will be sent immediately now.- mute: >- Participants will no longer receive updated calendar invites via email with changes to the meeting.+ All participants will receive updated calendar invites via email every time there is a change to the meeting date, time, location or participants.+ disable: >+ Participants will no longer receive updated calendar invites via email when there are changes to the meeting date, time, location or participants.If they already had an invite for this meeting, it might no longer be accurate.confirm_label:enable: "Enable email updates"- mute: "Mute email updates"+ disable: "Disable email updates"+ banner:+ onetime:+ enabled: >+ All participants will receive updated calendar invites via email informing them of your changes.+ disabled: >+ Email calendar updates are disabled. Participants will not receive an email informing them of your changes.+ occurrence:+ enabled: >+ Email calendar updates are enabled for the meeting series.+ All participants will receive updated calendar invites informing them of your changes to this occurrence.+ disabled: >+ Email calendar updates are disabled for the meeting series.+ Participants will not receive an email informing them of your changes to this occurrence.+ template:+ enabled: >+ Email calendar updates are enabled for the meeting series.+ All participants will receive updated calendar invites informing them of your changes to this template or to individual occurrences.+ disabled: >+ Email calendar updates are disabled for the meeting series.+ Participants will not receive an email informing them of your changes to this template or to individual occurrences.+meeting_section:untitled_title: "Untitled section"