mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
166 lines
6.1 KiB
HTML
166 lines
6.1 KiB
HTML
<alfresco-upload-drag-area
|
|
[showUploadDialog]="true"
|
|
[currentFolderPath]="currentPath"
|
|
[uploaddirectory]="currentPath"
|
|
(onSuccess)="documentList.reload()">
|
|
<alfresco-document-list-breadcrumb
|
|
[currentFolderPath]="currentPath"
|
|
[target]="documentList">
|
|
</alfresco-document-list-breadcrumb>
|
|
<alfresco-document-list
|
|
#documentList
|
|
[currentFolderPath]="currentPath"
|
|
(preview)="showFile($event)"
|
|
(folderChange)="onFolderChanged($event)">
|
|
<!--
|
|
<empty-folder-content>
|
|
<template>
|
|
<h1>Sorry, no content here</h1>
|
|
</template>
|
|
</empty-folder-content>
|
|
-->
|
|
<content-columns>
|
|
<content-column source="$thumbnail" type="image"></content-column>
|
|
<content-column
|
|
title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}"
|
|
source="name"
|
|
class="full-width name-column">
|
|
</content-column>
|
|
<!--
|
|
<content-column
|
|
title="Type"
|
|
source="content.mimeType">
|
|
</content-column>
|
|
-->
|
|
<content-column
|
|
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_BY' | translate}}"
|
|
source="createdByUser.displayName"
|
|
class="desktop-only">
|
|
</content-column>
|
|
<content-column
|
|
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_ON' | translate}}"
|
|
source="createdAt"
|
|
type="date"
|
|
format="medium"
|
|
class="desktop-only">
|
|
</content-column>
|
|
</content-columns>
|
|
|
|
<content-actions>
|
|
<!-- folder actions -->
|
|
<content-action
|
|
target="folder"
|
|
type="button"
|
|
icon="delete"
|
|
handler="system1">
|
|
</content-action>
|
|
<content-action
|
|
target="folder"
|
|
type="menu"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.SYSTEM_1' | translate}}"
|
|
handler="system1">
|
|
</content-action>
|
|
<content-action
|
|
target="folder"
|
|
type="menu"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.CUSTOM' | translate}}"
|
|
(execute)="myFolderAction1($event)">
|
|
</content-action>
|
|
<content-action
|
|
target="folder"
|
|
type="menu"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.DELETE' | translate}}"
|
|
handler="delete">
|
|
</content-action>
|
|
|
|
<!-- document actions -->
|
|
<content-action
|
|
target="document"
|
|
type="button"
|
|
icon="account_circle"
|
|
handler="my-handler">
|
|
</content-action>
|
|
<content-action
|
|
target="document"
|
|
type="button"
|
|
icon="cloud_download"
|
|
handler="download">
|
|
</content-action>
|
|
<content-action
|
|
target="document"
|
|
type="menu"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.DOWNLOAD' | translate}}"
|
|
handler="download">
|
|
</content-action>
|
|
<content-action
|
|
target="document"
|
|
type="menu"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.SYSTEM_2' | translate}}"
|
|
handler="system2">
|
|
</content-action>
|
|
<content-action
|
|
target="document"
|
|
type="menu"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.CUSTOM' | translate}}"
|
|
(execute)="myCustomAction1($event)">
|
|
</content-action>
|
|
<content-action
|
|
target="document"
|
|
type="menu"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.DELETE' | translate}}"
|
|
handler="delete">
|
|
</content-action>
|
|
</content-actions>
|
|
</alfresco-document-list>
|
|
</alfresco-upload-drag-area>
|
|
|
|
<context-menu-holder></context-menu-holder>
|
|
|
|
<div class="p-10">
|
|
<ul>
|
|
<li>Current path: {{documentList.currentFolderPath}}</li>
|
|
<li>
|
|
<button (click)="documentList.changePath('/Sites/swsdp/documentLibrary/Agency Files/Contracts')">Go to agency contracts</button>
|
|
</li>
|
|
<li>
|
|
<button (click)="documentList.changePath('/')">Go to root</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
<h5>Single file upload</h5>
|
|
<alfresco-upload-button data-automation-id="single-file-upload"
|
|
[uploaddirectory]="currentPath"
|
|
[currentFolderPath]="currentPath"
|
|
(onSuccess)="documentList.reload()">
|
|
</alfresco-upload-button>
|
|
|
|
<h5>Folder upload</h5>
|
|
<alfresco-upload-button data-automation-id="folder-upload"
|
|
[uploaddirectory]="currentPath"
|
|
[currentFolderPath]="currentPath"
|
|
[uploadFolders]="true"
|
|
(onSuccess)="documentList.reload()">
|
|
</alfresco-upload-button>
|
|
|
|
<h5>Multiple file upload</h5>
|
|
<input type="text" data-automation-id="accepted-files-type" [(ngModel)]="acceptedFilesType">
|
|
<alfresco-upload-button data-automation-id="multiple-file-upload"
|
|
[uploaddirectory]="currentPath"
|
|
[currentFolderPath]="currentPath"
|
|
acceptedFilesType="{{acceptedFilesType}}"
|
|
[multipleFiles]="true"
|
|
(onSuccess)="documentList.reload()">
|
|
</alfresco-upload-button>
|
|
|
|
<alfresco-viewer [(showViewer)]="fileShowed"
|
|
[urlFile]="urlFile"
|
|
[fileName]="fileName"
|
|
[mimeType]="mimeType"
|
|
[overlayMode]="true">
|
|
<div class="mdl-spinner mdl-js-spinner is-active"></div>
|
|
</alfresco-viewer>
|
|
<file-uploading-dialog></file-uploading-dialog>
|