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

Show "mark as read" button in the split view activity tab

Henriette Darge41a179323a68
diff --git a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/keep-tab/keep-tab.service.ts b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/keep-tab/keep-tab.service.ts
index d58c431ef76..0ebddfa8941 100644
--- a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/keep-tab/keep-tab.service.ts
+++ b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/keep-tab/keep-tab.service.ts
@@ -105,6 +105,11 @@ export class KeepTabService {
return this.currentTab;
}
+ get currentTabIdentifier():string|undefined {
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
+ return this.uiRouterGlobals.params.tabIdentifier;
+ }
+
protected notify() {
// Notify when updated
this.subject.next({
diff --git a/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.component.ts b/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.component.ts
index fbaa5c8ad90..0e0a4157234 100644
--- a/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.component.ts
+++ b/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.component.ts
@@ -86,7 +86,9 @@ export class WorkPackagesFullViewComponent extends WorkPackageSingleViewBase imp
private setWorkPackageScopeProperties(wp:WorkPackageResource) {
this.isWatched = wp.hasOwnProperty('unwatch');
this.displayWatchButton = wp.hasOwnProperty('unwatch') || wp.hasOwnProperty('watch');
- // TODO
+
+ // Todo check for hasUnreadNotifications
+ // Todo check for User logged in
this.displayNotificationsButton = true;
// watchers
diff --git a/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.component.ts b/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.component.ts
index 446bc76749f..dc2c2b0a9af 100644
--- a/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.component.ts
+++ b/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.component.ts
@@ -97,15 +97,21 @@ export class WorkPackageSplitViewComponent extends WorkPackageSingleViewBase imp
});
}
- public get shouldFocus() {
+ get shouldFocus() {
return this.$state.params.focus === true;
}
- public showBackButton():boolean {
+ showBackButton():boolean {
return this.baseRoute.includes('bim');
}
- public backToList() {
+ backToList():void {
this.backRouting.goToBaseState();
}
+
+ showNotificationsButton():boolean {
+ // Todo check for hasUnreadNotifications
+ // Todo check for User logged in
+ return this.keepTab.currentTabIdentifier === 'activity';
+ }
}
diff --git a/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.html b/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.html
index d809a96feb7..87e948f84fc 100644
--- a/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.html
+++ b/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.html
@@ -6,7 +6,16 @@
<span class="hidden-for-sighted" tabindex="-1" [opAutofocus]="shouldFocus" [textContent]="focusAnchorLabel">
</span>
- <wp-breadcrumb [workPackage]="workPackage"></wp-breadcrumb>
+ <div class="work-packages--breadcrumb">
+ <wp-breadcrumb [workPackage]="workPackage"></wp-breadcrumb>
+
+ <op-work-package-mark-notification-button
+ *ngIf="showNotificationsButton()"
+ class="work-packages--details-button"
+ [workPackage]="workPackage"
+ buttonClasses="-round"
+ ></op-work-package-mark-notification-button>
+ </div>
<edit-form
[resource]="workPackage"
diff --git a/frontend/src/global_styles/layout/work_packages/_details_view.sass b/frontend/src/global_styles/layout/work_packages/_details_view.sass
index 76ffe7809df..467842499ea 100644
--- a/frontend/src/global_styles/layout/work_packages/_details_view.sass
+++ b/frontend/src/global_styles/layout/work_packages/_details_view.sass
@@ -119,6 +119,15 @@ body.router--work-packages-partitioned-split-view-new
overflow-x: hidden
@include styled-scroll-bar
+ .work-packages--breadcrumb
+ display: grid
+ grid-template-columns: 1fr auto
+ grid-column-gap: 10px
+ align-items: center
+
+ .work-packages--details-button button
+ margin-bottom: 0
+
.work-packages--type-selector
flex-shrink: 0