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
Change protocol mismatch warning bar to print correct warning
Oliver Günther4da409926143
diff --git a/app/helpers/static_links_helper.rb b/app/helpers/static_links_helper.rbindex 11482480a82..e0c7bac89df 100644--- a/app/helpers/static_links_helper.rb+++ b/app/helpers/static_links_helper.rb@@ -32,9 +32,18 @@ module StaticLinksHelperdef static_link_to(key, label: nil)item = OpenProject::Static::Links.links.fetch key- link_to label || t(item[:label]),+ link_to label || t(item[:label], default: item[:label]),item[:href],class: 'openproject--static-link',target: '_blank', rel: 'noopener'end++ ##+ # Link to the correct installation guides for the current selected method+ def installation_guide_link+ val = OpenProject::Configuration.installation_type+ link = OpenProject::Static::Links.links[:"#{val}_installation"] || OpenProject::Static::Links.links[:installation_guides]++ link[:href]+ endenddiff --git a/app/views/warning_bar/_host_and_protocol_mismatch.html.erb b/app/views/warning_bar/_host_and_protocol_mismatch.html.erbindex 6566ba8e41d..541db1400d2 100644--- a/app/views/warning_bar/_host_and_protocol_mismatch.html.erb+++ b/app/views/warning_bar/_host_and_protocol_mismatch.html.erb@@ -3,12 +3,13 @@<% if setting_protocol_mismatched? %><p>- <strong><%= t 'warning_bar.protocol_mismatch.title' %></strong>+ <strong><%= t 'warning_bar.https_mismatch.title' %></strong><br/>- <%= t 'warning_bar.protocol_mismatch.text_html',+ <%= t 'warning_bar.https_mismatch.text_html',set_protocol: Setting.protocol,actual_protocol: request.ssl? ? 'https' : 'http',- setting_path: admin_settings_general_path+ setting_value: request.ssl? ? 'OPENPROJECT_HTTPS=true' : 'OPENPROJECT_HTTPS=false',+ more_info_path: installation_guide_link%></p><% end %>diff --git a/config/configuration.yml.example b/config/configuration.yml.exampleindex bb71520cd8c..34bc1a3800f 100644--- a/config/configuration.yml.example+++ b/config/configuration.yml.example@@ -208,9 +208,6 @@ default:## rails_relative_url_root: ""- # whether to force ssl in production- rails_force_ssl: false-# Absolute path to the directory where attachments are stored.# The default is the 'files' directory in your OpenProject instance.# Your OpenProject instance needs to have write permission on thisdiff --git a/config/locales/en.yml b/config/locales/en.ymlindex c65bf00e0ed..25d71e374f0 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -1685,6 +1685,7 @@ en:label_index_by_title: "Index by title"label_information: "Information"label_information_plural: "Information"+ label_installation_guides: 'Installation guides'label_integer: "Integer"label_internal: "Internal"label_introduction_video: "Introduction video"@@ -3053,12 +3054,13 @@ en:warning_protocol_mismatch_html: >warning_bar:- protocol_mismatch:- title: 'Protocol setting mismatch'+ https_mismatch:+ title: 'HTTPS mode setup mismatch'text_html: >- Your application is running with its protocol setting set to <code>%{set_protocol}</code>, but the request+ Your application is running with HTTPS mode set to <code>%{set_protocol}</code>, but the requestis an <code>%{actual_protocol}</code> request.- This will result in errors! Go to <a href="%{setting_path}">System settings</a> and change the "Protocol" setting to correct this.+ This will result in errors! You will need to set the following configuration value: <code>%{setting_value}</code>.+ Please see <a href="%{more_info_path}">the installation documentation</a> on how to set this configuration.hostname_mismatch:title: 'Hostname setting mismatch'text_html: >diff --git a/lib/open_project/static/links.rb b/lib/open_project/static/links.rbindex 14d49da5f38..d2d9cc99d0b 100644--- a/lib/open_project/static/links.rb+++ b/lib/open_project/static/links.rb@@ -98,6 +98,22 @@ module OpenProjecthref: 'https://www.openproject.org/docs/user-guide/',label: 'homescreen.links.user_guides'},+ installation_guides: {+ href: 'https://www.openproject.org/docs/installation-and-operations/installation/',+ label: :label_installation_guides+ },+ packager_installation: {+ href: 'https://www.openproject.org/docs/installation-and-operations/installation/packaged/',+ label: 'Packaged installation'+ },+ docker_installation: {+ href: 'https://www.openproject.org/docs/installation-and-operations/installation/docker/',+ label: 'Docker installation'+ },+ manual_installation: {+ href: 'https://www.openproject.org/docs/installation-and-operations/installation/manual/',+ label: 'Manual installation'+ },upgrade_guides: {href: 'https://www.openproject.org/docs/installation-and-operations/operation/upgrading/',label: :label_upgrade_guides