alfresco-ng2-components/lib/content-services/content-node-selector/content-node-selector.component.html
suzanadirla edaa442e18 [ADF-1949 ] Allow customization of the dropdown menu on document picker (#2660)
* [ADF-1949] Allow customization of the dropdown menu on document picker

- add as input properties the 'dropdownHideMyFiles' and the 'dropdownSiteList' to the destination picker, so the list of sites from the dropdown can be customized, if wanted
- add navigation on '-mysites-' entries on document-list
- use custom dropdown on the copy/move document picker

* [ADF-1949] do not use a custom dropdown on the copy/move document picker on ADF side, because this can be done only on ACA side

* [ADF-1949] handling the node-dblclick event on content-node-selector.component instead of doing it on the document-list component

- and update the sites-dropdown documentation file

* [ADF-1949] changes requested on code review

* [ADF-1949] fix failing tests
2017-11-20 12:10:38 +00:00

103 lines
4.0 KiB
HTML

<header matDialogTitle
class="adf-content-node-selector-title"
data-automation-id="content-node-selector-title">{{title}}</header>
<section matDialogContent
class="adf-content-node-selector-content"
(node-select)="onNodeSelect($event)">
<mat-form-field floatPlaceholder="never" class="adf-content-node-selector-content-input">
<input #searchInput
matInput
placeholder="Search"
(input)="search(searchInput.value)"
[value]="searchTerm"
data-automation-id="content-node-selector-search-input">
<mat-icon *ngIf="searchTerm.length > 0"
matSuffix (click)="clear()"
class="adf-content-node-selector-content-input-icon"
data-automation-id="content-node-selector-search-clear">clear</mat-icon>
<mat-icon *ngIf="searchTerm.length === 0"
matSuffix
class="adf-content-node-selector-content-input-icon"
data-automation-id="content-node-selector-search-icon">search</mat-icon>
</mat-form-field>
<adf-sites-dropdown
(change)="siteChanged($event)"
[hideMyFiles]="dropdownHideMyFiles"
[siteList]="dropdownSiteList"
data-automation-id="content-node-selector-sites-combo"></adf-sites-dropdown>
<adf-toolbar>
<adf-toolbar-title>
<adf-dropdown-breadcrumb *ngIf="needBreadcrumbs()"
class="adf-content-node-selector-content-breadcrumb"
(navigate)="clear()"
[target]="documentList"
[folderNode]="breadcrumbFolderNode"
data-automation-id="content-node-selector-content-breadcrumb">
</adf-dropdown-breadcrumb>
</adf-toolbar-title>
</adf-toolbar>
<div class="adf-content-node-selector-content-list" data-automation-id="content-node-selector-content-list">
<adf-document-list
#documentList
adf-highlight
adf-highlight-selector=".cell-value adf-datatable-cell .adf-datatable-cell-value"
[node]="nodes"
[maxItems]="pageSize"
[skipCount]="skipCount"
[enableInfiniteScrolling]="infiniteScroll"
[rowFilter]="rowFilter"
[imageResolver]="imageResolver"
[currentFolderId]="folderIdToShow"
selectionMode="single"
[contextMenuActions]="false"
[contentActions]="false"
[allowDropFiles]="false"
(folderChange)="onFolderChange()"
(ready)="onFolderLoaded($event)"
(node-dblclick)="onNodeDoubleClick($event)"
data-automation-id="content-node-selector-document-list">
<empty-folder-content>
<ng-template>
<div>{{ 'NODE_SELECTOR.NO_RESULTS' | translate }}</div>
</ng-template>
</empty-folder-content>
</adf-document-list>
<adf-infinite-pagination
[pagination]="pagination"
[pageSize]="pageSize"
[loading]="loadingSearchResults"
(loadMore)="getNextPageOfSearch($event)"
data-automation-id="content-node-selector-search-pagination">
{{ 'ADF-DOCUMENT-LIST.LAYOUT.LOAD_MORE' | translate }}
</adf-infinite-pagination>
</div>
</section>
<footer matDialogActions class="adf-content-node-selector-actions">
<button *ngIf="inDialog"
mat-button
class="adf-content-node-selector-actions-cancel"
(click)="close()"
data-automation-id="content-node-selector-actions-cancel">{{ 'NODE_SELECTOR.CANCEL' | translate }}
</button>
<button mat-button
[disabled]="!chosenNode"
class="adf-content-node-selector-actions-choose"
(click)="choose()"
data-automation-id="content-node-selector-actions-choose">{{ 'NODE_SELECTOR.CHOOSE' | translate }}
</button>
</footer>