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
Add missing breadcrumbs and remove unnecessary ones
Henriette Dinger3ebe7f4d52de
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rbindex 946b062e0f0..639e1251b81 100644--- a/app/controllers/application_controller.rb+++ b/app/controllers/application_controller.rb@@ -588,8 +588,8 @@ class ApplicationController < ActionController::Basehelper_method :show_local_breadcrumbdef admin_first_level_menu_entry- current_menu_item = self.admin_menu_item(self.current_menu_item)- current_menu_item.parent+ menu_item = admin_menu_item(current_menu_item)+ menu_item.parentendhelper_method :admin_first_level_menu_entrydiff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rbindex 5d8d3d7eb5a..3e91fc6074b 100644--- a/app/controllers/settings_controller.rb+++ b/app/controllers/settings_controller.rb@@ -85,7 +85,12 @@ class SettingsController < ApplicationControllerenddef default_breadcrumb- l(:label_system_settings)+ if params[:action] == "plugin"+ plugin = Redmine::Plugin.find(params[:id])+ plugin.name+ else+ l(:label_system_settings)+ endenddef show_local_breadcrumbdiff --git a/app/views/attribute_help_texts/edit.html.erb b/app/views/attribute_help_texts/edit.html.erbindex e7bfc365ff7..449991cf5f6 100644--- a/app/views/attribute_help_texts/edit.html.erb+++ b/app/views/attribute_help_texts/edit.html.erb@@ -28,9 +28,7 @@ See docs/COPYRIGHT.rdoc for more details.++#%><% html_title t(:label_administration), l(:'attribute_help_texts.edit', attribute_caption: @attribute_help_text.attribute_caption) %>-<% local_assigns[:additional_breadcrumb] = link_to(@attribute_help_text.type_caption,- attribute_help_texts_path(tab: @attribute_help_text.attribute_scope)),- t(:'attribute_help_texts.edit', attribute_caption: @attribute_help_text.attribute_caption) %>+<% local_assigns[:additional_breadcrumb] = t(:'attribute_help_texts.edit', attribute_caption: @attribute_help_text.attribute_caption) %><%= breadcrumb_toolbar t(:'attribute_help_texts.edit', attribute_caption: @attribute_help_text.attribute_caption)%>diff --git a/app/views/attribute_help_texts/new.html.erb b/app/views/attribute_help_texts/new.html.erbindex 448a9ba7459..b84c126828f 100644--- a/app/views/attribute_help_texts/new.html.erb+++ b/app/views/attribute_help_texts/new.html.erb@@ -28,9 +28,7 @@ See docs/COPYRIGHT.rdoc for more details.++#%><% html_title t(:label_administration), t(:'attribute_help_texts.add_new') %>-<% local_assigns[:additional_breadcrumb] = link_to(@attribute_help_text.type_caption,- attribute_help_texts_path(tab: @attribute_help_text.attribute_scope)),- t(:'attribute_help_texts.add_new') %>+<% local_assigns[:additional_breadcrumb] = t(:'attribute_help_texts.add_new') %><%= breadcrumb_toolbar t(:'attribute_help_texts.add_new')%>diff --git a/app/views/oauth/applications/edit.html.erb b/app/views/oauth/applications/edit.html.erbindex 074cac3e76b..96dca0ab8c9 100644--- a/app/views/oauth/applications/edit.html.erb+++ b/app/views/oauth/applications/edit.html.erb@@ -29,6 +29,7 @@ See docs/COPYRIGHT.rdoc for more details.<% edit_label = "#{l(:label_edit)} #{@application.class.model_name.human} #{h(@application.name)}" %><% html_title(l(:label_administration), edit_label) -%>+<% local_assigns[:additional_breadcrumb] = h(@application.name) %><%= breadcrumb_toolbar(edit_label) %><%= labelled_tabular_form_for @application,diff --git a/app/views/oauth/applications/new.html.erb b/app/views/oauth/applications/new.html.erbindex f262cabeeaf..a706d85b107 100644--- a/app/views/oauth/applications/new.html.erb+++ b/app/views/oauth/applications/new.html.erb@@ -28,6 +28,7 @@ See docs/COPYRIGHT.rdoc for more details.++#%><% html_title l(:label_administration), t('oauth.application.new') %>+<% local_assigns[:additional_breadcrumb] = t('oauth.application.new') %><%= breadcrumb_toolbar(t('oauth.application.new')) %><%= labelled_tabular_form_for @application,diff --git a/app/views/oauth/applications/show.html.erb b/app/views/oauth/applications/show.html.erbindex 8beb1c75d48..08e4a2b72a6 100644--- a/app/views/oauth/applications/show.html.erb+++ b/app/views/oauth/applications/show.html.erb@@ -27,6 +27,7 @@ See docs/COPYRIGHT.rdoc for more details.++#%><% html_title t(:label_administration), t('oauth.application.singular'), h(@application.name) -%>+<% local_assigns[:additional_breadcrumb] = h(@application.name) %><%= toolbar title: "#{t('oauth.application.singular')} - #{h(@application.name)}",title_class: 'no-padding-bottom' do %>diff --git a/modules/avatars/app/views/settings/_openproject_avatars.html.erb b/modules/avatars/app/views/settings/_openproject_avatars.html.erbindex d400279c59f..45a1127339e 100644--- a/modules/avatars/app/views/settings/_openproject_avatars.html.erb+++ b/modules/avatars/app/views/settings/_openproject_avatars.html.erb@@ -1,5 +1,5 @@<% manager = ::OpenProject::Avatars::AvatarManager %>-<% html_title l(:label_administration), l(:label_plugins), 'Openproject Avatars' %>+<% html_title l(:label_administration), 'Openproject Avatars' %><fieldset class="form--fieldset"><legend class="form--fieldset-legend" title="<%= t 'avatars.label_gravatar' %>"><%= t 'avatars.label_gravatar' %></legend>diff --git a/modules/backlogs/app/views/shared/_settings.html.erb b/modules/backlogs/app/views/shared/_settings.html.erbindex 29d6bb5c878..30cfdf0a4c6 100644--- a/modules/backlogs/app/views/shared/_settings.html.erb+++ b/modules/backlogs/app/views/shared/_settings.html.erb@@ -59,7 +59,7 @@ See docs/COPYRIGHT.rdoc for more details.});</script><% end %>-<% html_title l(:label_administration), l(:label_plugins), l(:label_backlogs) %>+<% html_title l(:label_administration), l(:label_backlogs) %><div class="form--field"><%= styled_label_tag("settings[story_types]", l(:backlogs_story_type)) %>diff --git a/modules/costs/app/views/settings/_openproject_costs.html.erb b/modules/costs/app/views/settings/_openproject_costs.html.erbindex f20006c7712..74863026acb 100644--- a/modules/costs/app/views/settings/_openproject_costs.html.erb+++ b/modules/costs/app/views/settings/_openproject_costs.html.erb@@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.See docs/COPYRIGHT.rdoc for more details.++#%>-<% html_title l(:label_administration), l(:label_plugins), 'Openproject Costs' %>+<% html_title l(:label_administration), 'Openproject Costs' %><div class="form--field"><%= styled_label_tag :label_currency, t(:label_currency) %><div class="form--field-container">diff --git a/modules/ldap_groups/app/controllers/ldap_groups/synchronized_groups_controller.rb b/modules/ldap_groups/app/controllers/ldap_groups/synchronized_groups_controller.rbindex ff134c26f62..398de5791f2 100644--- a/modules/ldap_groups/app/controllers/ldap_groups/synchronized_groups_controller.rb+++ b/modules/ldap_groups/app/controllers/ldap_groups/synchronized_groups_controller.rb@@ -77,7 +77,15 @@ module LdapGroupsenddef default_breadcrumb- t('ldap_groups.synchronized_groups.plural')+ if action_name == 'index'+ t('ldap_groups.synchronized_groups.plural')+ else+ ActionController::Base.helpers.link_to(t('ldap_groups.synchronized_groups.plural'), ldap_groups_synchronized_groups_path)+ end+ end++ def show_local_breadcrumb+ trueendendenddiff --git a/modules/ldap_groups/app/views/ldap_groups/synchronized_groups/new.html.erb b/modules/ldap_groups/app/views/ldap_groups/synchronized_groups/new.html.erbindex a9d4733cc55..b83c9d67bd6 100644--- a/modules/ldap_groups/app/views/ldap_groups/synchronized_groups/new.html.erb+++ b/modules/ldap_groups/app/views/ldap_groups/synchronized_groups/new.html.erb@@ -1,3 +1,4 @@+<% local_assigns[:additional_breadcrumb] = t('ldap_groups.synchronized_groups.add_new') %><% html_title(t(:label_administration), t('ldap_groups.synchronized_groups.add_new')) -%><%= error_messages_for @group %>diff --git a/modules/openid_connect/app/controllers/openid_connect/providers_controller.rb b/modules/openid_connect/app/controllers/openid_connect/providers_controller.rbindex fbd93b08442..9fadc287768 100644--- a/modules/openid_connect/app/controllers/openid_connect/providers_controller.rb+++ b/modules/openid_connect/app/controllers/openid_connect/providers_controller.rb@@ -85,5 +85,15 @@ module OpenIDConnectProvider::ALLOWED_TYPES.dup - providers.map(&:name)endhelper_method :openid_connect_providers_available_for_configure++ def default_breadcrumb+ if action_name != 'index'+ ActionController::Base.helpers.link_to(t('openid_connect.providers.plural'), openid_connect_providers_path)+ end+ end++ def show_local_breadcrumb+ true+ endendenddiff --git a/modules/openid_connect/app/views/openid_connect/providers/edit.html.erb b/modules/openid_connect/app/views/openid_connect/providers/edit.html.erbindex 4d327ab0d8d..02bbbf6dc27 100644--- a/modules/openid_connect/app/views/openid_connect/providers/edit.html.erb+++ b/modules/openid_connect/app/views/openid_connect/providers/edit.html.erb@@ -1,9 +1,7 @@<% page_title = t('openid_connect.providers.label_edit', name: @provider.name) %>+<% local_assigns[:additional_breadcrumb] = @provider.name %>+<% html_title(t(:label_administration), page_title) -%>-<% local_assigns[:additional_breadcrumb] = [- link_to(t('openid_connect.providers.plural'), url_for(action: :index)),- page_title-] %><%= toolbar title: page_title %>diff --git a/modules/openid_connect/app/views/openid_connect/providers/new.html.erb b/modules/openid_connect/app/views/openid_connect/providers/new.html.erbindex a89346da6a2..ca9a4a29c57 100644--- a/modules/openid_connect/app/views/openid_connect/providers/new.html.erb+++ b/modules/openid_connect/app/views/openid_connect/providers/new.html.erb@@ -1,9 +1,5 @@<% html_title(t(:label_administration), t('openid_connect.providers.label_add_new')) -%>-<% local_assigns[:additional_breadcrumb] = [- link_to(t('openid_connect.providers.plural'), openid_connect_providers_path),- t('openid_connect.providers.label_add_new')- ]-%>+<% local_assigns[:additional_breadcrumb] = t('openid_connect.providers.label_add_new') %><%= toolbar title: t('openid_connect.providers.label_add_new') %>diff --git a/modules/recaptcha/app/controllers/recaptcha/admin_controller.rb b/modules/recaptcha/app/controllers/recaptcha/admin_controller.rbindex 302a5b201fe..10d927e525b 100644--- a/modules/recaptcha/app/controllers/recaptcha/admin_controller.rb+++ b/modules/recaptcha/app/controllers/recaptcha/admin_controller.rb@@ -34,5 +34,13 @@ module ::Recaptchadef permitted_paramsparams.permit(:recaptcha_type, :website_key, :secret_key)end++ def default_breadcrumb+ t('recaptcha.label_recaptcha')+ end++ def show_local_breadcrumb+ true+ endendenddiff --git a/modules/two_factor_authentication/app/controllers/two_factor_authentication/two_factor_settings_controller.rb b/modules/two_factor_authentication/app/controllers/two_factor_authentication/two_factor_settings_controller.rbindex 251502974c4..32c7ae82465 100644--- a/modules/two_factor_authentication/app/controllers/two_factor_authentication/two_factor_settings_controller.rb+++ b/modules/two_factor_authentication/app/controllers/two_factor_authentication/two_factor_settings_controller.rb@@ -58,5 +58,13 @@ module ::TwoFactorAuthenticationdef manager::OpenProject::TwoFactorAuthentication::TokenStrategyManagerend++ def default_breadcrumb+ t('two_factor_authentication.settings.title')+ end++ def show_local_breadcrumb+ true+ endendenddiff --git a/spec/views/layouts/admin.html.erb_spec.rb b/spec/views/layouts/admin.html.erb_spec.rbindex 86879bf15a7..4fef9b436d2 100644--- a/spec/views/layouts/admin.html.erb_spec.rb+++ b/spec/views/layouts/admin.html.erb_spec.rb@@ -39,6 +39,10 @@ describe 'layouts/admin', type: :view doallow(view).to receive(:default_breadcrumb)allow(controller).to receive(:default_search_scope)+ parent_menu_item = Object.new+ allow(view).to receive(:admin_first_level_menu_entry).and_return parent_menu_item+ allow(parent_menu_item).to receive(:name).and_return :root+allow(User).to receive(:current).and_return adminallow(view).to receive(:current_user).and_return adminallow(view)