From ee8452282ac8d23c3e1ac9340fe2be2ce790dd7a Mon Sep 17 00:00:00 2001 From: Henriette Darge Date: Wed, 23 Apr 2025 10:40:43 +0200 Subject: [PATCH] [63485] Remove `show_local_breadcrumb` and `default_breadcrumb` (#18663) * add a new helper for breadcrumb in wiki page * set page header in destroy page * set page header in edit page * set page header in history and rename and edit parent pages * change toolbar items into page header items * add new wiki action to sub header * remove version edit page which is not in use any more * add export as a menu item of the header * fix rubocup errors * fix failing tests * replace page header in annotate page * replace page header in diff page * add page header in select menu page * fix rubocup errors * fix errors on rename test * fix errors on selecting items from toolbar * fix errors on tests for child pages * set correct permission for configure menu item * replace page header in summary page * replace page header in summary details page * edit docs of sub header * add page header in wiki new page * remove controller and a route for edit method * undo changes for docs of sub header * extract header in show page into a new component * use helper method in header component * add wiki module to the breadcrumb * rename page header component for wiki page * simplify how lock and lock implemented * extract sub header * remove wiki title from header of history page * fix page header in new page * use page.find_test_selector in test * fix failing test for summary page * fix failing test for wiki child pages * change the summary test * use test selector for page header title * undo changes for activate user in admin * use test selector in adding editing history test * use test selector in attachment upload test * use test selector in child pages tests * use test selector in wiki menu items tests * change test selector for breadcrumbs * extract conditions to show edit button into a method * extract conditions to show rollback action menu item into a method * extract conditions to show create button into a method * fix duplicated code in test * Remove outdated `show_local_breadcrumb` method which is replaced by the Primer::PageHeader breadcrumb * Remove `default_breadcrumb` method as it serves no prupose any more * Remove the old breadcrumb and its hook completely * remove breadcrumbs path from rename * fix translations errors in storages * undo changes on translations * remove default breadcrumbs in time tracking controller --------- Co-authored-by: Behrokh Satarnejad Co-authored-by: Behrokh Satarnejad <62008897+bsatarnejad@users.noreply.github.com> --- .../quarantined_attachments_controller.rb | 6 --- app/controllers/admin/backups_controller.rb | 6 --- .../custom_field_projects_controller.rb | 6 --- .../attachments_settings_controller.rb | 6 --- .../settings/enumerations_controller_base.rb | 2 - .../new_project_settings_controller.rb | 4 -- .../project_custom_fields_controller.rb | 4 -- .../settings/users_settings_controller.rb | 4 -- .../virus_scanning_settings_controller.rb | 4 -- app/controllers/admin/settings_controller.rb | 12 ------ app/controllers/admin_controller.rb | 6 --- app/controllers/announcements_controller.rb | 4 -- app/controllers/application_controller.rb | 15 ------- .../attribute_help_texts_controller.rb | 6 --- app/controllers/colors_controller.rb | 6 --- app/controllers/custom_actions_controller.rb | 6 --- app/controllers/custom_fields_controller.rb | 6 --- app/controllers/enterprises_controller.rb | 6 --- app/controllers/groups_controller.rb | 4 -- app/controllers/homescreen_controller.rb | 6 --- .../ldap_auth_sources_controller.rb | 4 -- app/controllers/my_controller.rb | 8 ---- app/controllers/notifications_controller.rb | 2 - .../oauth/applications_controller.rb | 8 ---- app/controllers/omni_auth_login_controller.rb | 2 - .../placeholder_users_controller.rb | 4 -- app/controllers/roles_controller.rb | 4 -- app/controllers/statuses_controller.rb | 4 -- app/controllers/types_controller.rb | 4 -- app/controllers/users_controller.rb | 4 -- app/controllers/wiki_controller.rb | 8 ---- .../work_packages/bulk_controller.rb | 4 -- .../work_packages/dialogs_controller.rb | 2 - .../work_packages/moves_controller.rb | 4 -- .../work_packages/reports_controller.rb | 6 --- app/controllers/workflows_controller.rb | 4 -- app/helpers/breadcrumb_helper.rb | 43 ------------------- app/views/account/consent.html.erb | 1 - app/views/account/exit.html.erb | 1 - app/views/account/login.html.erb | 1 - app/views/colors/edit.html.erb | 1 - app/views/layouts/admin.html.erb | 15 ------- app/views/layouts/base.html.erb | 9 ---- app/views/oauth/applications/show.html.erb | 1 - app/views/users/change_status_info.html.erb | 1 - app/views/wiki/rename.html.erb | 2 +- .../global_styles/layout/_base_mobile.sass | 1 - .../src/global_styles/layout/_breadcrumb.sass | 35 --------------- frontend/src/global_styles/layout/_index.sass | 1 - frontend/src/global_styles/layout/_print.sass | 1 - .../openproject/_homescreen.sass | 3 -- .../src/global_styles/primer/_overrides.sass | 6 --- .../spec/views/base.html.erb_spec.rb | 1 - .../controllers/saml/providers_controller.rb | 6 --- .../backlogs_settings_controller.rb | 6 --- .../rb_master_backlogs_controller.rb | 6 --- .../controllers/rb_taskboards_controller.rb | 4 -- .../controllers/boards/boards_controller.rb | 6 --- .../admin/cost_types_controller.rb | 4 -- .../my/time_tracking_controller.rb | 6 --- .../app/controllers/gantt/gantt_controller.rb | 6 --- .../synchronized_filters_controller.rb | 6 --- .../synchronized_groups_controller.rb | 6 --- .../recurring_meetings/schedule_controller.rb | 2 - .../app/controllers/my/page_controller.rb | 4 -- .../openid_connect/providers_controller.rb | 6 --- .../openid_connect/providers/edit.html.erb | 1 - .../controllers/recaptcha/admin_controller.rb | 6 --- .../views/recaptcha/request/perform.html.erb | 1 - .../admin/access_management_controller.rb | 8 ---- ...ally_managed_project_folders_controller.rb | 13 ------ .../admin/oauth_clients_controller.rb | 13 ------ .../storages/admin/storages_controller.rb | 6 --- .../project_storage_members_controller.rb | 8 ---- .../base_controller.rb | 8 ---- .../two_factor_devices_controller.rb | 4 -- .../my/two_factor_devices_controller.rb | 4 -- .../two_factor_settings_controller.rb | 6 --- .../authentication/enter_backup_code.html.erb | 1 - .../authentication/request_otp.html.erb | 1 - .../two_factor_devices/confirm.html.erb | 2 - .../webhooks/outgoing/admin_controller.rb | 6 --- spec/views/layouts/admin.html.erb_spec.rb | 1 - spec/views/layouts/base.html.erb_spec.rb | 1 - 84 files changed, 1 insertion(+), 471 deletions(-) delete mode 100644 frontend/src/global_styles/layout/_breadcrumb.sass diff --git a/app/controllers/admin/attachments/quarantined_attachments_controller.rb b/app/controllers/admin/attachments/quarantined_attachments_controller.rb index 3b28ca495d5..bc6db0ec88a 100644 --- a/app/controllers/admin/attachments/quarantined_attachments_controller.rb +++ b/app/controllers/admin/attachments/quarantined_attachments_controller.rb @@ -51,12 +51,6 @@ module Admin redirect_to action: :index end - def default_breadcrumb; end - - def show_local_breadcrumb - false - end - private def create_journal(container, user, notes) diff --git a/app/controllers/admin/backups_controller.rb b/app/controllers/admin/backups_controller.rb index 0be5ebdff8a..85f99bd405c 100644 --- a/app/controllers/admin/backups_controller.rb +++ b/app/controllers/admin/backups_controller.rb @@ -76,12 +76,6 @@ class Admin::BackupsController < ApplicationController redirect_to action: "show" end - def default_breadcrumb; end - - def show_local_breadcrumb - false - end - def check_enabled render_404 unless OpenProject::Configuration.backup_enabled? end diff --git a/app/controllers/admin/custom_fields/custom_field_projects_controller.rb b/app/controllers/admin/custom_fields/custom_field_projects_controller.rb index 390ad5ddf7f..1607b81037b 100644 --- a/app/controllers/admin/custom_fields/custom_field_projects_controller.rb +++ b/app/controllers/admin/custom_fields/custom_field_projects_controller.rb @@ -89,12 +89,6 @@ class Admin::CustomFields::CustomFieldProjectsController < ApplicationController respond_to_with_turbo_streams(status: delete_service.success? ? :ok : :unprocessable_entity) end - def default_breadcrumb; end - - def show_local_breadcrumb - false - end - private def render_project_list(url_for_action: action_name) diff --git a/app/controllers/admin/settings/attachments_settings_controller.rb b/app/controllers/admin/settings/attachments_settings_controller.rb index f727c70c44d..ed3d2e90445 100644 --- a/app/controllers/admin/settings/attachments_settings_controller.rb +++ b/app/controllers/admin/settings/attachments_settings_controller.rb @@ -30,12 +30,6 @@ module Admin::Settings class AttachmentsSettingsController < ::Admin::SettingsController menu_item :attachments - def default_breadcrumb; end - - def show_local_breadcrumb - false - end - def settings_params super.tap do |settings| settings["attachment_whitelist"] = settings["attachment_whitelist"].split(/\r?\n/) diff --git a/app/controllers/admin/settings/enumerations_controller_base.rb b/app/controllers/admin/settings/enumerations_controller_base.rb index eda3fef90ce..f1d9ff93623 100644 --- a/app/controllers/admin/settings/enumerations_controller_base.rb +++ b/app/controllers/admin/settings/enumerations_controller_base.rb @@ -103,8 +103,6 @@ module Admin @other_enumerations = enumeration_class.all - [@enumeration] end - def default_breadcrumb; end - private def move_params diff --git a/app/controllers/admin/settings/new_project_settings_controller.rb b/app/controllers/admin/settings/new_project_settings_controller.rb index 05595025674..3f08ad4d1d4 100644 --- a/app/controllers/admin/settings/new_project_settings_controller.rb +++ b/app/controllers/admin/settings/new_project_settings_controller.rb @@ -32,10 +32,6 @@ module Admin::Settings before_action :validate_enabled_modules, only: :update # rubocop:disable Rails/LexicallyScopedActionFilter - def default_breadcrumb - t(:label_project_new) - end - private # rubocop:disable Metrics/AbcSize, Metrics/PerceivedComplexity diff --git a/app/controllers/admin/settings/project_custom_fields_controller.rb b/app/controllers/admin/settings/project_custom_fields_controller.rb index 8a53a428268..8a2b082630f 100644 --- a/app/controllers/admin/settings/project_custom_fields_controller.rb +++ b/app/controllers/admin/settings/project_custom_fields_controller.rb @@ -48,10 +48,6 @@ module Admin::Settings before_action :find_unlink_project_custom_field_mapping, only: :unlink # rubocop:enable Rails/LexicallyScopedActionFilter - def show_local_breadcrumb - false - end - def index respond_to :html end diff --git a/app/controllers/admin/settings/users_settings_controller.rb b/app/controllers/admin/settings/users_settings_controller.rb index e0d2d2de972..581da429fb6 100644 --- a/app/controllers/admin/settings/users_settings_controller.rb +++ b/app/controllers/admin/settings/users_settings_controller.rb @@ -37,10 +37,6 @@ module Admin::Settings respond_to :html end - def show_local_breadcrumb - false - end - def settings_params super.tap do |settings| if settings["consent_required"] == "1" && params["toggle_consent_time"] == "1" diff --git a/app/controllers/admin/settings/virus_scanning_settings_controller.rb b/app/controllers/admin/settings/virus_scanning_settings_controller.rb index 0f530857b47..57eb4fc24d8 100644 --- a/app/controllers/admin/settings/virus_scanning_settings_controller.rb +++ b/app/controllers/admin/settings/virus_scanning_settings_controller.rb @@ -35,10 +35,6 @@ module Admin::Settings before_action :require_ee, except: :show # rubocop:disable Rails/LexicallyScopedActionFilter before_action :check_clamav, only: %i[update], if: -> { scan_enabled? } - def show_local_breadcrumb - false - end - def av_form selected = params.dig(:settings, :antivirus_scan_mode)&.to_sym || :disabled diff --git a/app/controllers/admin/settings_controller.rb b/app/controllers/admin/settings_controller.rb index ae81c5fa823..b259e8690e6 100644 --- a/app/controllers/admin/settings_controller.rb +++ b/app/controllers/admin/settings_controller.rb @@ -81,18 +81,6 @@ module Admin redirect_to action: :show_plugin, id: @plugin.id end - def show_local_breadcrumb - false - end - - def default_breadcrumb - if @plugin - @plugin.name - else - I18n.t(:label_setting_plural) - end - end - protected def find_plugin diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 790cdd4504a..3cf07262c27 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -90,12 +90,6 @@ class AdminController < ApplicationController @storage_information = OpenProject::Storage.mount_information end - def default_breadcrumb; end - - def show_local_breadcrumb - false - end - private def hidden_admin_menu_items diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 618f55b5937..718b30d4658 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -20,10 +20,6 @@ class AnnouncementsController < ApplicationController private - def show_local_breadcrumb - false - end - def announcement_params params.require(:announcement).permit("text", "show_until", "active") end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2dd566886db..6210f661029 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -436,21 +436,6 @@ class ApplicationController < ActionController::Base api_request? ? nil : super end - def default_breadcrumb - label = "label_#{controller_name.singularize}" - - I18n.t(label + "_plural", - default: label.to_sym) - end - - helper_method :default_breadcrumb - - def show_local_breadcrumb - false - end - - helper_method :show_local_breadcrumb - def admin_first_level_menu_entry menu_item = admin_menu_item(current_menu_item) menu_item.parent diff --git a/app/controllers/attribute_help_texts_controller.rb b/app/controllers/attribute_help_texts_controller.rb index 1d42804a5a1..cf5fb015493 100644 --- a/app/controllers/attribute_help_texts_controller.rb +++ b/app/controllers/attribute_help_texts_controller.rb @@ -85,12 +85,6 @@ class AttributeHelpTextsController < ApplicationController protected - def default_breadcrumb; end - - def show_local_breadcrumb - false - end - private def permitted_params_with_attachments diff --git a/app/controllers/colors_controller.rb b/app/controllers/colors_controller.rb index 9aba619dff5..19bf635015d 100644 --- a/app/controllers/colors_controller.rb +++ b/app/controllers/colors_controller.rb @@ -102,12 +102,6 @@ class ColorsController < ApplicationController protected - def show_local_breadcrumb - false - end - - def default_breadcrumb; end - def require_admin_unless_readonly_api_request require_admin unless %w[index show].include? action_name and api_request? diff --git a/app/controllers/custom_actions_controller.rb b/app/controllers/custom_actions_controller.rb index 0601c9322bb..54c3fbaf253 100644 --- a/app/controllers/custom_actions_controller.rb +++ b/app/controllers/custom_actions_controller.rb @@ -102,10 +102,4 @@ class CustomActionsController < ApplicationController params[:custom_action][:conditions] ||= {} params[:custom_action][:actions] ||= {} end - - def show_local_breadcrumb - false - end - - def default_breadcrumb; end end diff --git a/app/controllers/custom_fields_controller.rb b/app/controllers/custom_fields_controller.rb index 3bf72aedf15..89ad257399e 100644 --- a/app/controllers/custom_fields_controller.rb +++ b/app/controllers/custom_fields_controller.rb @@ -61,12 +61,6 @@ class CustomFieldsController < ApplicationController protected - def default_breadcrumb; end - - def show_local_breadcrumb - false - end - def validate_enterprise_token if params.dig(:custom_field, :field_format) == "hierarchy" && !EnterpriseToken.allows_to?(:custom_field_hierarchies) render_403 diff --git a/app/controllers/enterprises_controller.rb b/app/controllers/enterprises_controller.rb index 4f07aa40012..68dd60d575c 100644 --- a/app/controllers/enterprises_controller.rb +++ b/app/controllers/enterprises_controller.rb @@ -98,12 +98,6 @@ class EnterprisesController < ApplicationController helpers.write_augur_to_gon end - def default_breadcrumb; end - - def show_local_breadcrumb - false - end - def check_user_limit if OpenProject::Enterprise.user_limit_reached? flash.now[:warning] = I18n.t( diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 82de14c39b8..8d925f727db 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -160,10 +160,6 @@ class GroupsController < ApplicationController Group.in_project(Project.allowed_to(current_user, :view_members)).exists? end - def show_local_breadcrumb - false - end - def respond_membership_altered(service_call) if service_call.success? flash[:notice] = I18n.t :notice_successful_update diff --git a/app/controllers/homescreen_controller.rb b/app/controllers/homescreen_controller.rb index 17135f4314b..5f2b8810cb7 100644 --- a/app/controllers/homescreen_controller.rb +++ b/app/controllers/homescreen_controller.rb @@ -61,10 +61,4 @@ class HomescreenController < ApplicationController redirect_to_global_menu_item(params[:jump]) && return end end - - def default_breadcrumb; end - - def show_local_breadcrumb - false - end end diff --git a/app/controllers/ldap_auth_sources_controller.rb b/app/controllers/ldap_auth_sources_controller.rb index 17e46c044da..61d7aa0a69d 100644 --- a/app/controllers/ldap_auth_sources_controller.rb +++ b/app/controllers/ldap_auth_sources_controller.rb @@ -106,10 +106,6 @@ class LdapAuthSourcesController < ApplicationController end end - def show_local_breadcrumb - false - end - def block_if_password_login_disabled render_404 if OpenProject::Configuration.disable_password_login? end diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index 129cccccdf5..1b754937f77 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -202,14 +202,6 @@ class MyController < ApplicationController private - def default_breadcrumb - I18n.t(:label_my_account) - end - - def show_local_breadcrumb - false - end - def redirect_if_password_change_not_allowed_for(user) unless user.change_password_allowed? flash[:error] = I18n.t(:notice_can_t_change_password) diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index 6551f019f2b..099dfbca561 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -73,8 +73,6 @@ class NotificationsController < ApplicationController def split_view_base_route = notifications_path(request.query_parameters) - def default_breadcrumb; end - def render_notifications_layout # Frontend will handle rendering # but we will need to render with notification specific layout diff --git a/app/controllers/oauth/applications_controller.rb b/app/controllers/oauth/applications_controller.rb index 2964cca876d..ff7668f4d35 100644 --- a/app/controllers/oauth/applications_controller.rb +++ b/app/controllers/oauth/applications_controller.rb @@ -97,14 +97,6 @@ module OAuth redirect_to action: :index end - protected - - def default_breadcrumb; end - - def show_local_breadcrumb - false - end - private def prevent_builtin_edits diff --git a/app/controllers/omni_auth_login_controller.rb b/app/controllers/omni_auth_login_controller.rb index b6729310a6e..866a287bb80 100644 --- a/app/controllers/omni_auth_login_controller.rb +++ b/app/controllers/omni_auth_login_controller.rb @@ -84,6 +84,4 @@ class OmniAuthLoginController < ApplicationController def omniauth_back_url request.env["omniauth.origin"].presence || params[:RelayState] end - - def default_breadcrumb; end end diff --git a/app/controllers/placeholder_users_controller.rb b/app/controllers/placeholder_users_controller.rb index e1317bde96b..50dffa8760d 100644 --- a/app/controllers/placeholder_users_controller.rb +++ b/app/controllers/placeholder_users_controller.rb @@ -155,8 +155,4 @@ class PlaceholderUsersController < ApplicationController render_403 message: I18n.t("placeholder_users.right_to_manage_members_missing") end end - - def show_local_breadcrumb - false - end end diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index 33d2bcbd23f..d1b5221012c 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -149,10 +149,6 @@ class RolesController < ApplicationController Role.visible.ordered_by_builtin_and_position end - def show_local_breadcrumb - false - end - def new_params permitted_params.role? || {} end diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb index cd097715a84..ec33548534e 100644 --- a/app/controllers/statuses_controller.rb +++ b/app/controllers/statuses_controller.rb @@ -85,10 +85,6 @@ class StatusesController < ApplicationController protected - def show_local_breadcrumb - false - end - def recompute_progress_values attributes_triggering_recomputing = ["excluded_from_totals"] attributes_triggering_recomputing << "default_done_ratio" if WorkPackage.status_based_mode? diff --git a/app/controllers/types_controller.rb b/app/controllers/types_controller.rb index b7f5af4f812..b22c5245aa6 100644 --- a/app/controllers/types_controller.rb +++ b/app/controllers/types_controller.rb @@ -136,10 +136,6 @@ class TypesController < ApplicationController render action: :edit, status: end - def show_local_breadcrumb - false - end - def destroy_error_message if @type.is_standard? t(:error_can_not_delete_standard_type) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 3a0b2e866ef..6fc83e79681 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -282,10 +282,6 @@ class UsersController < ApplicationController protected - def show_local_breadcrumb - false - end - def build_user_update_params # rubocop:disable Metrics/AbcSize pref_params = permitted_params.pref.to_h update_params = permitted_params diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 007bb3268b8..29e18b9a751 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -414,14 +414,6 @@ class WikiController < ApplicationController page.editable_by?(User.current) end - def default_breadcrumb - Wiki.model_name.human - end - - def show_local_breadcrumb - false - end - def redirect_to_show redirect_to action: :show, project_id: @project, id: @page end diff --git a/app/controllers/work_packages/bulk_controller.rb b/app/controllers/work_packages/bulk_controller.rb index 54b072003da..81a2820a53b 100644 --- a/app/controllers/work_packages/bulk_controller.rb +++ b/app/controllers/work_packages/bulk_controller.rb @@ -118,10 +118,6 @@ class WorkPackages::BulkController < ApplicationController current_user end - def default_breadcrumb - I18n.t(:label_work_package_plural) - end - def transform_attributes(attributes) Hash(attributes) .compact_blank diff --git a/app/controllers/work_packages/dialogs_controller.rb b/app/controllers/work_packages/dialogs_controller.rb index d3fdd1fbc93..dd32d35cdbb 100644 --- a/app/controllers/work_packages/dialogs_controller.rb +++ b/app/controllers/work_packages/dialogs_controller.rb @@ -100,6 +100,4 @@ class WorkPackages::DialogsController < ApplicationController project: @project } end - - def default_breadcrumb; end end diff --git a/app/controllers/work_packages/moves_controller.rb b/app/controllers/work_packages/moves_controller.rb index 84fb506e34c..ef2141b28a5 100644 --- a/app/controllers/work_packages/moves_controller.rb +++ b/app/controllers/work_packages/moves_controller.rb @@ -97,10 +97,6 @@ class WorkPackages::MovesController < ApplicationController end end - def default_breadcrumb - I18n.t(:label_move_work_package) - end - # Check if project is unique before bulk operations def check_project_uniqueness unless @project diff --git a/app/controllers/work_packages/reports_controller.rb b/app/controllers/work_packages/reports_controller.rb index 7507026789b..d18811bb1b8 100644 --- a/app/controllers/work_packages/reports_controller.rb +++ b/app/controllers/work_packages/reports_controller.rb @@ -59,10 +59,4 @@ class WorkPackages::ReportsController < ApplicationController end end end - - private - - def default_breadcrumb - I18n.t(:label_summary) - end end diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index 3ce4dc50d8f..82a689dcc2e 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -93,10 +93,6 @@ class WorkflowsController < ApplicationController end end - def show_local_breadcrumb - false - end - private def statuses_for_form diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb index 48d65d53682..5e61831cb0e 100644 --- a/app/helpers/breadcrumb_helper.rb +++ b/app/helpers/breadcrumb_helper.rb @@ -27,20 +27,6 @@ #++ module BreadcrumbHelper - def full_breadcrumbs - render(Primer::Beta::Breadcrumbs.new(test_selector: "op-breadcrumb")) do |breadcrumbs| - breadcrumb_paths.each_with_index do |item, index| - item = anchor_string_to_object(item) if item.is_a?(String) && item.start_with?("\u003c") - - if item.is_a?(Hash) - breadcrumbs.with_item(href: item[:href], classes: index == 0 ? "first-breadcrumb-element" : nil) { item[:text] } - else - breadcrumbs.with_item(href: "#", classes: index == 0 ? "first-breadcrumb-element" : nil) { item } - end - end - end - end - def nested_breadcrumb_element(section_header, title) output = "".html_safe output << "#{section_header}: " @@ -48,33 +34,4 @@ module BreadcrumbHelper output end - - def breadcrumb_paths(*args) - if args.empty? - @breadcrumb_paths ||= [default_breadcrumb] - else - @breadcrumb_paths ||= [] - @breadcrumb_paths += args.flatten.compact - end - end - - def show_breadcrumb - if !!(defined? show_local_breadcrumb) - show_local_breadcrumb - else - false - end - end - - private - - # transform anchor tag strings to {href, text} objects - # e.g "\u003ca href=\"/admin\"\u003eAdministration\u003c/a\u003e" - def anchor_string_to_object(html_string) - # Parse the HTML - doc = Nokogiri::HTML.fragment(html_string) - # Extract href and text - anchor = doc.at("a") - { href: anchor["href"], text: anchor.text } - end end diff --git a/app/views/account/consent.html.erb b/app/views/account/consent.html.erb index 2274f155910..5148b6305df 100644 --- a/app/views/account/consent.html.erb +++ b/app/views/account/consent.html.erb @@ -27,7 +27,6 @@ See COPYRIGHT and LICENSE files for more details. ++#%> -<% breadcrumb_paths(t("consent.title")) %> <% html_title t("consent.title") %> <%= call_hook :view_account_consent_top %>