diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index 3ddfd16177..df476838ee 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -439,10 +439,6 @@ class WikiController < ApplicationController
@page&.ancestors&.any?
end
- def show_local_breadcrumb_defaults
- false
- end
-
def redirect_to_show
redirect_to action: :show, project_id: @project, id: @page
end
diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb
index 3d91459c54..7d7ea5ee6b 100644
--- a/app/helpers/breadcrumb_helper.rb
+++ b/app/helpers/breadcrumb_helper.rb
@@ -30,13 +30,7 @@
module BreadcrumbHelper
def full_breadcrumb
- if show_defaults
- breadcrumb_list(link_to(icon_wrapper('icon2 icon-home', I18n.t(:label_home)), home_path),
- link_to_project_ancestors(@project),
- *breadcrumb_paths)
- else
- breadcrumb_list(*breadcrumb_paths)
- end
+ breadcrumb_list(*breadcrumb_paths)
end
def breadcrumb(*args)
@@ -48,17 +42,13 @@ module BreadcrumbHelper
elements = args.flatten
breadcrumb_elements = [content_tag(:li,
elements.shift.to_s,
- class: 'first-breadcrumb-element',
- style: 'list-style-image:none;')]
+ class: 'first-breadcrumb-element')]
breadcrumb_elements += elements.map do |element|
if element
- css_class = if element.try(:include?, 'op-breadcrumb-project-title')
- 'op-breadcrumb-project-element '
- end
content_tag(:li,
h(element.to_s),
- class: "#{css_class} icon4 icon-small icon-arrow-right5")
+ class: "icon4 icon-small icon-arrow-right5")
end
end
@@ -83,28 +73,4 @@ module BreadcrumbHelper
false
end
end
-
- def show_defaults
- if !!(defined? show_local_breadcrumb_defaults)
- show_local_breadcrumb_defaults
- else
- false
- end
- end
-
- private
-
- def link_to_project_ancestors(project)
- if project && !project.new_record?
- ancestors = (project.root? ? [] : project.ancestors.visible.to_a)
- ancestors << project
- ancestors.map do |p|
- if p == project
- link_to_project(p, { only_path: false }, title: p, class: 'op-breadcrumb-project-title nocut').html_safe
- else
- link_to_project(p, { jump: current_menu_item }, title: p, class: 'op-breadcrumb-project-title').html_safe
- end
- end
- end
- end
end
diff --git a/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.html b/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.html
index 30dd28df21..a13ea5e921 100644
--- a/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.html
+++ b/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.html
@@ -3,7 +3,7 @@
[attr.title]="parent.name"
uiSref="work-packages.show"
[uiParams]="{workPackageId: parent.id}"
- class="op-wp-breadcrumb-parent op-breadcrumb-project-title nocut"
+ class="op-wp-breadcrumb-parent nocut"
data-qa-selector="op-wp-breadcrumb-parent">
diff --git a/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb.html b/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb.html
index 596e943618..7d7b18c96a 100644
--- a/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb.html
+++ b/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb.html
@@ -16,12 +16,12 @@
[textContent]="ancestor.name"
uiSref="work-packages.show"
[uiParams]="{workPackageId: ancestor.id}"
- class="op-breadcrumb-project-title nocut">
+ class="nocut">
1 }">
+ [ngClass]="{ 'op-wp-breadcrumb--active-parent-select': inputActive, 'icon4 icon-small icon-arrow-right5': !inputActive && hierarchyCount > 1 }">
diff --git a/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb.sass b/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb.sass
index eebbadbb7e..cee2d20ff9 100644
--- a/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb.sass
+++ b/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb.sass
@@ -1,3 +1,15 @@
+@import "src/assets/sass/helpers"
+
.op-wp-breadcrumb
- .active-parent-select
- min-width: 320px
\ No newline at end of file
+ @include global-breadcrumb-styles
+ height: initial
+
+ &--ellipsed
+ max-width: 420px
+ @include text-shortener
+
+ &--active-parent-select
+ min-width: 320px
+
+ @media screen and (max-width: 1248px)
+ margin-top: 0
diff --git a/frontend/src/global_styles/layout/_breadcrumb.sass b/frontend/src/global_styles/layout/_breadcrumb.sass
index 8c3befdcd9..b253f18f4c 100644
--- a/frontend/src/global_styles/layout/_breadcrumb.sass
+++ b/frontend/src/global_styles/layout/_breadcrumb.sass
@@ -27,18 +27,7 @@
//++
#breadcrumb
+ @include global-breadcrumb-styles
+ min-height: var(--breadcrumb-height)
li
white-space: nowrap
-
-ul.op-breadcrumb
- margin: 0 0 0 0
- padding: 0
- list-style: none
- list-style-position: outside
- // width: 10000px
- height: var(--breadcrumb-height)
- line-height: var(--breadcrumb-height)
-
-// Hide projects in normal mode
-.op-breadcrumb .op-breadcrumb-project-element
- display: none
diff --git a/frontend/src/global_styles/layout/work_packages/_breadcrumb.sass b/frontend/src/global_styles/layout/work_packages/_breadcrumb.sass
deleted file mode 100644
index 77024701d0..0000000000
--- a/frontend/src/global_styles/layout/work_packages/_breadcrumb.sass
+++ /dev/null
@@ -1,49 +0,0 @@
-%breadcrumb--default-font
- @include default-font(var(--breadcrumb-font-color), var(--breadcrumb-font-size), bold)
-
-#breadcrumb,
-.op-wp-breadcrumb
- margin-top: 10px
- height: initial
- display: none
- @include default-transition
- height: var(--breadcrumb-height)
- overflow: hidden
- background: none repeat scroll 0 0
- background-color: var(--body-background)
- border: none
- width: auto
- position: relative
- &.nosidebar
- // 7px of the icon to align breadcrumb with content
- margin-left: -7px
- ul
- margin: 0
-
- a
- font-size: 12px
- color: var(--content-link-color)
- font-weight: normal
-
- ul.op-breadcrumb
- height: initial
- li
- float: left
- margin: 0 5px 0 0
- padding: 0
- line-height: 20px
-
- .op-wp-breadcrumb--ellipsed
- max-width: 420px
- @include text-shortener
-
- li
- @extend %breadcrumb--default-font
- // TODO was lighten($breadcrumb-font-color, 20)
- color: #666
- list-style-type: none
-
- &.-show
- display: block
-
-
diff --git a/frontend/src/global_styles/layout/work_packages/_index.sass b/frontend/src/global_styles/layout/work_packages/_index.sass
index 23aeebda25..322ade8f1c 100644
--- a/frontend/src/global_styles/layout/work_packages/_index.sass
+++ b/frontend/src/global_styles/layout/work_packages/_index.sass
@@ -4,5 +4,3 @@
@import full_view
@import mobile
@import print
-@import breadcrumb
-
diff --git a/frontend/src/global_styles/openproject/_mixins.sass b/frontend/src/global_styles/openproject/_mixins.sass
index e8895387be..8cca31b5bb 100644
--- a/frontend/src/global_styles/openproject/_mixins.sass
+++ b/frontend/src/global_styles/openproject/_mixins.sass
@@ -222,3 +222,27 @@ $scrollbar-size: 10px
border: 0
font: inherit
text-align: inherit
+
+@mixin global-breadcrumb-styles
+ margin-top: 10px
+ display: none
+ @include default-transition
+ overflow: hidden
+ width: auto
+
+ ul.op-breadcrumb
+ height: initial
+ margin: 0
+ padding: 0
+ li
+ @include default-font(var(--breadcrumb-font-color), var(--breadcrumb-font-size), normal)
+ list-style-type: none
+ float: left
+ margin: 0 5px 0 0
+ padding: 0
+ line-height: 20px
+ max-width: 100%
+ @include text-shortener
+
+ &.-show
+ display: block
diff --git a/frontend/src/global_styles/openproject/_variables.scss b/frontend/src/global_styles/openproject/_variables.scss
index 280e5ba6d1..3aaf11db29 100644
--- a/frontend/src/global_styles/openproject/_variables.scss
+++ b/frontend/src/global_styles/openproject/_variables.scss
@@ -112,7 +112,7 @@
--breadcrumb-border-color: #E7E7E7;
--breadcrumb-font-size: 12px;
--breadcrumb-highlighted-font-size: 14px;
- --breadcrumb-font-color: var(--body-font-color);
+ --breadcrumb-font-color: lighten(var(--body-font-color), 20);
--content-default-border-color: #EAEAEA;
--content-default-border-width: 1px;
--content-link-hover-active-color: var(--primary-color-dark);