make comment exportable if readable

conditions for the export button:
- comment is present and  readable for user
- comment is not in 'edit' mode
This commit is contained in:
Maximilian Krambach 2019-04-26 12:45:57 +02:00
parent 7ed59a57b0
commit f16884388e

View File

@ -1,5 +1,9 @@
<div class="text-warning" *ngFor="let section of sections"> <div class="text-warning" *ngFor="let section of sections">
<os-meta-text-block *ngIf="sectionVisible(section)" [showActionRow]="canEditSection(section)" icon="comment"> <os-meta-text-block
*ngIf="sectionVisible(section)"
[showActionRow]="canEditSection(section) || comments[section.id].comment"
icon="comment"
>
<ng-container class="meta-text-block-title"> <ng-container class="meta-text-block-title">
<span>{{ section.getTitle() }}</span> <span>{{ section.getTitle() }}</span>
</ng-container> </ng-container>
@ -21,7 +25,7 @@
<ng-container class="meta-text-block-action-row"> <ng-container class="meta-text-block-action-row">
<button <button
mat-icon-button mat-icon-button
*ngIf="!isCommentEdited(section)" *ngIf="!isCommentEdited(section) && canEditSection(section)"
(click)="editComment(section)" (click)="editComment(section)"
matTooltip="{{ 'Edit' | translate }}" matTooltip="{{ 'Edit' | translate }}"
> >
@ -29,7 +33,7 @@
</button> </button>
<button <button
mat-icon-button mat-icon-button
*ngIf="!isEditMode && comments[section.id]?.comment" *ngIf="!commentForms[section.id] && comments[section.id]?.comment"
(click)="pdfExportSection(section)" (click)="pdfExportSection(section)"
matTooltip="{{ 'Export comment' | translate }}" matTooltip="{{ 'Export comment' | translate }}"
> >