alfresco-ng2-components/lib/core/src/lib/comments/comments.component.html
2024-07-03 16:16:47 +01:00

35 lines
1.3 KiB
HTML

<div class="adf-comments-container">
<div id="comment-header" class="adf-comments-header adf-comments-divider">
{{'COMMENTS.HEADER' | translate: { count: comments?.length } }}
</div>
<div *ngIf="!readOnly" class="adf-comments-input-container adf-comments-divider">
<mat-form-field class="adf-comments-form-field" subscriptSizing="dynamic">
<mat-label>{{'COMMENTS.ADD' | translate}}</mat-label>
<textarea
matInput
id="comment-input"
[attr.aria-label]="'COMMENTS.ADD' | translate"
[(ngModel)]="message"
(keydown.escape)="clearMessage($event)"
>
</textarea>
</mat-form-field>
<div class="adf-comments-input-actions">
<button
mat-button
class="adf-comments-input-add"
data-automation-id="comments-input-add"
color="primary"
(click)="addComment()"
[disabled]="!message"
>
{{ 'COMMENTS.ADD' | translate }}
</button>
</div>
</div>
<adf-comment-list *ngIf="comments?.length > 0" [comments]="comments">
</adf-comment-list>
</div>