Skip to content

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

[64112] Create an angular breadcrumb as placeholder for the toggle button (#19229)

Behrokh Satarnejad8565925b1723
diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb
index 5e61831cb0e..c4098190806 100644
--- a/app/helpers/breadcrumb_helper.rb
+++ b/app/helpers/breadcrumb_helper.rb
@@ -30,7 +30,7 @@ module BreadcrumbHelper
def nested_breadcrumb_element(section_header, title)
output = "".html_safe
output << "#{section_header}: "
- output << content_tag(:strong, title)
+ output << content_tag(:b, title)
output
end
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index 0d1b77004a9..d60b42ffb33 100644
--- a/config/locales/js-en.yml
+++ b/config/locales/js-en.yml
@@ -758,6 +758,7 @@ en:
last_day: "Last day"
text_are_you_sure: "Are you sure?"
+ breadcrumb: "Breadcrumb"
text_data_lost: "All entered data will be lost."
text_user_wrote: "%{value} wrote:"
diff --git a/frontend/src/app/core/path-helper/path-helper.service.ts b/frontend/src/app/core/path-helper/path-helper.service.ts
index 92d6f4c02f9..944d9866d95 100644
--- a/frontend/src/app/core/path-helper/path-helper.service.ts
+++ b/frontend/src/app/core/path-helper/path-helper.service.ts
@@ -156,6 +156,21 @@ export class PathHelperService {
return `${this.projectPath(projectId)}/calendars`;
}
+ public projectTeamplannerPath(projectId:string) {
+ return `${this.projectPath(projectId)}/team_planners`;
+ }
+
+ public ganttChartsPath(projectId:string|null) {
+ if (projectId) {
+ return `${this.projectPath(projectId)}/gantt`;
+ }
+ return `${this.staticBase}/gantt`;
+ }
+
+ public projectBCFPath(projectId:string) {
+ return `${this.projectPath(projectId)}/bcf`;
+ }
+
public projectMembershipsPath(projectId:string) {
return `${this.projectPath(projectId)}/members`;
}
@@ -173,15 +188,18 @@ export class PathHelperService {
}
public projectWorkPackagePath(projectId:string, wpId:string|number) {
- return `${this.projectWorkPackagesPath(projectId)}/${wpId}`;
+ return `${this.workPackagesPath(projectId)}/${wpId}`;
}
- public projectWorkPackagesPath(projectId:string) {
- return `${this.projectPath(projectId)}/work_packages`;
+ public workPackagesPath(projectId:string|null) {
+ if (projectId) {
+ return `${this.projectPath(projectId)}/work_packages`;
+ }
+ return `${this.staticBase}/work_packages`;
}
public projectWorkPackageNewPath(projectId:string) {
- return `${this.projectWorkPackagesPath(projectId)}/new`;
+ return `${this.workPackagesPath(projectId)}/new`;
}
public boardsPath(projectIdentifier:string|null) {
@@ -256,10 +274,6 @@ export class PathHelperService {
return `${this.staticBase}/versions/${id}`;
}
- public workPackagesPath() {
- return `${this.staticBase}/work_packages`;
- }
-
public workPackagePath(id:string|number) {
return `${this.staticBase}/work_packages/${id}`;
}
@@ -277,7 +291,7 @@ export class PathHelperService {
return `${this.projectWorkPackagePath(projectIdentifier, workPackageId)}/details/${tab}`;
}
- return `${this.projectWorkPackagesPath(projectIdentifier)}/details/${workPackageId}`;
+ return `${this.workPackagesPath(projectIdentifier)}/details/${workPackageId}`;
}
public workPackageDetailsCopyPath(projectIdentifier:string, workPackageId:string|number) {
@@ -298,7 +312,7 @@ export class PathHelperService {
public workPackageProgressModalPath(workPackageId:string|number) {
if (workPackageId === 'new') {
- return `${this.workPackagesPath()}/progress/new`;
+ return `${this.workPackagesPath(null)}/progress/new`;
}
return `${this.workPackagePath(workPackageId)}/progress/edit`;
@@ -314,7 +328,7 @@ export class PathHelperService {
public workPackageDatepickerDialogContentPath(workPackageId:string|number):string {
if (workPackageId === 'new') {
- return `${this.workPackagesPath()}/date_picker/new`;
+ return `${this.workPackagesPath(null)}/date_picker/new`;
}
return `${this.workPackagePath(workPackageId)}/date_picker`;
@@ -323,11 +337,11 @@ export class PathHelperService {
// Work Package Bulk paths
public workPackagesBulkEditPath() {
- return `${this.workPackagesPath()}/bulk/edit`;
+ return `${this.workPackagesPath(null)}/bulk/edit`;
}
public workPackagesBulkMovePath() {
- return `${this.workPackagesPath()}/move/new`;
+ return `${this.workPackagesPath(null)}/move/new`;
}
public workPackagesBulkCopyPath() {
@@ -335,7 +349,7 @@ export class PathHelperService {
}
public workPackagesBulkDeletePath() {
- return `${this.workPackagesPath()}/bulk`;
+ return `${this.workPackagesPath(null)}/bulk`;
}
public textFormattingHelp() {
diff --git a/frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts b/frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts
index a1838a14ad9..1350f10fea0 100644
--- a/frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts
+++ b/frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts
@@ -177,6 +177,14 @@ export class IFCViewerPageComponent extends PartitionedQuerySpacePageComponent i
});
}
+ breadcrumbItems() {
+ return [
+ { href: this.pathHelperService.projectPath(this.currentProject.identifier as string), text: (this.currentProject.name) },
+ { href: this.pathHelperService.projectBCFPath(this.currentProject.identifier as string), text: this.I18n.t('js.bcf.label_bcf') },
+ this.selectedTitle?? '',
+ ];
+ }
+
/**
* Initialize the BcfViewService when the query of the isolated space is loaded
*/
diff --git a/frontend/src/app/features/bim/ifc_models/pages/viewer/styles/generic.sass b/frontend/src/app/features/bim/ifc_models/pages/viewer/styles/generic.sass
index bcd4ad75b18..209e3888ed2 100644
--- a/frontend/src/app/features/bim/ifc_models/pages/viewer/styles/generic.sass
+++ b/frontend/src/app/features/bim/ifc_models/pages/viewer/styles/generic.sass
@@ -34,6 +34,9 @@
height: 33vh !important
min-width: unset !important
+ .op-breadcrumbs
+ margin-left: 20px
+
[data-name="bim"] .main-menu--children
overflow-x: hidden !important
diff --git a/frontend/src/app/features/boards/board/board-partitioned-page/board-partitioned-page.component.ts b/frontend/src/app/features/boards/board/board-partitioned-page/board-partitioned-page.component.ts
index 647d3b93247..41eba276009 100644
--- a/frontend/src/app/features/boards/board/board-partitioned-page/board-partitioned-page.component.ts
+++ b/frontend/src/app/features/boards/board/board-partitioned-page/board-partitioned-page.component.ts
@@ -36,6 +36,8 @@ import { ApiV3Service } from 'core-app/core/apiv3/api-v3.service';
import { OpTitleService } from 'core-app/core/html/op-title.service';
import { EMPTY } from 'rxjs';
import { SubmenuService } from 'core-app/core/main-menu/submenu.service';
+import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';
+import { CurrentProjectService } from 'core-app/core/current-project/current-project.service';
export function boardCardViewHandlerFactory(injector:Injector) {
return new CardViewHandlerRegistry(injector);
@@ -149,6 +151,8 @@ export class BoardPartitionedPageComponent extends UntilDestroyedMixin {
readonly Boards:BoardService,
readonly titleService:OpTitleService,
readonly submenuService:SubmenuService,
+ readonly pathHelperService:PathHelperService,
+ readonly currentProject:CurrentProjectService,
) {
super();
}
@@ -194,6 +198,16 @@ export class BoardPartitionedPageComponent extends UntilDestroyedMixin {
this.removeTransitionSubscription();
}
+ breadcrumbItems() {
+ return [
+ { href: this.pathHelperService.projectPath(this.currentProject.identifier as string), text: (this.currentProject.name) },
+ { href: this.pathHelperService.boardsPath(this.currentProject.identifier as string), text: this.I18n.t('js.label_board_plural') },
+ this.selectedTitle?? '',
+ ];
+ }
+
+ currentMenuSectionHeader() { return this.I18n.t('js.label_global_queries'); }
+
changeChangesFromTitle(newName:string) {
this.board$
.pipe(take(1))
diff --git a/frontend/src/app/features/calendar/wp-calendar-page/wp-calendar-page.component.ts b/frontend/src/app/features/calendar/wp-calendar-page/wp-calendar-page.component.ts
index 0f60b209f7e..7ce31c841d9 100644
--- a/frontend/src/app/features/calendar/wp-calendar-page/wp-calendar-page.component.ts
+++ b/frontend/src/app/features/calendar/wp-calendar-page/wp-calendar-page.component.ts
@@ -72,6 +72,14 @@ export class WorkPackagesCalendarPageComponent extends PartitionedQuerySpacePage
/** Go back using back-button */
backButtonCallback:() => void;
+ breadcrumbItems() {
+ return [
+ { href: this.pathHelperService.projectPath(this.currentProject.identifier as string), text: (this.currentProject.name) },
+ { href: this.pathHelperService.projectCalendarPath(this.currentProject.identifier as string), text: this.I18n.t('js.calendar.label_calendar_plural') },
+ this.selectedTitle?? '',
+ ];
+ }
+
/** Current query title to render */
selectedTitle = this.text.unsaved_title;
diff --git a/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts b/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts
index b2bedf69535..2988cba02c9 100644
--- a/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts
+++ b/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts
@@ -123,6 +123,14 @@ export class TeamPlannerPageComponent extends PartitionedQuerySpacePageComponent
this.currentPartition = state.data?.partition || '-split';
}
+ breadcrumbItems() {
+ return [
+ { href: this.pathHelperService.projectPath(this.currentProject.identifier as string), text: (this.currentProject.name) },
+ { href: this.pathHelperService.projectTeamplannerPath(this.currentProject.identifier as string), text: this.I18n.t('js.team_planner.label_team_planner_plural') },
+ this.selectedTitle?? '',
+ ];
+ }
+
protected staticQueryName(_query:QueryResource):string {
return this.text.unsaved_title;
}
diff --git a/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html b/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html
index 88a4fe71146..755d75027e7 100644
--- a/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html
+++ b/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html
@@ -1,5 +1,9 @@
<div class="work-packages-partitioned-query-space--container"
[ngClass]="currentPartition">
+ <op-breadcrumbs
+ [items]="breadcrumbItems()"
+ [lastItemSection]="currentMenuSectionHeader()"
+ ></op-breadcrumbs>
<div class="toolbar-container -editable">
<div class="toolbar">
<op-back-button *ngIf="backButtonCallback"
diff --git a/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.sass b/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.sass
index b4661621c06..0fd432065b4 100644
--- a/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.sass
+++ b/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.sass
@@ -6,7 +6,7 @@
overflow: hidden
display: grid
grid-template-columns: 1fr
- grid-template-rows: auto auto minmax(200px, 1fr)
+ grid-template-rows: auto auto auto minmax(200px, 1fr)
margin-left: -10px
padding-left: 10px
diff --git a/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts b/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts
index 317c477e937..23af678e283 100644
--- a/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts
+++ b/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts
@@ -50,6 +50,8 @@ import isPersistedResource from 'core-app/features/hal/helpers/is-persisted-reso
import { UIRouterGlobals } from '@uirouter/core';
import { ConfigurationService } from 'core-app/core/config/configuration.service';
import { firstValueFrom } from 'rxjs';
+import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';
+import { CurrentProjectService } from 'core-app/core/current-project/current-project.service';
export interface DynamicComponentDefinition {
component:ComponentType<any>;
@@ -81,6 +83,10 @@ export class PartitionedQuerySpacePageComponent extends WorkPackagesViewBase imp
@InjectField() queryParamListener:QueryParamListenerService;
+ @InjectField() pathHelperService:PathHelperService;
+
+ @InjectField() currentProjectService:CurrentProjectService;
+
@InjectField() opModalService:OpModalService;
@InjectField() uiRouterGlobals:UIRouterGlobals;
@@ -175,6 +181,16 @@ export class PartitionedQuerySpacePageComponent extends WorkPackagesViewBase imp
});
}
+ breadcrumbItems() {
+ throw new Error('Not implemented');
+ }
+
+ currentMenuSectionHeader() {
+ if (!this.currentQuery?.id) return this.I18n.t('js.label_default_queries');
+ if (this.currentQuery.starred) return this.I18n.t('js.label_starred_queries');
+ return this.currentQuery.public ? this.I18n.t('js.label_global_queries') : this.I18n.t('js.label_custom_queries');
+ }
+
/**
* We need to set the current partition to the grid to ensure
* either side gets expanded to full width if we're not in '-split' mode.
diff --git a/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts b/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts
index b39d87b1852..e03e47a3417 100644
--- a/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts
+++ b/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts
@@ -108,6 +108,36 @@ export class WorkPackageViewPageComponent extends PartitionedQuerySpacePageCompo
this.text.button_settings = this.I18n.t('js.button_settings');
}
+ breadcrumbItems() {
+ const items = [];
+
+ if (this.currentProject?.identifier) {
+ items.push({
+ href: this.pathHelperService.projectPath(this.currentProject.identifier),
+ text: this.currentProject.name,
+ });
+ }
+ items.push(this.breadcrumbModuleEntry());
+ if (this.selectedTitle) {
+ items.push(this.selectedTitle);
+ }
+
+ return items;
+ }
+
+ breadcrumbModuleEntry():{ href:string, text:string } {
+ if (this.isGantt) {
+ return {
+ href: this.pathHelperService.ganttChartsPath(this.currentProject.identifier as string),
+ text: this.I18n.t('js.work_packages.label_gantt_chart_plural'),
+ };
+ }
+ return {
+ href: this.pathHelperService.workPackagesPath(this.currentProject.identifier as string),
+ text: this.I18n.t('js.label_work_package_plural'),
+ };
+ }
+
protected additionalLoadingTime():Promise<unknown> {
if (this.wpTableTimeline.isVisible) {
return this.querySpace.timelineRendered.pipe(take(1)).toPromise();
@@ -120,10 +150,14 @@ export class WorkPackageViewPageComponent extends PartitionedQuerySpacePageCompo
}
private get stateName() {
- if (this.$state.current.name?.includes('gantt')) {
+ if (this.isGantt) {
return 'gantt.partitioned.list.new';
}
return 'work-packages.partitioned.list.new';
}
+
+ private get isGantt() {
+ return this.$state.current.name?.includes('gantt');
+ }
}
diff --git a/frontend/src/app/shared/components/breadcrumbs/op-breadcrumbs.component.html b/frontend/src/app/shared/components/breadcrumbs/op-breadcrumbs.component.html
new file mode 100644
index 00000000000..5d074deb51e
--- /dev/null
+++ b/frontend/src/app/shared/components/breadcrumbs/op-breadcrumbs.component.html
@@ -0,0 +1,49 @@
+<div class="op-breadcrumbs">
+ <!-- Desktop Version -->
+ <nav [attr.aria-label]="text.breadcrumb" class="hidden-for-mobile">
+ <ol class="op-breadcrumbs--items">
+ <li
+ class="op-breadcrumbs--item"
+ data-test-selector="op-breadcrumbs--item"
+ *ngFor="let item of items; let last = last"
+ >
+ <ng-container *ngIf="!last">
+ <ng-container *ngIf="isLink(item); else plainText">
+ <a [href]="item.href" target="_top">{{ item.text }}</a>
+ </ng-container>
+ <ng-template #plainText>
+ <a class="op-breadcrumbs--text"
+ href="#"
+ target="_top">
+ {{ item }}
+ </a>
+ </ng-template>
+ </ng-container>
+ <ng-container *ngIf="last">
+ <a href="#"
+ aria-current="page"
+ class="op-breadcrumbs--current"
+ target="_self"
+ >
+ <ng-container *ngIf="lastItemSection">
+ <span class="op-breadcrumbs--section">{{ lastItemSection }}: </span>
+ </ng-container>
+ <b>{{ getText(item) }}</b>
+ </a>
+ </ng-container>
+ </li>
+ </ol>
+ </nav>
+
+ <!-- Mobile Version -->
+ <nav [attr.aria-label]="text.breadcrumb" class="hidden-for-desktop">
+ <div class="op-breadcrumbs--mobile" *ngIf="items.length > 1">
+ <ng-container *ngIf="getHref(items[items.length - 2]) as href">
+ <a class="op-breadcrumbs--back" [href]="href" target="_top">
+ <svg arrow-left-icon size="small"></svg>
+ {{ getText(items[items.length - 2]) }}
+ </a>
+ </ng-container>
+ </div>
+ </nav>
+</div>
diff --git a/frontend/src/app/shared/components/breadcrumbs/op-breadcrumbs.component.sass b/frontend/src/app/shared/components/breadcrumbs/op-breadcrumbs.component.sass
new file mode 100644
index 00000000000..5b2861e6336
--- /dev/null
+++ b/frontend/src/app/shared/components/breadcrumbs/op-breadcrumbs.component.sass
@@ -0,0 +1,36 @@
+@import "helpers"
+
+.op-breadcrumbs
+ .op-breadcrumbs--items
+ margin-left: 0
+ .op-breadcrumbs--item
+ display: inline-block
+ list-style: none
+ margin-left: 0
+ &:after
+ border-right: 0.1em solid var(--borderColor-neutral-emphasis)
+ content: ""
+ display: inline-block
+ height: 0.8em
+ margin: 0 0.5em
+ transform: rotate(15deg) translateY(0.0625em)
+ &:last-child:after
+ content: none
+ .op-breadcrumbs--section
+ font-weight: normal
+
+ .op-breadcrumbs--current, .op-breadcrumbs--text
+ text-decoration: none
+ color: inherit
+
+ @media (max-width: $breakpoint-sm)
+ .op-breadcrumbs--mobile
+ display: flex
+ align-items: center
+
+ .op-breadcrumbs--back
+ display: flex
+ align-items: center
+ text-decoration: none
+ color: var(--fgColor-muted)
+ gap: 0.5rem
diff --git a/frontend/src/app/shared/components/breadcrumbs/op-breadcrumbs.component.ts b/frontend/src/app/shared/components/breadcrumbs/op-breadcrumbs.component.ts
new file mode 100644
index 00000000000..1a75ebe9581
--- /dev/null
+++ b/frontend/src/app/shared/components/breadcrumbs/op-breadcrumbs.component.ts
@@ -0,0 +1,75 @@
+//-- copyright
+// OpenProject is an open source project management software.
+// Copyright (C) the OpenProject GmbH
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License version 3.
+//
+// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+// Copyright (C) 2006-2013 Jean-Philippe Lang
+// Copyright (C) 2010-2013 the ChiliProject Team
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// See COPYRIGHT and LICENSE files for more details.
+//++
+
+import {
+ ChangeDetectionStrategy,
+ Component,
+ Input,
+} from '@angular/core';
+import { I18nService } from 'core-app/core/i18n/i18n.service';
+
+export type BreadcrumbItem =
+ | { href:string; text:string }
+ | string;
+
+@Component({
+ templateUrl: './op-breadcrumbs.component.html',
+ selector: 'op-breadcrumbs',
+ styleUrls: ['./op-breadcrumbs.component.sass'],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+})
+export class OpBreadcrumbsComponent {
+ @Input() items:BreadcrumbItem[] = [];
+ @Input() lastItemSection:string | null = null;
+
+ constructor(
+ readonly I18n:I18nService,
+ ) { }
+
+ text = {
+ breadcrumb: this.I18n.t('js.breadcrumb'),
+ };
+
+ isLink(item:BreadcrumbItem):item is { href:string; text:string } {
+ return typeof item !== 'string' && 'href' in item && 'text' in item;
+ }
+
+ getText(item:BreadcrumbItem):string {
+ if (this.isLink(item)) {
+ return item.text;
+ }
+ if (typeof item === 'string') {
+ return item;
+ }
+ return '';
+ }
+
+ getHref(item:BreadcrumbItem):string | null {
+ return this.isLink(item) ? item.href : null;
+ }
+}
diff --git a/frontend/src/app/shared/components/fields/display/field-types/hierarchy-query-link-helper.service.ts b/frontend/src/app/shared/components/fields/display/field-types/hierarchy-query-link-helper.service.ts
index caa71ed091c..c3934c118e6 100644
--- a/frontend/src/app/shared/components/fields/display/field-types/hierarchy-query-link-helper.service.ts
+++ b/frontend/src/app/shared/components/fields/display/field-types/hierarchy-query-link-helper.service.ts
@@ -48,7 +48,7 @@ export class HierarchyQueryLinkHelperService {
is: true,
f: [{ n: 'parent', o: '=', v: [wpID] }],
};
- link.href = URI(this.pathHelper.workPackagesPath())
+ link.href = URI(this.pathHelper.workPackagesPath(null))
.query({ query_props: JSON.stringify(props) })
.toString();
}
diff --git a/frontend/src/app/shared/components/icon/icon.module.ts b/frontend/src/app/shared/components/icon/icon.module.ts
index 4df6ee6fefe..db9f19a2dff 100644
--- a/frontend/src/app/shared/components/icon/icon.module.ts
+++ b/frontend/src/app/shared/components/icon/icon.module.ts
@@ -57,6 +57,7 @@ import {
ReadIconComponent,
EyeIconComponent,
EyeClosedIconComponent,
+ ArrowLeftIconComponent,
} from '@openproject/octicons-angular';
@NgModule({
@@ -121,6 +122,7 @@ import {
ReadIconComponent,
EyeIconComponent,
EyeClosedIconComponent,
+ ArrowLeftIconComponent,
],
declarations: [
OpIconComponent,
@@ -186,6 +188,7 @@ import {
ReadIconComponent,
EyeIconComponent,
EyeClosedIconComponent,
+ ArrowLeftIconComponent,
],
})
export class IconModule {}
diff --git a/frontend/src/app/shared/directives/a11y/keyboard-shortcut.service.ts b/frontend/src/app/shared/directives/a11y/keyboard-shortcut.service.ts
index 9ece394d3f3..8c19d4523f1 100644
--- a/frontend/src/app/shared/directives/a11y/keyboard-shortcut.service.ts
+++ b/frontend/src/app/shared/directives/a11y/keyboard-shortcut.service.ts
@@ -57,7 +57,7 @@ export class KeyboardShortcutService {
'?': () => this.showHelpModal(),
'g m': this.globalAction('myPagePath'),
'g o': this.projectScoped('projectPath'),
- 'g w p': this.projectScoped('projectWorkPackagesPath'),
+ 'g w p': this.projectScoped('workPackagesPath'),
'g w i': this.projectScoped('projectWikiPath'),
'g a': this.projectScoped('projectActivityPath'),
'g c': this.projectScoped('projectCalendarPath'),
diff --git a/frontend/src/app/shared/shared.module.ts b/frontend/src/app/shared/shared.module.ts
index 1f8957a38b9..4e6a97d75ed 100644
--- a/frontend/src/app/shared/shared.module.ts
+++ b/frontend/src/app/shared/shared.module.ts
@@ -84,6 +84,7 @@ import {
import { OpenprojectModalModule } from 'core-app/shared/components/modal/modal.module';
import { FullCalendarModule } from '@fullcalendar/angular';
import { OpDatePickerModule } from 'core-app/shared/components/datepicker/datepicker.module';
+import { OpBreadcrumbsComponent } from './components/breadcrumbs/op-breadcrumbs.component';
export function bootstrapModule(injector:Injector):void {
// Ensure error reporter is run
@@ -166,7 +167,7 @@ export function bootstrapModule(injector:Injector):void {
IconTriggeredContextMenuComponent,
NoResultsComponent,
-
+ OpBreadcrumbsComponent,
EditableToolbarTitleComponent,
DynamicModule,
@@ -201,6 +202,7 @@ export function bootstrapModule(injector:Injector):void {
ZenModeButtonComponent,
NoResultsComponent,
+ OpBreadcrumbsComponent,
EditableToolbarTitleComponent,
diff --git a/frontend/src/global_styles/content/modules/_boards.sass b/frontend/src/global_styles/content/modules/_boards.sass
index 4fbdeda3222..5f86c7ba3c8 100644
--- a/frontend/src/global_styles/content/modules/_boards.sass
+++ b/frontend/src/global_styles/content/modules/_boards.sass
@@ -2,3 +2,6 @@
.router--boards-full-view
@media only screen and (min-width: 680px)
@include extended-content--left
+
+ .op-breadcrumbs
+ margin-left: 20px
diff --git a/frontend/src/global_styles/layout/work_packages/_mobile.sass b/frontend/src/global_styles/layout/work_packages/_mobile.sass
index fc2e910b440..953f3912b81 100644
--- a/frontend/src/global_styles/layout/work_packages/_mobile.sass
+++ b/frontend/src/global_styles/layout/work_packages/_mobile.sass
@@ -128,5 +128,6 @@
padding: 15px 0 !important
.toolbar-container,
- .work-packages--filters-optional-container
+ .work-packages--filters-optional-container,
+ .op-breadcrumbs
margin-left: 15px
diff --git a/modules/bim/spec/features/show_default_spec.rb b/modules/bim/spec/features/show_default_spec.rb
index 639451ba707..4855e5c27e1 100644
--- a/modules/bim/spec/features/show_default_spec.rb
+++ b/modules/bim/spec/features/show_default_spec.rb
@@ -75,6 +75,9 @@ RSpec.describe "show default model", :js, with_config: { edition: "bim" } do
end
it "loads and shows the viewer and WPs correctly" do
+ expect(show_default_page).to have_test_selector("op-breadcrumbs--item", text: "BCF")
+ expect(show_default_page).to have_css(".op-breadcrumbs--current", text: "All open", aria: { current: "page" })
+
show_default_page.model_viewer_visible true
show_default_page.model_viewer_shows_a_toolbar true
show_default_page.page_shows_a_toolbar true
diff --git a/modules/boards/spec/features/action_boards/version_board_spec.rb b/modules/boards/spec/features/action_boards/version_board_spec.rb
index cfa92f214e4..45e3db77771 100644
--- a/modules/boards/spec/features/action_boards/version_board_spec.rb
+++ b/modules/boards/spec/features/action_boards/version_board_spec.rb
@@ -76,6 +76,9 @@ RSpec.describe "Version action board",
board_page = board_index.create_board title: "My Version Board",
action: "Version"
+ expect(board_page).to have_test_selector("op-breadcrumbs--item", text: "Boards")
+ expect(page).to have_css(".op-breadcrumbs--current", text: "My Version Board", aria: { current: "page" })
+
# expect lists of open versions
board_page.expect_list "Open version"
board_page.expect_list "A second version"
diff --git a/modules/calendar/config/locales/js-en.yml b/modules/calendar/config/locales/js-en.yml
index 2a3a0b27296..7d53c8ad38a 100644
--- a/modules/calendar/config/locales/js-en.yml
+++ b/modules/calendar/config/locales/js-en.yml
@@ -6,3 +6,4 @@ en:
title: 'Calendar'
too_many: 'There are %{count} work packages in total, but only %{max} can be shown.'
unsaved_title: 'Unnamed calendar'
+ label_calendar_plural: 'Calendars'
diff --git a/modules/calendar/spec/features/calendars_spec.rb b/modules/calendar/spec/features/calendars_spec.rb
index fc8c2eaa7c0..bd330119880 100644
--- a/modules/calendar/spec/features/calendars_spec.rb
+++ b/modules/calendar/spec/features/calendars_spec.rb
@@ -157,6 +157,9 @@ RSpec.describe "Work package calendars", :js do
# open the page via the url should show the next month again
visit future_url
+ expect(page).to have_test_selector("op-breadcrumbs--item", text: "Calendars")
+ expect(page).to have_css(".op-breadcrumbs--current", text: "Unnamed calendar", aria: { current: "page" })
+
expect(page)
.to have_no_css ".fc-event-title", text: current_work_package.subject
expect(page)
diff --git a/modules/gantt/config/locales/js-en.yml b/modules/gantt/config/locales/js-en.yml
index 670a4262a6a..0f0098d843b 100644
--- a/modules/gantt/config/locales/js-en.yml
+++ b/modules/gantt/config/locales/js-en.yml
@@ -1,5 +1,6 @@
en:
js:
work_packages:
+ label_gantt_chart_plural: "Gantt charts"
default_queries:
milestones: 'Milestones'
diff --git a/modules/gantt/spec/features/timeline/timeline_navigation_spec.rb b/modules/gantt/spec/features/timeline/timeline_navigation_spec.rb
index 0fa51af7988..923bf2844ff 100644
--- a/modules/gantt/spec/features/timeline/timeline_navigation_spec.rb
+++ b/modules/gantt/spec/features/timeline/timeline_navigation_spec.rb
@@ -112,6 +112,9 @@ RSpec.describe "Work package timeline navigation",
# Visit timeline query
wp_timeline.visit_query query_tl
+ expect(wp_timeline).to have_test_selector("op-breadcrumbs--item", text: "Gantt charts")
+ expect(wp_timeline).to have_css(".op-breadcrumbs--current", text: "Query with Timeline", aria: { current: "page" })
+
wp_timeline.expect_timeline!(open: true)
wp_timeline.expect_work_package_listed work_package2
wp_timeline.ensure_work_package_not_listed! work_package
diff --git a/modules/team_planner/config/locales/js-en.yml b/modules/team_planner/config/locales/js-en.yml
index abce0145fd3..e887e10e85e 100644
--- a/modules/team_planner/config/locales/js-en.yml
+++ b/modules/team_planner/config/locales/js-en.yml
@@ -3,6 +3,7 @@ en:
js:
team_planner:
add_existing: 'Add existing'
+ label_team_planner_plural: 'Team planners'
add_existing_title: 'Add existing work packages'
create_label: 'Team planner'
create_title: 'Create new team planner'
diff --git a/modules/team_planner/spec/features/team_planner_spec.rb b/modules/team_planner/spec/features/team_planner_spec.rb
index 986447e8ed7..b4e11253832 100644
--- a/modules/team_planner/spec/features/team_planner_spec.rb
+++ b/modules/team_planner/spec/features/team_planner_spec.rb
@@ -151,6 +151,9 @@ RSpec.describe "Team planner",
team_planner.title
+ expect(team_planner).to have_test_selector("op-breadcrumbs--item", text: "Team planners")
+ expect(team_planner).to have_css(".op-breadcrumbs--current", text: "Unnamed team planner", aria: { current: "page" })
+
team_planner.wait_for_loaded
team_planner.expect_empty_state
team_planner.expect_assignee(user, present: false)
diff --git a/spec/features/work_packages/pagination_spec.rb b/spec/features/work_packages/pagination_spec.rb
index 2130d0d1e5e..cffe6ffdc37 100644
--- a/spec/features/work_packages/pagination_spec.rb
+++ b/spec/features/work_packages/pagination_spec.rb
@@ -52,6 +52,9 @@ RSpec.describe "Work package pagination", :js do
it do
expect(page).to have_content("All open")
+ expect(page).to have_test_selector("op-breadcrumbs--item", text: "Work packages")
+ expect(page).to have_css(".op-breadcrumbs--current", text: "All open", aria: { current: "page" })
+
within(".work-packages-partitioned-query-space--container") do
expect(page).to have_content(work_package_1.subject)
expect(page).to have_no_content(work_package_2.subject)