mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* Add the permission check on the activiti button * Fix code after unit test * Add basic documentation
209 lines
9.2 KiB
HTML
209 lines
9.2 KiB
HTML
<div class="container">
|
|
<alfresco-upload-drag-area
|
|
[rootFolderId]="documentList.currentFolderId"
|
|
[versioning] = "versioning">
|
|
<alfresco-document-list-breadcrumb
|
|
[target]="documentList"
|
|
[folderNode]="documentList.folderNode">
|
|
</alfresco-document-list-breadcrumb>
|
|
<div *ngIf="errorMessage" class="error-message">
|
|
<button (click)="resetError()" class="mdl-button mdl-js-button mdl-button--icon">
|
|
<i class="material-icons">highlight_off</i>
|
|
</button>
|
|
<span class="error-message--text">{{errorMessage}}</span>
|
|
</div>
|
|
<alfresco-document-list
|
|
#documentList
|
|
[currentFolderId]="currentFolderId"
|
|
[contextMenuActions]="true"
|
|
[contentActions]="true"
|
|
[allowDropFiles]="true"
|
|
(error)="onNavigationError($event)"
|
|
(success)="resetError()"
|
|
(preview)="showFile($event)">
|
|
<data-columns>
|
|
<data-column key="$thumbnail" type="image" [sortable]="false"></data-column>
|
|
<data-column
|
|
title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}"
|
|
key="name"
|
|
class="full-width ellipsis-cell">
|
|
|
|
<!-- Example #1: using custom template with implicit access to data context -->
|
|
<!--
|
|
<template let-entry="$implicit">
|
|
<span>Hi! {{entry.data.getValue(entry.row, entry.col)}}</span>
|
|
</template>
|
|
-->
|
|
|
|
<!-- Example #2: using custom template with value access -->
|
|
<!--
|
|
<template let-value="value">
|
|
<span>Hi! {{value}}</span>
|
|
</template>
|
|
-->
|
|
|
|
</data-column>
|
|
<data-column
|
|
title="{{'DOCUMENT_LIST.COLUMNS.TAG' | translate}}"
|
|
key="id"
|
|
class="full-width ellipsis-cell">
|
|
<template let-entry="$implicit">
|
|
<alfresco-tag-node-list [nodeId]="entry.data.getValue(entry.row, entry.col)"></alfresco-tag-node-list>
|
|
</template>
|
|
</data-column>
|
|
<data-column
|
|
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_BY' | translate}}"
|
|
key="createdByUser.displayName"
|
|
class="desktop-only">
|
|
</data-column>
|
|
<data-column
|
|
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_ON' | translate}}"
|
|
key="createdAt"
|
|
type="date"
|
|
format="medium"
|
|
class="desktop-only">
|
|
</data-column>
|
|
</data-columns>
|
|
|
|
<content-actions>
|
|
<!-- folder actions -->
|
|
<content-action
|
|
target="folder"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.SYSTEM_1' | translate}}"
|
|
handler="system1">
|
|
</content-action>
|
|
<content-action
|
|
target="folder"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.CUSTOM' | translate}}"
|
|
(execute)="myFolderAction1($event)">
|
|
</content-action>
|
|
<content-action
|
|
target="folder"
|
|
permission="delete"
|
|
[disableWithNoPermission]="true"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.DELETE' | translate}}"
|
|
(permissionEvent)="onPermissionsFailed($event)"
|
|
handler="delete">
|
|
</content-action>
|
|
<!-- document actions -->
|
|
<content-action
|
|
target="document"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.DOWNLOAD' | translate}}"
|
|
handler="download">
|
|
</content-action>
|
|
<content-action
|
|
target="document"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.SYSTEM_2' | translate}}"
|
|
handler="system2">
|
|
</content-action>
|
|
<content-action
|
|
target="document"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.CUSTOM' | translate}}"
|
|
(execute)="myCustomAction1($event)">
|
|
</content-action>
|
|
<content-action
|
|
target="document"
|
|
permission="delete"
|
|
[disableWithNoPermission]="true"
|
|
(permissionEvent)="onPermissionsFailed($event)"
|
|
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.DELETE' | translate}}"
|
|
handler="delete">
|
|
</content-action>
|
|
<content-action
|
|
target="folder"
|
|
title="Activiti: View Form"
|
|
(execute)="viewActivitiForm($event)">
|
|
</content-action>
|
|
</content-actions>
|
|
</alfresco-document-list>
|
|
</alfresco-upload-drag-area>
|
|
</div>
|
|
|
|
<context-menu-holder></context-menu-holder>
|
|
|
|
<p class="options-container">
|
|
<label for="switch-multiple-file" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
|
<input type="checkbox" id="switch-multiple-file" class="mdl-switch__input" (change)="toggleMultipleFileUpload()" >
|
|
<span class="mdl-switch__label">Multiple File Upload</span>
|
|
</label>
|
|
</p>
|
|
|
|
|
|
<p class="options-container">
|
|
<label for="switch-folder-upload" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
|
<input type="checkbox" id="switch-folder-upload" class="mdl-switch__input" (change)="toggleFolder()">
|
|
<span class="mdl-switch__label">Folder Upload</span>
|
|
</label>
|
|
</p>
|
|
|
|
<p class="options-container">
|
|
<label for="switch-accepted-file-type" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
|
<input type="checkbox" id="switch-accepted-file-type" class="mdl-switch__input" (change)="toggleAcceptedFilesType()">
|
|
<span class="mdl-switch__label">Filter extension</span>
|
|
</label>
|
|
</p>
|
|
|
|
<p style="width:250px;margin: 20px;">
|
|
<label for="switch-versioning" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
|
<input type="checkbox" id="switch-versioning" class="mdl-switch__input" (change)="toggleVersioning()">
|
|
<span class="mdl-switch__label">Versioning</span>
|
|
</label>
|
|
</p>
|
|
|
|
<p class="options-container">
|
|
<label for="switch-disableWithNoPermission" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
|
<input type="checkbox" id="switch-disableWithNoPermission" class="mdl-switch__input" (change)="toggleDisableWithNoPermission()" >
|
|
<span class="mdl-switch__label">Disable upload</span>
|
|
</label>
|
|
</p>
|
|
|
|
<h5>Upload</h5>
|
|
<br>
|
|
<div *ngIf="acceptedFilesTypeShow">
|
|
<label class="mdl-input__label">Extension accepted
|
|
<input type="text" data-automation-id="accepted-files-type" [(ngModel)]="acceptedFilesType">
|
|
</label>
|
|
<br/>
|
|
</div>
|
|
<div *ngIf="!acceptedFilesTypeShow">
|
|
<alfresco-upload-button #uploadButton
|
|
data-automation-id="multiple-file-upload"
|
|
[rootFolderId]="documentList.currentFolderId"
|
|
[multipleFiles]="multipleFileUpload"
|
|
[uploadFolders]="folderUpload"
|
|
[versioning] = "versioning"
|
|
[disableWithNoPermission]="disableWithNoPermission"
|
|
(permissionEvent)="onUploadPermissionFailed($event)">
|
|
<div class="mdl-spinner mdl-js-spinner is-active"></div>
|
|
</alfresco-upload-button>
|
|
</div>
|
|
<div *ngIf="acceptedFilesTypeShow">
|
|
<alfresco-upload-button #uploadButton
|
|
data-automation-id="multiple-file-upload"
|
|
[rootFolderId]="documentList.currentFolderId"
|
|
[acceptedFilesType]="acceptedFilesType"
|
|
[multipleFiles]="multipleFileUpload"
|
|
[uploadFolders]="folderUpload"
|
|
[versioning] = "versioning"
|
|
[disableWithNoPermission]="disableWithNoPermission"
|
|
(permissionEvent)="onUploadPermissionFailed($event)">
|
|
<div class="mdl-spinner mdl-js-spinner is-active"></div>
|
|
</alfresco-upload-button>
|
|
</div>
|
|
<file-uploading-dialog #fileDialog></file-uploading-dialog>
|
|
|
|
<div *ngIf="fileShowed">
|
|
<alfresco-viewer [(showViewer)]="fileShowed"
|
|
[fileNodeId]="fileNodeId"
|
|
[overlayMode]="true">
|
|
|
|
<extension-viewer [supportedExtensions]="['obj','3DS']" #extension>
|
|
<template let-urlFileContent="urlFileContent" let-extension="extension" >
|
|
<threed-viewer [urlFile]="urlFileContent" [extension]="extension" ></threed-viewer>
|
|
</template>
|
|
</extension-viewer>
|
|
|
|
</alfresco-viewer>
|
|
</div>
|
|
|