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

when there is no project selected, show the instance name in breadcrumbs

Behrokh Satarnejadbb0b7a1b1587
diff --git a/frontend/src/app/core/html/op-title.service.ts b/frontend/src/app/core/html/op-title.service.ts
index 2d8e8cd4833..bd53e664f80 100644
--- a/frontend/src/app/core/html/op-title.service.ts
+++ b/frontend/src/app/core/html/op-title.service.ts
@@ -21,6 +21,10 @@ export class OpTitleService {
return this.current.split(titlePartsSeparator);
}
+ public get appTitle():string {
+ return this.titleParts[this.titleParts.length - 1];
+ }
+
public setFirstPart(value:string) {
if (this.current.includes(this.base) && this.current.includes(titlePartsSeparator)) {
const parts = this.titleParts;
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 944d9866d95..e9992e4adf5 100644
--- a/frontend/src/app/core/path-helper/path-helper.service.ts
+++ b/frontend/src/app/core/path-helper/path-helper.service.ts
@@ -391,4 +391,8 @@ export class PathHelperService {
public myTimeTrackingRefresh(date:string, viewMode:string, mode:string) {
return `${this.staticBase}/my/time-tracking/refresh?date=${date}&view_mode=${viewMode}&mode=${mode}`;
}
+
+ public homePath() {
+ return `${this.staticBase}/`;
+ }
}
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 e03e47a3417..627128a1bd8 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
@@ -116,6 +116,11 @@ export class WorkPackageViewPageComponent extends PartitionedQuerySpacePageCompo
href: this.pathHelperService.projectPath(this.currentProject.identifier),
text: this.currentProject.name,
});
+ } else {
+ items.push({
+ href: this.pathHelperService.homePath(),
+ text: this.titleService.appTitle,
+ });
}
items.push(this.breadcrumbModuleEntry());
if (this.selectedTitle) {