Merge branch 'implementation/41849-adapt-the-style-of-the-attachments-section-to-the-new-designs' into implementation/42160-add-download-file-direct-action-to-hover-menu
commit
e2601b02ad
@ -1,39 +1,49 @@ |
||||
<li |
||||
class="form--selected-value--container work-package--attachments--draggable-item" |
||||
opFocusWithin=".inplace-editing--trigger-icon" |
||||
draggable="true" |
||||
data-qa-selector="op-attachment-list-item" |
||||
(dragstart)="setDragData($event)" |
||||
[title]="text.dragHint" |
||||
> |
||||
<span class="form--selected-value"> |
||||
<op-icon icon-classes="icon-context icon-attachment"></op-icon> |
||||
<a |
||||
class="work-package--attachments--filename" |
||||
target="_blank" |
||||
rel="noopener" |
||||
[attr.href]="downloadPath || '#'"> |
||||
<div class="spot-list--item-floating-wrapper"> |
||||
<a |
||||
class="spot-list--item-action op-files-tab--file-list-item-action" |
||||
[href]="attachment._links.staticDownloadLocation.href" |
||||
target="_blank" |
||||
(dragstart)="setDragData($event)" |
||||
> |
||||
<span |
||||
class="spot-icon spot-icon_{{fileIcon.icon}} op-files-tab--icon_{{fileIcon.clazz}}" |
||||
></span> |
||||
|
||||
{{ fileName }} |
||||
<span |
||||
[textContent]="attachment.fileName" |
||||
[title]="attachment.fileName" |
||||
class="spot-list--item-title op-files-tab--file-list-item-title" |
||||
data-qa-selector="op-files-tab--file-list-item-title" |
||||
></span> |
||||
|
||||
<op-authoring |
||||
class="work-package--attachments--info" |
||||
[createdOn]="attachment.createdAt" |
||||
[author]="author$ | async" |
||||
[showAuthorAsLink]="false" |
||||
></op-authoring> |
||||
</a> |
||||
</span> |
||||
<a |
||||
href="" |
||||
class="form--selected-value--remover work-package--attachments--delete-button" |
||||
*ngIf="!!attachment._links.delete" |
||||
(click)="confirmRemoveAttachment($event)"> |
||||
<op-icon |
||||
icon-classes="icon-delete" |
||||
[icon-title]="deleteIconTitle" |
||||
></op-icon> |
||||
<span |
||||
class="op-files-tab--file-list-item-text op-files-tab--color-grey" |
||||
[textContent]="timestampText" |
||||
></span> |
||||
|
||||
<div |
||||
#avatar |
||||
class="op-files-tab--file-list-item-avatar" |
||||
></div> |
||||
</a> |
||||
<div class="spot-list--item-floating-actions op-files-tab--file-list-item-floating-actions"> |
||||
<a |
||||
class="spot-link" |
||||
[title]="(author$ | async)?.name" |
||||
[href]="(author$ | async)?._links.showUser.href" |
||||
> |
||||
<span class="spot-icon spot-icon_user"></span> |
||||
</a> |
||||
<button |
||||
*ngIf="!!this.attachment._links.delete" |
||||
class="spot-link" |
||||
[title]="deleteIconTitle" |
||||
(click)="confirmRemoveAttachment($event)" |
||||
> |
||||
<span class="spot-icon spot-icon_delete"></span> |
||||
</button> |
||||
</div> |
||||
</div> |
||||
|
||||
<input type="hidden" name="attachments[{{index}}][id]" value="{{attachment.id}}"> |
||||
</li> |
||||
<!-- Needed, if attachment-list-item is used within a form, to provide the added attachment to the serializer. --> |
||||
<input type="hidden" name="attachments[{{index}}][id]" value="{{attachment.id}}"> |
||||
|
@ -1,10 +1,16 @@ |
||||
<div class="work-package--attachments--files" *ngIf="resource"> |
||||
<ul class="form--selected-value--list" |
||||
*ngFor="let attachment of $attachments | async; trackBy:trackByFileName; let i = index;"> |
||||
<op-attachment-list-item [attachment]="attachment" |
||||
[resource]="resource" |
||||
[index]="i" |
||||
(removeAttachment)="removeAttachment(attachment)"> |
||||
</op-attachment-list-item> |
||||
<div |
||||
*ngIf="resource" |
||||
class="work-package--attachments--files op-attachments-list" |
||||
> |
||||
<ul class="spot-list spot-list_compact op-files-tab--file-list"> |
||||
<li |
||||
*ngFor="let attachment of $attachments | async; let i = index;" |
||||
op-attachment-list-item |
||||
class="spot-list--item op-files-tab--file-list-item" |
||||
data-qa-selector="op-attachment-list-item" |
||||
[attachment]="attachment" |
||||
[index]="i" |
||||
(removeAttachment)="removeAttachment(attachment)" |
||||
></li> |
||||
</ul> |
||||
</div> |
||||
|
Loading…
Reference in new issue