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

BcfListContainer with own template + Viewer and Table display mode working with resizer

Aleix Suau5ea72cae8cdc
diff --git a/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.sass b/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.sass
new file mode 100644
index 00000000000..acfc13077fb
--- /dev/null
+++ b/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.sass
@@ -0,0 +1,35 @@
+@import "helpers"
+
+.result-overlay
+ @include overlay-background
+ background-color: #FFFFFF
+ opacity: 0.5
+
+.work-packages--card-view-container
+ width: 100%
+ overflow: auto
+ padding-bottom: 5px
+ @include styled-scroll-bar
+
+ @media screen and (min-width: 679px)
+ &.-with-resizer
+ padding-left: 10px
+
+ @media screen and (max-width: 679px)
+ // Ensure the WP cards span the complete width on mobile
+ // --> Move scrollbar out of visible area
+ min-width: calc(100vw + 10px)
+
+.work-packages-split-view--tabletimeline-container
+ display: flex
+ flex: 1 1 auto
+ @include styled-scroll-bar
+
+ @media screen and (min-width: 679px)
+ &.-with-resizer
+ padding-left: 10px
+
+ @media screen and (max-width: 679px)
+ // Ensure the WP cards span the complete width on mobile
+ // --> Move scrollbar out of visible area
+ min-width: calc(100vw + 10px)
\ No newline at end of file
diff --git a/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.ts b/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.ts
index 84f740b5819..84e2e1fbb88 100644
--- a/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.ts
+++ b/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.ts
@@ -16,8 +16,8 @@ import {UIRouterGlobals, UIRouter, TransitionService} from '@uirouter/core';
import {pluck, distinctUntilChanged, filter} from "rxjs/operators";
@Component({
- templateUrl: '/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.html',
- styleUrls: ['/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.sass'],
+ templateUrl: '/app/modules/bim/ifc_models/bcf/list-container/bfc-list-container.component.html',
+ styleUrls: ['/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.sass'],
providers: [
{ provide: WorkPackageViewHandlerToken, useValue: BcfCardViewHandlerRegistry },
{ provide: HalResourceNotificationService, useClass: WorkPackageNotificationService },
@@ -68,7 +68,7 @@ export class BcfListContainerComponent extends WorkPackageListViewComponent impl
// above through the cards parameter (showTableView)
}
- protected showResizerInCardView():boolean {
+ public showResizerInCardView():boolean {
if (this.noResults && this.ifcModelsService.models.length === 0) {
return false;
} else {
diff --git a/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bfc-list-container.component.html b/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bfc-list-container.component.html
new file mode 100644
index 00000000000..d7497112163
--- /dev/null
+++ b/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bfc-list-container.component.html
@@ -0,0 +1,33 @@
+<div class="result-overlay"
+ *ngIf="(showResultOverlay$ | async) && showTableView"></div>
+
+<!-- TABLE + TIMELINE horizontal split -->
+<div class="work-packages-split-view--tabletimeline-container"
+ [ngClass]="{ '-with-resizer': showResizerInCardView() }"
+ *ngIf="tableInformationLoaded && showTableView">
+ <wp-resizer elementClass="work-packages-partitioned-page--content-right"
+ localStorageKey="openProject-splitViewFlexBasis">
+ </wp-resizer>
+
+ <wp-table [projectIdentifier]="CurrentProject.identifier"
+ [configuration]="wpTableConfiguration"
+ class="work-packages-split-view--tabletimeline-content">
+ </wp-table>
+</div>
+
+<!-- GRID representation of the WP -->
+<div *ngIf="!showTableView"
+ class="work-packages--card-view-container"
+ [ngClass]="{ '-with-resizer': showResizerInCardView() }" >
+ <wp-grid [configuration]="wpTableConfiguration"
+ [showResizer]="showResizerInCardView()"
+ resizerClass="work-packages-partitioned-page--content-right"
+ resizerStorageKey="openProject-splitViewFlexBasis">
+ </wp-grid>
+</div>
+
+<!-- Footer -->
+<div class="work-packages-split-view--tabletimeline-footer hide-when-print"
+ *ngIf="tableInformationLoaded">
+ <wp-table-pagination></wp-table-pagination>
+</div>
diff --git a/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.html b/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.html
index b75b8c2cb94..d65af3c53a6 100644
--- a/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.html
+++ b/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.html
@@ -5,7 +5,8 @@
<wp-table *ngIf="tableInformationLoaded && showTableView"
[projectIdentifier]="CurrentProject.identifier"
[configuration]="wpTableConfiguration"
- class="work-packages-split-view--tabletimeline-content">commit </wp-table>
+ class="work-packages-split-view--tabletimeline-content">
+</wp-table>
<!-- GRID representation of the WP -->
<div *ngIf="!showTableView"
diff --git a/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.sass b/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.sass
index dafae9d6033..8b52ff74dfe 100644
--- a/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.sass
+++ b/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.sass
@@ -19,3 +19,17 @@
// Ensure the WP cards span the complete width on mobile
// --> Move scrollbar out of visible area
min-width: calc(100vw + 10px)
+
+.work-packages-split-view--tabletimeline-container
+ display: flex
+ flex: 1 1 100%
+ @include styled-scroll-bar
+
+ @media screen and (min-width: 679px)
+ &.-with-resizer
+ padding-left: 10px
+
+ @media screen and (max-width: 679px)
+ // Ensure the WP cards span the complete width on mobile
+ // --> Move scrollbar out of visible area
+ min-width: calc(100vw + 10px)
diff --git a/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.ts b/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.ts
index 663f53674d1..be357034bfd 100644
--- a/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.ts
+++ b/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.ts
@@ -119,7 +119,7 @@ export class WorkPackageListViewComponent extends UntilDestroyedMixin implements
});
}
- protected showResizerInCardView():boolean {
+ public showResizerInCardView():boolean {
return false;
}