parent
fe323d9b6a
commit
8206602387
|
@ -48,67 +48,41 @@
|
|||
</div>
|
||||
<div class="col-12 mb-3 pt-2 gr-color" *ngIf="threads?.size > 0">{{'ANNOTATION-DIALOG.TITLE' | translate}}</div>
|
||||
<div class="col-12">
|
||||
<div *ngFor="let thread of threads" class="row">
|
||||
<!-- Parent Thread -->
|
||||
<div class="col-12">
|
||||
<div class="row parent-thread m-0 h-100">
|
||||
<div class="col-auto pr-0 pl-0">
|
||||
<div class="side-color"></div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row reply-content">
|
||||
<div class="col-12">
|
||||
<div class="row h-100">
|
||||
<div class="col-auto">
|
||||
<img class="profile-picture" src="/assets/images/user-profile-2.png" alt="profile-picture">
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<em class="col-auto user">{{'ANNOTATION-DIALOG.THREADS.FROM-USER' | translate}} {{getParentAnnotation(thread).author.name}}</em>
|
||||
<div class="col annotation-time">{{getParentAnnotation(thread).timeStamp | date:'EEEE, MMMM d, y, h:mm a'}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 annotation-full-text">{{getParentAnnotation(thread).payload}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-auto" *ngIf="getParentAnnotation(thread).protectionType === annotationProtectionTypeEnum.Private" matTooltip="{{'ANNOTATION-DIALOG.PROTECTION.PRIVATE' | translate}}"><i class="material-icons protection-icon icon-{{getAnnotationProtectionType(thread)}}"></i>{{getAnnotationProtectionType(thread)}}</div>
|
||||
<div class="col-auto" *ngIf="getParentAnnotation(thread).protectionType === annotationProtectionTypeEnum.EntityAccessors" matTooltip="{{'ANNOTATION-DIALOG.PROTECTION.ENTITY-ACCESSORS' | translate}}"><i class="material-icons protection-icon icon-{{getAnnotationProtectionType(thread)}}"></i>{{getAnnotationProtectionType(thread)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-container *ngFor="let thread of threads">
|
||||
<div class="row" *ngIf="getParentAnnotation(thread).protectionType === annotationProtectionTypeEnum.Private" matTooltip="{{'ANNOTATION-DIALOG.PROTECTION.PRIVATE' | translate}}">
|
||||
<div class="col-auto ml-auto">
|
||||
<i class="material-icons protection-icon icon-{{getAnnotationProtectionType(thread)}}"></i>{{getAnnotationProtectionType(thread)}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Previous Replies -->
|
||||
<div class="col-12">
|
||||
<div *ngFor="let annotation of annotationsPerThread[thread]; let i = index;" class="row replies">
|
||||
<div class="col-auto pr-0">
|
||||
<div class="col reply child"></div>
|
||||
<div class="col reply child dummy-for-next-child" *ngIf="i != annotationsPerThread[thread].length - 1"></div>
|
||||
</div>
|
||||
<div class="col pl-0 pt-1">
|
||||
<div class="parent row m-0">
|
||||
<div class="col-auto pl-0 pr-0">
|
||||
<div class="side-soft-color"></div>
|
||||
</div>
|
||||
<div class="col reply-content">
|
||||
<div class="row h-100">
|
||||
<div class="col-auto">
|
||||
<img class="profile-picture" src="/assets/images/user-profile-2.png" alt="profile-picture">
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-auto">
|
||||
<em class="gr-color">{{'ANNOTATION-DIALOG.THREADS.FROM-USER' | translate}}</em>
|
||||
{{annotation.author.name}}
|
||||
<div class="row ml-auto" *ngIf="getParentAnnotation(thread).protectionType === annotationProtectionTypeEnum.EntityAccessors" matTooltip="{{'ANNOTATION-DIALOG.PROTECTION.ENTITY-ACCESSORS' | translate}}">
|
||||
<div class="col-auto ml-auto">
|
||||
<i class="material-icons protection-icon icon-{{getAnnotationProtectionType(thread)}}"></i>{{getAnnotationProtectionType(thread)}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row thread mb-2">
|
||||
<!-- Parent Thread -->
|
||||
<div class="col-12">
|
||||
<div class="row parent-thread m-0 h-100">
|
||||
<div class="col-auto pr-0 pl-0">
|
||||
<div class="side-color"></div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row reply-content">
|
||||
<div class="col-12">
|
||||
<div class="row h-100">
|
||||
<div class="col-auto">
|
||||
<img class="profile-picture" src="/assets/images/user-profile-2.png" alt="profile-picture">
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<span class="col user">{{getParentAnnotation(thread).author.name}}</span>
|
||||
<div class="col-auto annotation-time">{{getParentAnnotation(thread).timeStamp | date: "d MMMM, y 'at' h:mm a"}}</div>
|
||||
<!-- <em class="col user">{{'ANNOTATION-DIALOG.THREADS.FROM-USER' | translate}} {{getParentAnnotation(thread).author.name}}</em> -->
|
||||
<!-- <div class="col annotation-time">{{getParentAnnotation(thread).timeStamp | date:'EEEE, MMMM d, y, h:mm a'}}</div> -->
|
||||
</div>
|
||||
<div class="row pt-1 pb-1">
|
||||
<div class="col-12 annotation-full-text">{{getParentAnnotation(thread).payload}}</div>
|
||||
</div>
|
||||
<div class="col annotation-time">{{annotation.timeStamp | date:'EEEE, MMMM d, y, h:mm a'}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 annotation-full-text">{{annotation.payload}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -116,33 +90,69 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Type reply in thread -->
|
||||
<!-- <div *ngIf="this.canEdit && !this.isDeleted" class="col-12"> -->
|
||||
<div class="col-12 mt-2">
|
||||
<div class="row new-reply mr-0">
|
||||
<!-- Previous Replies -->
|
||||
<div class="col-12">
|
||||
<div *ngFor="let annotation of annotationsPerThread[thread]; let i = index;" class="row replies">
|
||||
<div class="col-auto pr-0">
|
||||
<div class="col reply child"></div>
|
||||
<div class="col reply child dummy-for-next-child" *ngIf="i != annotationsPerThread[thread].length - 1"></div>
|
||||
</div>
|
||||
<div class="col pl-0 pt-1">
|
||||
<div class="parent row m-0">
|
||||
<div class="col-auto pl-0 pr-0">
|
||||
<div class="side-soft-color"></div>
|
||||
</div>
|
||||
<div class="col reply-content">
|
||||
<div class="row h-100">
|
||||
<div class="col-auto">
|
||||
<img class="profile-picture" src="/assets/images/user-profile-2.png" alt="profile-picture">
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="user">{{annotation.author.name}}</span>
|
||||
</div>
|
||||
<div class="col-auto annotation-time">{{annotation.timeStamp | date:"d MMMM, y 'at' h:mm a"}}</div>
|
||||
<!-- <div class="col annotation-time">{{annotation.timeStamp | date:'EEEE, MMMM d, y, h:mm a'}}</div> -->
|
||||
</div>
|
||||
<div class="row pt-1 pb-1">
|
||||
<div class="col-md-12 annotation-full-text">{{annotation.payload}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mat-form-field appearance="outline" class="col">
|
||||
<mat-label>{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}</mat-label>
|
||||
<input matInput [formControl]="this.threadReplyTextsFG[thread.toString()].get('replyText')" required>
|
||||
<mat-icon matSuffix class="material-symbols-outlined">
|
||||
add_reaction
|
||||
</mat-icon>
|
||||
</mat-form-field>
|
||||
<!--
|
||||
<mat-form-field class="col pt-2 pb-2 pr-0">
|
||||
<textarea matInput matTextareaAutosize matAutosizeMinRows="1" [formControl]="this.threadReplyTextsFG[thread.toString()].get('replyText')" placeholder="{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}"></textarea>
|
||||
<mat-error *ngIf="this.threadReplyTextsFG[thread.toString()]?.get('replyText')?.hasError('required')">{{'COMMONS.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field> -->
|
||||
<div class="col-auto send-msg">
|
||||
<button class="form-field-margin" mat-icon-button type="button" color="black" (click)="replyThread(thread)" matTooltip="{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}">
|
||||
<i class="fa fa-paper-plane"></i>
|
||||
</button>
|
||||
<!-- Type reply in thread -->
|
||||
<!-- <div *ngIf="this.canEdit && !this.isDeleted" class="col-12"> -->
|
||||
<div class="col-12 mt-2">
|
||||
<div class="row new-reply mr-0">
|
||||
|
||||
<mat-form-field appearance="outline" class="col">
|
||||
<mat-label>{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}</mat-label>
|
||||
<input matInput [formControl]="this.threadReplyTextsFG[thread.toString()].get('replyText')" required>
|
||||
<mat-icon matSuffix class="material-symbols-outlined">
|
||||
add_reaction
|
||||
</mat-icon>
|
||||
</mat-form-field>
|
||||
<!--
|
||||
<mat-form-field class="col pt-2 pb-2 pr-0">
|
||||
<textarea matInput matTextareaAutosize matAutosizeMinRows="1" [formControl]="this.threadReplyTextsFG[thread.toString()].get('replyText')" placeholder="{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}"></textarea>
|
||||
<mat-error *ngIf="this.threadReplyTextsFG[thread.toString()]?.get('replyText')?.hasError('required')">{{'COMMONS.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field> -->
|
||||
<div class="col-auto send-msg">
|
||||
<button class="form-field-margin" mat-icon-button type="button" color="black" (click)="replyThread(thread)" matTooltip="{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}">
|
||||
<i class="fa fa-paper-plane"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -75,3 +75,13 @@ $mat-card-header-size: 40px !default;
|
|||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.thread {
|
||||
padding: 1em 0 0 0;
|
||||
background-color: #F5F5F5;
|
||||
margin: 1em 0 0 0;
|
||||
}
|
||||
|
||||
.user {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue