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
[#43153] Fix storage admin breadcrumbs
Andreas Pfohl36e764a5d9c3
diff --git a/config/locales/en.yml b/config/locales/en.ymlindex 8cf3251c0b3..93ed016ec32 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -2460,6 +2460,7 @@ en:update_timeout: "Keep the last required disk space information for a repository for N minutes.\nAs counting the required disk space of a repository may be costly, increase this value to reduce performance impact."oauth_application_details: "The client secret value will not be accessible again after you close this window. Please copy these values into the Nextcloud OpenProject Integration settings:"oauth_application_details_link_text: "Go to settings page"+ show_warning_details: "To use this file storage remember to activate the module and the specific storage in the project settings of each desired project."subversion:existing_title: "Existing Subversion repository"existing_introduction: "If you have an existing Subversion repository, you can link it with OpenProject to access it from within the application."diff --git a/modules/storages/app/controllers/storages/admin/oauth_clients_controller.rb b/modules/storages/app/controllers/storages/admin/oauth_clients_controller.rbindex d200392997e..5970ae9000f 100644--- a/modules/storages/app/controllers/storages/admin/oauth_clients_controller.rb+++ b/modules/storages/app/controllers/storages/admin/oauth_clients_controller.rb@@ -74,7 +74,7 @@ class Storages::Admin::OAuthClientsController < ApplicationController# Breadcrumbs is something like OpenProject > Admin > Storages.# This returns the name of the last part (Storages admin page)def default_breadcrumb- ActionController::Base.helpers.link_to(t('storages.label_oauth_client_details'), admin_settings_storage_oauth_client_path)+ ActionController::Base.helpers.link_to(t(:project_module_storages), admin_settings_storages_path)end# See: default_breadcrumb abovediff --git a/modules/storages/app/controllers/storages/admin/storages_controller.rb b/modules/storages/app/controllers/storages/admin/storages_controller.rbindex e47321ee491..58427dd1baa 100644--- a/modules/storages/app/controllers/storages/admin/storages_controller.rb+++ b/modules/storages/app/controllers/storages/admin/storages_controller.rb@@ -152,7 +152,7 @@ class Storages::Admin::StoragesController < ApplicationController# Breadcrumbs is something like OpenProject > Admin > Storages.# This returns the name of the last part (Storages admin page)def default_breadcrumb- if action_name == :index+ if action_name == 'index't(:project_module_storages)elseActionController::Base.helpers.link_to(t(:project_module_storages), admin_settings_storages_path)diff --git a/modules/storages/app/services/storages/oauth_applications/create_service.rb b/modules/storages/app/services/storages/oauth_applications/create_service.rbindex 0314e3fd0b9..9bbc6afe5f4 100644--- a/modules/storages/app/services/storages/oauth_applications/create_service.rb+++ b/modules/storages/app/services/storages/oauth_applications/create_service.rb@@ -46,7 +46,7 @@ module Storages::OAuthApplications::OAuth::PersistApplicationService.new(::Doorkeeper::Application.new, user:).call({- name: "#{storage.name} (#{I18n.t("storages.provider_types.#{storage.provider_type}")})",+ name: "#{storage.name} (#{I18n.t("storages.provider_types.#{storage.provider_type}.name")})",redirect_uri: File.join(storage.host, "apps/integration_openproject/oauth-redirect"),scopes: 'api_v3',confidential: true,diff --git a/modules/storages/app/views/storages/admin/storages/new_oauth_client.html.erb b/modules/storages/app/views/storages/admin/storages/new_oauth_client.html.erbindex b6fc6d8a046..37ce9928d78 100644--- a/modules/storages/app/views/storages/admin/storages/new_oauth_client.html.erb+++ b/modules/storages/app/views/storages/admin/storages/new_oauth_client.html.erb@@ -1,6 +1,9 @@<!-- Standard Ruby view, please see the controller for comments --><% html_title t(:label_administration), t("project_module_storages"), @storage.name, "#{t("storages.provider_types.#{@storage.provider_type}.name")} #{t("storages.label_oauth_client_details")}" %>-<% local_assigns[:additional_breadcrumb] = "#{t("storages.provider_types.#{@storage.provider_type}.name")} #{t("storages.label_oauth_client_details")}" %>+<% local_assigns[:additional_breadcrumb] = [+ link_to(@storage.name, admin_settings_storage_path(@storage)),+ t("storages.label_oauth_breadcrumb.#{@storage.provider_type}")+] %><%= toolbar title: "#{t("storages.provider_types.#{@storage.provider_type}.name")} #{t("storages.label_oauth_client_details")}" %><%= labelled_tabular_form_for @oauth_client, url: admin_settings_storage_oauth_client_path do |f| -%>@@ -27,7 +30,7 @@<%= "#{t("storages.instructions.copy_from")}: " %><%= link_to "#{t("storages.instructions.#{@storage.provider_type}.integration")}",URI::join(@storage.host, "settings/admin/openproject").to_s,- target: "blank"%>+ target: "blank" %></span></div><% if @storage.oauth_client %>diff --git a/modules/storages/app/views/storages/admin/storages/show.html.erb b/modules/storages/app/views/storages/admin/storages/show.html.erbindex ae312f614d4..f1e15c439d0 100644--- a/modules/storages/app/views/storages/admin/storages/show.html.erb+++ b/modules/storages/app/views/storages/admin/storages/show.html.erb@@ -30,7 +30,7 @@ See COPYRIGHT and LICENSE files for more details.<% html_title t(:label_administration), t('project_module_storages'), t(@object.name) -%><% local_assigns[:additional_breadcrumb] = @object.name %>-<%= toolbar title: "#{t('project_module_storages')} - #{@object.name}",+<%= toolbar title: @object.name,title_class: 'no-padding-bottom' do %><li class="toolbar-item"><%= link_to edit_admin_settings_storage_path(@object),@@ -50,6 +50,14 @@ See COPYRIGHT and LICENSE files for more details.</li><% end %>+<div class="op-toast -warning -with-bottom-spacing">+ <div class="op-toast--content">+ <p>+ <%= t('repositories.storage.show_warning_details') %>+ </p>+ </div>+</div>+<div class="attributes-group"><div class="attributes-group--header"><div class="attributes-group--header-container">@@ -66,7 +74,7 @@ See COPYRIGHT and LICENSE files for more details.<div class="attributes-key-value--key"><%= t(:'storages.label_provider_type') %></div><div class="attributes-key-value--value-container"><div class="attributes-key-value--value -text">- <span><%= t(:"storages.provider_types.#{@object.provider_type}") %></span>+ <span><%= t(:"storages.provider_types.#{@object.provider_type}.name") %></span></div></div>diff --git a/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb b/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erbindex 19bdf44a9e1..4d9b6227155 100644--- a/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb+++ b/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb@@ -1,7 +1,10 @@<!-- Standard Ruby view, please see the controller for comments --><% html_title t(:label_administration), t("project_module_storages"), @object.name, "#{t("storages.provider_types.#{@object.provider_type}.name")} #{t("storages.label_oauth_application_details")}" %>-<% local_assigns[:additional_breadcrumb] = "#{t("storages.provider_types.#{@object.provider_type}.name")} #{t("storages.label_oauth_application_details")}" %>-<%= toolbar title: "#{t("storages.provider_types.#{@object.provider_type}.name")} #{t("storages.label_oauth_application_details")}" %>+<% local_assigns[:additional_breadcrumb] = [+ link_to(@object.name, admin_settings_storage_path(@object)),+ t("storages.label_oauth_breadcrumb.openproject")+] %>+<%= toolbar title: "OpenProject #{t("storages.label_oauth_application_details")}" %><div class="op-toast -warning -with-bottom-spacing"><div class="op-toast--content">diff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.ymlindex fe78a9b9152..1b334f45c2d 100644--- a/modules/storages/config/locales/en.yml+++ b/modules/storages/config/locales/en.yml@@ -73,6 +73,9 @@ en:label_file_links: "File links"label_name: "Name"label_host: "Host"+ label_oauth_breadcrumb:+ openproject: "OpenProject OAuth"+ nextcloud: "Nextcloud OAuth"label_oauth_application_details: "OAuth application details"label_oauth_client_details: "OAuth client details"label_provider_type: "Provider type"