[#42160] added new floating action for download

pull/10834/head
Eric Schubert 2 years ago
parent 5d4a47d890
commit 3b1b3c68b3
No known key found for this signature in database
GPG Key ID: 1D346C019BD4BAA2
  1. 1
      config/locales/js-en.yml
  2. 6
      frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.component.ts
  3. 6
      frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.html

@ -379,6 +379,7 @@ en:
label_description: "Description"
label_details: "Details"
label_display: "Display"
label_download_file: "Download %{fileName}"
label_cancel_comment: "Cancel comment"
label_closed_work_packages: "closed"
label_collapse: "Collapse"

@ -37,7 +37,6 @@ import {
Output,
ViewChild,
} from '@angular/core';
import { HalResource } from 'core-app/features/hal/resources/hal-resource';
import { IFileLink, IFileLinkOriginData } from 'core-app/core/state/file-links/file-link.model';
import {
getIconForMimeType,
@ -54,8 +53,6 @@ import { IFileIcon } from 'core-app/shared/components/file-links/file-link-icons
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class FileLinkListItemComponent implements OnInit, AfterViewInit {
@Input() public resource:HalResource;
@Input() public fileLink:IFileLink;
@Input() public index:number;
@ -75,6 +72,7 @@ export class FileLinkListItemComponent implements OnInit, AfterViewInit {
openFile: this.i18n.t('js.label_open_file_link'),
openFileLocation: this.i18n.t('js.label_open_file_link_location'),
removeFileLink: this.i18n.t('js.label_remove_file_link'),
downloadFileLink: '',
},
};
@ -94,6 +92,8 @@ export class FileLinkListItemComponent implements OnInit, AfterViewInit {
}
this.fileLinkIcon = getIconForMimeType(this.originData.mimeType);
this.text.title.downloadFileLink = this.i18n.t('js.label_download_file', { fileName: this.fileLink.originData.name });
}
ngAfterViewInit():void {

@ -26,6 +26,12 @@
></div>
</a>
<div class="spot-list--item-floating-actions op-files-tab--file-list-item-floating-actions">
<button
class="spot-link"
[title]="text.title.downloadFileLink"
>
<span class="spot-icon spot-icon_download"></span>
</button>
<a
class="spot-link"
[title]="text.title.openFileLocation"

Loading…
Cancel
Save