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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
use attributes-map for project details widget
ulferts3e6535bf221e
diff --git a/frontend/src/app/modules/grids/widgets/project-details/project-details.component.html b/frontend/src/app/modules/grids/widgets/project-details/project-details.component.htmlindex e0128132230..8949a428ed0 100644--- a/frontend/src/app/modules/grids/widgets/project-details/project-details.component.html+++ b/frontend/src/app/modules/grids/widgets/project-details/project-details.component.html@@ -9,7 +9,8 @@</widget-header><div class="grid--widget-content">- <div #contentContainer>+ <div class="attributes-map"+ #contentContainer></div><no-results *ngIf="noFields"[title]="text.noResults">diff --git a/frontend/src/app/modules/grids/widgets/project-details/project-details.component.ts b/frontend/src/app/modules/grids/widgets/project-details/project-details.component.tsindex c2a6174e504..fc8718a7b0c 100644--- a/frontend/src/app/modules/grids/widgets/project-details/project-details.component.ts+++ b/frontend/src/app/modules/grids/widgets/project-details/project-details.component.ts@@ -132,29 +132,18 @@ export class WidgetProjectDetailsComponent extends AbstractWidgetComponent implethis.contentContainer.nativeElement.innerHTML = '';fields.forEach(field => {- this.contentContainer.nativeElement.appendChild(this.displayKeyValue(field));+ this.renderKeyValue(field);});}- private displayKeyValue(field:DisplayField) {- const container = this.containerElement();-- container.appendChild(this.labelElement(field));- container.appendChild(this.valueElement(field));-- return container;- }-- private containerElement() {- const container = document.createElement('div');- container.classList.add('attributes-key-value');-- return container;+ private renderKeyValue(field:DisplayField) {+ this.contentContainer.nativeElement.appendChild(this.labelElement(field));+ this.contentContainer.nativeElement.appendChild(this.valueElement(field));}private labelElement(field:DisplayField) {const label = document.createElement('div');- label.classList.add('attributes-key-value--key');+ label.classList.add('attributes-map--key');label.innerText = field.label;return label;@@ -162,7 +151,7 @@ export class WidgetProjectDetailsComponent extends AbstractWidgetComponent impleprivate valueElement(field:DisplayField) {const value = document.createElement('div');- value.classList.add('attributes-key-value--value-container');+ value.classList.add('attributes-map--value');field.render(value, this.getText(field));return value;