Skip to content

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

Update field instruction links for cal settings

Mir Bhatia3f0926ea1c68
diff --git a/app/controllers/admin/settings/date_format_settings_controller.rb b/app/controllers/admin/settings/date_format_settings_controller.rb
index a2b400b9956..37de469133d 100644
--- a/app/controllers/admin/settings/date_format_settings_controller.rb
+++ b/app/controllers/admin/settings/date_format_settings_controller.rb
@@ -48,7 +48,7 @@ module Admin::Settings
if start_of_week.present? ^ start_of_year.present?
flash[:error] = I18n.t(
- 'settings.display.first_date_of_week_and_year_set',
+ 'settings.date_format.first_date_of_week_and_year_set',
first_week_setting_name: I18n.t(:setting_first_week_of_year),
day_of_week_setting_name: I18n.t(:setting_start_of_week)
)
diff --git a/app/views/admin/settings/date_format_settings/show.html.erb b/app/views/admin/settings/date_format_settings/show.html.erb
index 1452e32ffa3..eeecbc91569 100644
--- a/app/views/admin/settings/date_format_settings/show.html.erb
+++ b/app/views/admin/settings/date_format_settings/show.html.erb
@@ -57,11 +57,9 @@ See COPYRIGHT and LICENSE files for more details.
<div class="form--field">
<%= setting_select :first_week_of_year, [[day_name(1),'1'], [day_name(4),'4']], blank: :label_language_based, container_class: '-wide' %>
- <span class="form--field-instructions">
- <%= t('settings.display.first_week_of_year_text') %>
- <br/>
- <%= static_link_to :display_settings_documentation, label: t('documentation.see_more_link') %>
- </span>
+ <div class="form--field-instructions">
+ <p><%= t('settings.date_format.first_week_of_year_text_html', link: OpenProject::Static::Links[:date_format_settings_documentation][:href]) %></p>
+ </div>
</div>
</section>
diff --git a/app/views/admin/settings/icalendar_settings/show.html.erb b/app/views/admin/settings/icalendar_settings/show.html.erb
index e78981480ae..156775e2393 100644
--- a/app/views/admin/settings/icalendar_settings/show.html.erb
+++ b/app/views/admin/settings/icalendar_settings/show.html.erb
@@ -38,11 +38,9 @@ See COPYRIGHT and LICENSE files for more details.
<section class="form--section">
<div class="form--field">
<%= setting_check_box :ical_enabled, size: 6 %>
- <span class="form--field-instructions">
- <%= t('settings.icalendar.enable_subscriptions_text') %>
- <br/>
- <%# <%= static_link_to :display_settings_documentation, label: t('settings.icalendar.note_text') %>
- </span>
+ <div class="form--field-instructions">
+ <p><%= t('settings.icalendar.enable_subscriptions_text_html', link: OpenProject::Static::Links[:ical_docs][:href]) %></p>
+ </div>
</div>
</section>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index de3e2c97735..d21cc8b524c 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -223,9 +223,6 @@ en:
concatenation:
single: 'or'
- documentation:
- see_more_link: For more information, please see our documentation on this topic.
-
global_search:
overwritten_tabs:
wiki_pages: "Wiki"
@@ -2702,13 +2699,14 @@ en:
Leave empty to allow any file type to be uploaded.
Multiple values allowed (one line for each value).
brute_force_prevention: "Automated user blocking"
- display:
+ date_format:
first_date_of_week_and_year_set: >
If either options "%{day_of_week_setting_name}" or "%{first_week_setting_name}" are set,
the other has to be set as well to avoid inconsistencies in the frontend.
- first_week_of_year_text: >
+ first_week_of_year_text_html: >
Select the date of January that is contained in the first week of the year.
This value together with first day of the week determines the total number of weeks in a year.
+ For more information, please see our <a href="%{link}" target="_blank">documentation</a> on this topic.
general: "General"
highlighting:
mode_long:
@@ -2718,10 +2716,9 @@ en:
type: "Entire row by Type"
priority: "Entire row by Priority"
icalendar:
- enable_subscriptions_text: >
- Allows users with the necessary permissions to subscribe to OpenProject calendars and access work package information via an external calendar client.
- note_text: >
- Note: Please read about iCalendar subscriptions to understand potential security risks before enabling this.
+ enable_subscriptions_text_html: Allows users with the necessary permissions to subscribe to OpenProject calendars and access work package information via an external calendar client.
+ # below line needs to be appended above after docs are ready
+ # <strong>Note:</strong> Please read about <a href="%{link}" target="_blank">iCalendar subscriptions</a> to understand potential security risks before enabling this.
notifications:
events_explanation: 'Governs for which event an email is sent out. Work packages are excluded from this list as the notifications for them can be configured specifically for every user.'
delay_minutes_explanation: "Email sending can be delayed to allow users with configured in app notification to confirm the notification within the application before a mail is sent out. Users who read a notification within the application will not receive an email for the already read notification."
diff --git a/lib/open_project/static/links.rb b/lib/open_project/static/links.rb
index 99d22b9f315..3ca675d303e 100644
--- a/lib/open_project/static/links.rb
+++ b/lib/open_project/static/links.rb
@@ -214,7 +214,8 @@ module OpenProject
security_badge_documentation: {
href: 'https://www.openproject.org/docs/system-admin-guide/information/#security-badge'
},
- display_settings_documentation: {
+ date_format_settings_documentation: {
+ # href needs to be changed once docs are changed to reflect new settings placemenets and grouping
href: 'https://www.openproject.org/docs/system-admin-guide/system-settings/display-settings/'
},
chargebee: {
@@ -256,6 +257,10 @@ module OpenProject
setup: {
href: 'https://www.openproject.org/docs/system-admin-guide/integrations/nextcloud/'
}
+ },
+ ical_docs: {
+ # href needs to be added in once there are docs for this
+ href: ''
}
}
end
diff --git a/spec/controllers/admin/settings/date_format_settings_controller_spec.rb b/spec/controllers/admin/settings/date_format_settings_controller_spec.rb
index f8b6856c512..a5705c6571e 100644
--- a/spec/controllers/admin/settings/date_format_settings_controller_spec.rb
+++ b/spec/controllers/admin/settings/date_format_settings_controller_spec.rb
@@ -58,7 +58,7 @@ RSpec.describe Admin::Settings::DateFormatSettingsController do
expect(response).to redirect_to action: :show
expect(flash[:error])
- .to eq(I18n.t('settings.display.first_date_of_week_and_year_set',
+ .to eq(I18n.t('settings.date_format.first_date_of_week_and_year_set',
first_week_setting_name: I18n.t(:setting_first_week_of_year),
day_of_week_setting_name: I18n.t(:setting_start_of_week)))
end