|
1 |
| -<div class="forwarded-message-container"> |
2 |
| - <div class="left-border-line"></div> |
3 |
| - <div class="forwarded-message-content"> |
4 |
| - <span class="forwarded-message-channel fs-x-small d-flex align-items-center"> |
5 |
| - <fa-icon [icon]="faShare" class="item-icon" style="margin-right: 0.3rem" /> |
6 |
| - {{ 'artemisApp.metis.forward.forwardedFrom' | artemisTranslate }} {{ sourceName }} |
7 |
| - @if (viewButtonVisible) { |
8 |
| - <button |
9 |
| - type="button" |
10 |
| - class="btn btn-link p-0" |
11 |
| - style="width: fit-content; font-size: 0.7rem; margin-left: 0.2rem" |
12 |
| - (click)="onTriggerNavigateToPost()" |
13 |
| - jhiTranslate="artemisApp.metis.forward.viewConversation" |
14 |
| - ></button> |
15 |
| - } |
16 |
| - </span> |
17 |
| - <div class="forwarded-message-header"> |
18 |
| - <jhi-profile-picture |
19 |
| - imageSizeInRem="1.5" |
20 |
| - fontSizeInRem="0.6" |
21 |
| - imageId="user-profile-picture" |
22 |
| - defaultPictureId="user-default-profile-picture" |
23 |
| - [authorId]="originalPostDetails()?.author?.id" |
24 |
| - [authorName]="originalPostDetails()?.author?.name" |
25 |
| - [imageUrl]="addPublicFilePrefix(originalPostDetails()?.author?.imageUrl)" |
26 |
| - style="margin-right: 0.2rem" |
27 |
| - /> |
28 |
| - <span class="forwarded-message-author">{{ originalPostDetails()?.author?.name }}</span> |
29 |
| - <span class="post-header-date-separator">-</span> |
30 |
| - <span class="post-header-date"> |
31 |
| - @if (postingIsOfToday) { |
32 |
| - <span [jhiTranslate]="todayFlag ?? ''" id="today-flag" class="fs-x-small"></span> |
| 1 | +@if (hasOriginalPostBeenDeleted() || originalPostDetails()) { |
| 2 | + <div class="forwarded-message-container"> |
| 3 | + <div class="left-border-line"></div> |
| 4 | + <div class="forwarded-message-content"> |
| 5 | + <span class="forwarded-message-channel fs-x-small d-flex align-items-center"> |
| 6 | + <fa-icon [icon]="faShare" class="item-icon" style="margin-right: 0.3rem" /> |
| 7 | + <span [jhiTranslate]="'artemisApp.metis.forward.' + (hasOriginalPostBeenDeleted() ? 'forwardedFromUnknown' : 'forwardedFrom')"></span> {{ sourceName }} |
| 8 | + @if (viewButtonVisible) { |
| 9 | + <button |
| 10 | + type="button" |
| 11 | + class="btn btn-link p-0" |
| 12 | + style="width: fit-content; font-size: 0.7rem; margin-left: 0.2rem" |
| 13 | + (click)="onTriggerNavigateToPost()" |
| 14 | + jhiTranslate="artemisApp.metis.forward.viewConversation" |
| 15 | + ></button> |
33 | 16 | }
|
34 |
| - <span class="fs-x-small" [disableTooltip]="postingIsOfToday" ngbTooltip="{{ originalPostDetails()?.creationDate | artemisDate: 'time' }}"> |
35 |
| - {{ postingIsOfToday ? (originalPostDetails()?.creationDate | artemisDate: 'time') : (originalPostDetails()?.creationDate | artemisDate: 'short-date') }} |
36 |
| - </span> |
37 | 17 | </span>
|
| 18 | + @if (hasOriginalPostBeenDeleted()) { |
| 19 | + <div class="forwarded-message-missing-container"> |
| 20 | + <span class="forwarded-message-missing-label"> <span [jhiTranslate]="'artemisApp.metis.forward.forwardedMessageDeleted'"></span> {{ sourceName }} </span> |
| 21 | + </div> |
| 22 | + } @else { |
| 23 | + <div class="forwarded-message-header"> |
| 24 | + <jhi-profile-picture |
| 25 | + imageSizeInRem="1.5" |
| 26 | + fontSizeInRem="0.6" |
| 27 | + imageId="user-profile-picture" |
| 28 | + defaultPictureId="user-default-profile-picture" |
| 29 | + [authorId]="originalPostDetails()?.author?.id" |
| 30 | + [authorName]="originalPostDetails()?.author?.name" |
| 31 | + [imageUrl]="addPublicFilePrefix(originalPostDetails()?.author?.imageUrl)" |
| 32 | + style="margin-right: 0.2rem" |
| 33 | + /> |
| 34 | + <span class="forwarded-message-author">{{ originalPostDetails()?.author?.name }}</span> |
| 35 | + <span class="post-header-date-separator">-</span> |
| 36 | + <span class="post-header-date"> |
| 37 | + @if (postingIsOfToday) { |
| 38 | + <span [jhiTranslate]="todayFlag ?? ''" id="today-flag" class="fs-x-small"></span> |
| 39 | + } |
| 40 | + <span class="fs-x-small" [disableTooltip]="postingIsOfToday" ngbTooltip="{{ originalPostDetails()?.creationDate | artemisDate: 'time' }}" |
| 41 | + >{{ |
| 42 | + postingIsOfToday ? (originalPostDetails()?.creationDate | artemisDate: 'time') : (originalPostDetails()?.creationDate | artemisDate: 'short-date') |
| 43 | + }} |
| 44 | + </span> |
| 45 | + </span> |
| 46 | + </div> |
| 47 | + <div class="forwarded-message-body" id="messageContent" #messageContent [ngClass]="{ expanded: showFullForwardedMessage }"> |
| 48 | + <jhi-posting-content |
| 49 | + [previewMode]="false" |
| 50 | + [content]="originalPostDetails()!.content!" |
| 51 | + [author]="originalPostDetails()!.author!" |
| 52 | + [isEdited]="!!originalPostDetails()!.updatedDate" |
| 53 | + [posting]="originalPostDetails()!" |
| 54 | + [isReply]="false" |
| 55 | + [isSubscribeToMetis]="false" |
| 56 | + /> |
| 57 | + </div> |
| 58 | + @if (isContentLong) { |
| 59 | + <button type="button" class="btn btn-link p-0" style="width: fit-content; font-size: 0.7rem" (click)="toggleShowFullForwardedMessage()"> |
| 60 | + {{ showFullForwardedMessage ? ('artemisApp.metis.forward.showLess' | artemisTranslate) : ('artemisApp.metis.forward.showMore' | artemisTranslate) }} |
| 61 | + </button> |
| 62 | + } |
| 63 | + } |
38 | 64 | </div>
|
39 |
| - <div class="forwarded-message-body" id="messageContent" #messageContent [ngClass]="{ expanded: showFullForwardedMessage }"> |
40 |
| - <jhi-posting-content |
41 |
| - [previewMode]="false" |
42 |
| - [content]="originalPostDetails()!.content!" |
43 |
| - [author]="originalPostDetails()!.author!" |
44 |
| - [isEdited]="!!originalPostDetails()!.updatedDate" |
45 |
| - [posting]="originalPostDetails()!" |
46 |
| - [isReply]="false" |
47 |
| - [isSubscribeToMetis]="false" |
48 |
| - /> |
49 |
| - </div> |
50 |
| - @if (isContentLong) { |
51 |
| - <button type="button" class="btn btn-link p-0" style="width: fit-content; font-size: 0.7rem" (click)="toggleShowFullForwardedMessage()"> |
52 |
| - {{ showFullForwardedMessage ? ('artemisApp.metis.forward.showLess' | artemisTranslate) : ('artemisApp.metis.forward.showMore' | artemisTranslate) }} |
53 |
| - </button> |
54 |
| - } |
55 | 65 | </div>
|
56 |
| -</div> |
| 66 | +} |
0 commit comments