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

Enable card view for embedded tables and use it for ifc viewer

Henriette Dinger7178e3d5b42d
diff --git a/app/assets/stylesheets/layout/work_packages/_table_embedded.sass b/app/assets/stylesheets/layout/work_packages/_table_embedded.sass
index 9b0b148fad8..1689daba4e6 100644
--- a/app/assets/stylesheets/layout/work_packages/_table_embedded.sass
+++ b/app/assets/stylesheets/layout/work_packages/_table_embedded.sass
@@ -62,6 +62,14 @@ $table-timeline--compact-row-height: 28px
.generic-table--sort-header
font-size: 12px
+ .work-packages-embedded-view--grid-view
+ height: 100%
+ overflow: auto
+ @include styled-scroll-bar
+
+ .wp-cards-container.-horizontal
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))
+
&.-compact-tables
.wp-table--row
border-bottom: none !important
diff --git a/frontend/src/app/components/wp-table/embedded/wp-embedded-table.html b/frontend/src/app/components/wp-table/embedded/wp-embedded-table.html
index d15027222a9..04b7f0f3d6b 100644
--- a/frontend/src/app/components/wp-table/embedded/wp-embedded-table.html
+++ b/frontend/src/app/components/wp-table/embedded/wp-embedded-table.html
@@ -13,10 +13,16 @@
</filter-container>
<!-- TABLE + TIMELINE horizontal split -->
- <wp-table [projectIdentifier]="projectIdentifier"
+ <wp-table *ngIf="!configuration.isCardView"
+ [projectIdentifier]="projectIdentifier"
[configuration]="configuration"
class="work-packages-split-view--tabletimeline-content"></wp-table>
+ <!-- GRID representation of the WP -->
+ <div class="work-packages-embedded-view--grid-view">
+ <wp-grid *ngIf="configuration.isCardView"></wp-grid>
+ </div>
+
<!-- Footer -->
<div class="work-packages-split-view--tabletimeline-footer hide-when-print">
<wp-table-pagination [hideForSinglePageResults]="true">
diff --git a/frontend/src/app/modules/ifc_models/ifc-base-view/ifc-base-view.component.sass b/frontend/src/app/modules/ifc_models/ifc-base-view/ifc-base-view.component.sass
index 79739616742..f8f90ff4c29 100644
--- a/frontend/src/app/modules/ifc_models/ifc-base-view/ifc-base-view.component.sass
+++ b/frontend/src/app/modules/ifc_models/ifc-base-view/ifc-base-view.component.sass
@@ -1,5 +1,5 @@
-:host
- max-height: 85%
+*:host
+ height: calc(100% - 60px)
.ifc-base-view--container
display: flex
diff --git a/frontend/src/app/modules/ifc_models/ifc-base-view/ifc-base-view.component.ts b/frontend/src/app/modules/ifc_models/ifc-base-view/ifc-base-view.component.ts
index 0219b7ef90c..d9f2464249a 100644
--- a/frontend/src/app/modules/ifc_models/ifc-base-view/ifc-base-view.component.ts
+++ b/frontend/src/app/modules/ifc_models/ifc-base-view/ifc-base-view.component.ts
@@ -45,11 +45,12 @@ export class IfcBaseViewComponent {
constructor() {
this.configuration = {
actionsColumnEnabled: false,
- columnMenuEnabled: true,
+ columnMenuEnabled: false,
contextMenuEnabled: false,
inlineCreateEnabled: false,
withFilters: true,
showFilterButton: false,
+ isCardView: true
};
this.filters.push({ status: {