mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
* add stylelint * fix style first part * fix style second part * fix style third part * fix style fourth part * Fix e2e tests first part * Fix e2e tests second part * Rebase branch * fix style third part * fix style fourth part * Fix list error * fix insights * fix style abotu component * Fix e2e tests second part * Rebase branch * fix style third part * fix style fourth part * Fix list error * Fix e2e tests second part * Rebase branch * fix style third part * fix style fourth part * Fix list error * [ADF-3746] Rebase branch * Fix e2e tests second part * Rebase branch * fix style third part * fix style fourth part * Fix list error * Fix e2e tests second part * Rebase branch * Fix list error * fix new style added * tslint fix * [ADF-3746] Fix scss errors on Process Filters Cloud component
59 lines
3.1 KiB
HTML
59 lines
3.1 KiB
HTML
<div [attr.data-automation-id]="'card-key-value-pairs-label-' + property.key" class="adf-property-label">{{ property.label | translate }}</div>
|
|
<div class="adf-property-value">
|
|
|
|
<div *ngIf="isEditable()">
|
|
{{ 'CORE.CARDVIEW.KEYVALUEPAIRS.ADD' | translate }}
|
|
<button (click)="add()" mat-icon-button class="adf-card-view__key-value-pairs__add-btn" [attr.data-automation-id]="'card-key-value-pairs-button-' + property.key">
|
|
<mat-icon>add</mat-icon>
|
|
</button>
|
|
</div>
|
|
|
|
<div *ngIf="!isEditable()" class="adf-card-view__key-value-pairs__read-only">
|
|
<mat-table #table [dataSource]="matTableValues" class="mat-elevation-z8">
|
|
<ng-container matColumnDef="name">
|
|
<mat-header-cell *matHeaderCellDef>{{ 'CORE.CARDVIEW.KEYVALUEPAIRS.NAME' | translate }}</mat-header-cell>
|
|
<mat-cell *matCellDef="let item">{{item.name}}</mat-cell>
|
|
</ng-container>
|
|
<ng-container matColumnDef="value">
|
|
<mat-header-cell *matHeaderCellDef>{{ 'CORE.CARDVIEW.KEYVALUEPAIRS.VALUE' | translate }}</mat-header-cell>
|
|
<mat-cell *matCellDef="let item">{{item.value}}</mat-cell>
|
|
</ng-container>
|
|
|
|
<mat-header-row *matHeaderRowDef="['name', 'value']"></mat-header-row>
|
|
<mat-row *matRowDef="let row; columns: ['name', 'value'];"></mat-row>
|
|
</mat-table>
|
|
</div>
|
|
|
|
|
|
<div class="adf-card-view__key-value-pairs" *ngIf="isEditable() && values && values.length">
|
|
<div class="adf-card-view__key-value-pairs__row">
|
|
<div class="adf-card-view__key-value-pairs__col">{{ 'CORE.CARDVIEW.KEYVALUEPAIRS.NAME' | translate }}</div>
|
|
<div class="adf-card-view__key-value-pairs__col">{{ 'CORE.CARDVIEW.KEYVALUEPAIRS.VALUE' | translate }}</div>
|
|
</div>
|
|
|
|
<div class="adf-card-view__key-value-pairs__row" *ngFor="let item of values; let i = index">
|
|
<div class="adf-card-view__key-value-pairs__col">
|
|
<mat-form-field class="adf-example-full-width">
|
|
<input matInput
|
|
placeholder="{{ 'CORE.CARDVIEW.KEYVALUEPAIRS.NAME' | translate }}"
|
|
(blur)="onBlur(item.value)"
|
|
[attr.data-automation-id]="'card-'+ property.key +'-name-input-' + i"
|
|
[(ngModel)]="values[i].name">
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="adf-card-view__key-value-pairs__col">
|
|
<mat-form-field class="adf-example-full-width">
|
|
<input matInput
|
|
placeholder="{{ 'CORE.CARDVIEW.KEYVALUEPAIRS.VALUE' | translate }}"
|
|
(blur)="onBlur(item.value)"
|
|
[attr.data-automation-id]="'card-'+ property.key +'-value-input-' + i"
|
|
[(ngModel)]="values[i].value">
|
|
</mat-form-field>
|
|
</div>
|
|
<button mat-icon-button (click)="remove(i)" class="adf-card-view__key-value-pairs__remove-btn">
|
|
<mat-icon>close</mat-icon>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|