argos/dmp-frontend/src/app/ui/dmp/editor/available-profiles/available-profiles.componen...

17 lines
805 B
HTML
Raw Normal View History

<h4 mat-dialog-title>{{ 'DMP-EDITOR.DATASET-TEMPLATE-LIST.TITLE' | translate }}</h4>
2018-11-29 15:19:08 +01:00
<div mat-dialog-content>
<mat-selection-list #datasetsprofiles [ngModel]="selectedOptions" >
Description boxes in admin forms replaced with rich text editor <angular-editor>. 1. dataset-profile-editor-composite-field.component.ts & dataset-profile-editor-section.component.ts & dataset-profile-editor.component.ts: Initialize AngularEditorConfig. 2. dataset-profile-editor-composite-field.component.html & dataset-profile-editor-section.component.html & dataset-profile-editor.component.html: Use <angular-editor> in description. 3. multiple-auto-complete.component.html & dataset-profile-listing.component.html & form-section.component.html: Show description as html. 4. dataset-profile.module.ts: Imported HttpClientModule, AngularEditorModule (needed for <angular-editor>). 5. available-profiles.component.html: Show description as html, under the Dataset Template title, not as tooltip (matTooltip does not receive html). 6. available-profiles.component.ts: Added styleUrls: ['available-profiles.component.scss']. 7. available-profiles.component.scss: [NEW] Added css for class "list-option" to cut description if too long. 8. form-composite-title.component.html: Show description and extendedDescription as html | Add view more/less functionality to show/hide extendedDescription. 9. form-composite-title.component.ts: Added "public showExtendedDescription: boolean = false;" field. 10. form-composite-title.component.scss: Added css for "more" class, to make "view more/less" seem like link. 11. assets/i18n/: In language files added DATASET-EDITOR.QUESTION.EXTENDED-DESCRIPTION.VIEW-MORE (-LESS). 12. assets/styles.css: Added css for <angular-editor>, to be similar to the other text areas and forms.
2021-10-12 17:14:22 +02:00
<mat-list-option *ngFor="let profile of profiles" [value]="profile" [selected]='isOptionSelected(profile)' class="mb-1">
<div class="list-option">
{{profile.label}}
<br *ngIf="profile.description">
<small *ngIf="profile.description" [innerHTML]="profile.description"></small>
</div>
2018-11-29 15:19:08 +01:00
</mat-list-option>
</mat-selection-list>
<p>
{{ 'DMP-EDITOR.DATASET-TEMPLATE-LIST.TEXT' | translate }} {{datasetsprofiles.selectedOptions.selected.length}}
2018-11-29 15:19:08 +01:00
</p>
2019-11-06 15:30:15 +01:00
<button mat-raised-button color="primary" (click)="addProfiles(datasetsprofiles)">{{ 'DMP-EDITOR.DATASET-TEMPLATE-LIST.OK' | translate }}</button>
2018-11-29 15:19:08 +01:00
</div>