mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
use dynamic columns from ADF (#889)
* upgrade to latest ADF 3.0.0 alpha * migrate to ADF column components * use dynamic column from ADF * fix e2e tests
This commit is contained in:
@@ -28,46 +28,24 @@ import { CommonModule } from '@angular/common';
|
||||
import { GenericErrorComponent } from './generic-error/generic-error.component';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { LocationLinkComponent } from './location-link/location-link.component';
|
||||
import { NameColumnComponent } from './name-column/name-column.component';
|
||||
import { LibraryNameColumnComponent } from './library-name-column/library-name-column.component';
|
||||
import { LibraryStatusColumnComponent } from './library-status-column/library-status-column.component';
|
||||
import { LibraryRoleColumnComponent } from './library-role-column/library-role-column.component';
|
||||
import { TrashcanNameColumnComponent } from './trashcan-name-column/trashcan-name-column.component';
|
||||
import { DynamicColumnComponent } from './dynamic-column/dynamic-column.component';
|
||||
import { IconComponent } from './icon/icon.component';
|
||||
import { MatIconModule } from '@angular/material';
|
||||
import { ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, CoreModule.forChild(), MatIconModule],
|
||||
declarations: [
|
||||
GenericErrorComponent,
|
||||
LocationLinkComponent,
|
||||
NameColumnComponent,
|
||||
LibraryNameColumnComponent,
|
||||
LibraryStatusColumnComponent,
|
||||
LibraryRoleColumnComponent,
|
||||
TrashcanNameColumnComponent,
|
||||
DynamicColumnComponent,
|
||||
IconComponent
|
||||
imports: [
|
||||
CommonModule,
|
||||
CoreModule.forChild(),
|
||||
MatIconModule,
|
||||
ExtensionsModule
|
||||
],
|
||||
declarations: [GenericErrorComponent, LocationLinkComponent, IconComponent],
|
||||
exports: [
|
||||
ExtensionsModule,
|
||||
GenericErrorComponent,
|
||||
LocationLinkComponent,
|
||||
NameColumnComponent,
|
||||
LibraryNameColumnComponent,
|
||||
LibraryStatusColumnComponent,
|
||||
LibraryRoleColumnComponent,
|
||||
TrashcanNameColumnComponent,
|
||||
DynamicColumnComponent,
|
||||
IconComponent
|
||||
],
|
||||
entryComponents: [
|
||||
LocationLinkComponent,
|
||||
NameColumnComponent,
|
||||
LibraryNameColumnComponent,
|
||||
LibraryStatusColumnComponent,
|
||||
LibraryRoleColumnComponent,
|
||||
TrashcanNameColumnComponent
|
||||
]
|
||||
entryComponents: [LocationLinkComponent]
|
||||
})
|
||||
export class AppCommonModule {}
|
||||
|
@@ -1,108 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {
|
||||
Component,
|
||||
Input,
|
||||
OnInit,
|
||||
OnDestroy,
|
||||
ViewChild,
|
||||
ViewContainerRef,
|
||||
ComponentRef,
|
||||
ComponentFactoryResolver,
|
||||
OnChanges,
|
||||
SimpleChanges,
|
||||
ViewEncapsulation,
|
||||
ChangeDetectionStrategy
|
||||
} from '@angular/core';
|
||||
import { ExtensionService } from '@alfresco/adf-extensions';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dynamic-column',
|
||||
template: `
|
||||
<ng-container #content></ng-container>
|
||||
`,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
host: { class: 'app-dynamic-column' },
|
||||
styles: [
|
||||
`
|
||||
.app-dynamic-column {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
`
|
||||
]
|
||||
})
|
||||
export class DynamicColumnComponent implements OnInit, OnChanges, OnDestroy {
|
||||
@ViewChild('content', { read: ViewContainerRef })
|
||||
content: ViewContainerRef;
|
||||
|
||||
@Input()
|
||||
id: string;
|
||||
|
||||
@Input()
|
||||
context: any;
|
||||
|
||||
private componentRef: ComponentRef<any>;
|
||||
|
||||
constructor(
|
||||
private extensions: ExtensionService,
|
||||
private componentFactoryResolver: ComponentFactoryResolver
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
const componentType = this.extensions.getComponentById(this.id);
|
||||
if (componentType) {
|
||||
const factory = this.componentFactoryResolver.resolveComponentFactory(
|
||||
componentType
|
||||
);
|
||||
if (factory) {
|
||||
this.content.clear();
|
||||
this.componentRef = this.content.createComponent(factory, 0);
|
||||
this.updateInstance();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
if (changes.node) {
|
||||
this.updateInstance();
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
if (this.componentRef) {
|
||||
this.componentRef.destroy();
|
||||
this.componentRef = null;
|
||||
}
|
||||
}
|
||||
|
||||
private updateInstance() {
|
||||
if (this.componentRef && this.componentRef.instance) {
|
||||
this.componentRef.instance.context = this.context;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,102 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { LibraryNameColumnComponent } from './library-name-column.component';
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
|
||||
describe('LibraryNameColumnComponent', () => {
|
||||
let fixture: ComponentFixture<LibraryNameColumnComponent>;
|
||||
let component: LibraryNameColumnComponent;
|
||||
let node;
|
||||
|
||||
beforeEach(() => {
|
||||
node = <any>{
|
||||
id: 'nodeId',
|
||||
path: {
|
||||
elements: []
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule],
|
||||
declarations: [LibraryNameColumnComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(LibraryNameColumnComponent);
|
||||
component = fixture.componentInstance;
|
||||
});
|
||||
|
||||
describe('makeLibraryTooltip()', () => {
|
||||
it('maps tooltip to description', () => {
|
||||
node.description = 'description';
|
||||
const tooltip = component.makeLibraryTooltip(node);
|
||||
|
||||
expect(tooltip).toBe(node.description);
|
||||
});
|
||||
|
||||
it('maps tooltip to description', () => {
|
||||
node.title = 'title';
|
||||
const tooltip = component.makeLibraryTooltip(node);
|
||||
|
||||
expect(tooltip).toBe(node.title);
|
||||
});
|
||||
|
||||
it('sets tooltip to empty string', () => {
|
||||
const tooltip = component.makeLibraryTooltip(node);
|
||||
|
||||
expect(tooltip).toBe('');
|
||||
});
|
||||
});
|
||||
|
||||
describe('makeLibraryTitle()', () => {
|
||||
it('sets title with id when duplicate nodes title exists in list', () => {
|
||||
node.title = 'title';
|
||||
|
||||
const rows = [
|
||||
<any>{ node: { entry: { id: 'some-id', title: 'title' } } }
|
||||
];
|
||||
|
||||
const title = component.makeLibraryTitle(node, rows);
|
||||
expect(title).toContain('nodeId');
|
||||
});
|
||||
|
||||
it('sets title when no duplicate nodes title exists in list', () => {
|
||||
node.title = 'title';
|
||||
|
||||
const rows = [
|
||||
<any>{ node: { entry: { id: 'some-id', title: 'title-some-id' } } }
|
||||
];
|
||||
|
||||
const title = component.makeLibraryTitle(node, rows);
|
||||
|
||||
expect(title).toBe('title');
|
||||
});
|
||||
});
|
||||
});
|
@@ -1,98 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {
|
||||
Component,
|
||||
ChangeDetectionStrategy,
|
||||
ViewEncapsulation,
|
||||
OnInit,
|
||||
Input,
|
||||
ElementRef
|
||||
} from '@angular/core';
|
||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||
import { ShareDataRow } from '@alfresco/adf-content-services';
|
||||
|
||||
@Component({
|
||||
selector: 'app-library-name-column',
|
||||
template: `
|
||||
<span title="{{ displayTooltip }}" (click)="onClick()">
|
||||
{{ displayText }}
|
||||
</span>
|
||||
`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: { class: 'adf-datatable-cell dl-link app-library-name-column' }
|
||||
})
|
||||
export class LibraryNameColumnComponent implements OnInit {
|
||||
@Input()
|
||||
context: any;
|
||||
|
||||
displayTooltip: string;
|
||||
displayText: string;
|
||||
node: MinimalNodeEntity;
|
||||
|
||||
constructor(private element: ElementRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.node = this.context.row.node;
|
||||
const rows: Array<ShareDataRow> = this.context.data.rows || [];
|
||||
if (this.node && this.node.entry) {
|
||||
this.displayText = this.makeLibraryTitle(this.node.entry, rows);
|
||||
this.displayTooltip = this.makeLibraryTooltip(this.node.entry);
|
||||
}
|
||||
}
|
||||
|
||||
onClick() {
|
||||
this.element.nativeElement.dispatchEvent(
|
||||
new CustomEvent('name-click', {
|
||||
bubbles: true,
|
||||
detail: {
|
||||
node: this.node
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
makeLibraryTooltip(library: any): string {
|
||||
const { description, title } = library;
|
||||
|
||||
return description || title || '';
|
||||
}
|
||||
|
||||
makeLibraryTitle(library: any, rows: Array<ShareDataRow>): string {
|
||||
const entries = rows.map((r: ShareDataRow) => r.node.entry);
|
||||
const { title, id } = library;
|
||||
|
||||
let isDuplicate = false;
|
||||
|
||||
if (entries) {
|
||||
isDuplicate = entries.some((entry: any) => {
|
||||
return entry.id !== id && entry.title === title;
|
||||
});
|
||||
}
|
||||
|
||||
return isDuplicate ? `${title} (${id})` : `${title}`;
|
||||
}
|
||||
}
|
@@ -1,83 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { LibraryRoleColumnComponent } from './library-role-column.component';
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
|
||||
describe('LibraryNameColumnComponent', () => {
|
||||
let fixture: ComponentFixture<LibraryRoleColumnComponent>;
|
||||
let component: LibraryRoleColumnComponent;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule],
|
||||
declarations: [LibraryRoleColumnComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(LibraryRoleColumnComponent);
|
||||
component = fixture.componentInstance;
|
||||
});
|
||||
|
||||
it('should render Manager', () => {
|
||||
component.context = { row: { node: { entry: { role: 'SiteManager' } } } };
|
||||
fixture.detectChanges();
|
||||
expect(component.displayText).toBe('APP.SITES_ROLE.MANAGER');
|
||||
});
|
||||
|
||||
it('should render Collaborator', () => {
|
||||
component.context = {
|
||||
row: { node: { entry: { role: 'SiteCollaborator' } } }
|
||||
};
|
||||
fixture.detectChanges();
|
||||
expect(component.displayText).toBe('APP.SITES_ROLE.COLLABORATOR');
|
||||
});
|
||||
|
||||
it('should render Contributor', () => {
|
||||
component.context = {
|
||||
row: { node: { entry: { role: 'SiteContributor' } } }
|
||||
};
|
||||
fixture.detectChanges();
|
||||
expect(component.displayText).toBe('APP.SITES_ROLE.CONTRIBUTOR');
|
||||
});
|
||||
|
||||
it('should render Consumer', () => {
|
||||
component.context = {
|
||||
row: { node: { entry: { role: 'SiteConsumer' } } }
|
||||
};
|
||||
fixture.detectChanges();
|
||||
expect(component.displayText).toBe('APP.SITES_ROLE.CONSUMER');
|
||||
});
|
||||
|
||||
it('should not render text for unknown', () => {
|
||||
component.context = {
|
||||
row: { node: { entry: { role: 'ROLE' } } }
|
||||
};
|
||||
fixture.detectChanges();
|
||||
expect(component.displayText).toBe('');
|
||||
});
|
||||
});
|
@@ -1,65 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-library-role-column',
|
||||
template: `
|
||||
<span title="{{ displayText | translate }}">
|
||||
{{ displayText | translate }}
|
||||
</span>
|
||||
`
|
||||
})
|
||||
export class LibraryRoleColumnComponent implements OnInit {
|
||||
@Input()
|
||||
context: any;
|
||||
|
||||
displayText: string;
|
||||
|
||||
ngOnInit() {
|
||||
const node = this.context.row.node;
|
||||
if (node && node.entry) {
|
||||
const role: string = node.entry.role;
|
||||
switch (role) {
|
||||
case 'SiteManager':
|
||||
this.displayText = 'APP.SITES_ROLE.MANAGER';
|
||||
break;
|
||||
case 'SiteCollaborator':
|
||||
this.displayText = 'APP.SITES_ROLE.COLLABORATOR';
|
||||
break;
|
||||
case 'SiteContributor':
|
||||
this.displayText = 'APP.SITES_ROLE.CONTRIBUTOR';
|
||||
break;
|
||||
case 'SiteConsumer':
|
||||
this.displayText = 'APP.SITES_ROLE.CONSUMER';
|
||||
break;
|
||||
default:
|
||||
this.displayText = '';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,32 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { LibraryStatusColumnComponent } from './library-status-column.component';
|
||||
|
||||
describe('LibraryStatusColumnComponent', () => {
|
||||
it('should be defined', () => {
|
||||
expect(LibraryStatusColumnComponent).toBeDefined();
|
||||
});
|
||||
});
|
@@ -1,63 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-library-status-column',
|
||||
template: `
|
||||
<span title="{{ displayText | translate }}">
|
||||
{{ displayText | translate }}
|
||||
</span>
|
||||
`
|
||||
})
|
||||
export class LibraryStatusColumnComponent implements OnInit {
|
||||
@Input()
|
||||
context: any;
|
||||
|
||||
displayText: string;
|
||||
|
||||
ngOnInit() {
|
||||
const node = this.context.row.node;
|
||||
if (node && node.entry) {
|
||||
const visibility: string = node.entry.visibility;
|
||||
|
||||
switch (visibility.toUpperCase()) {
|
||||
case 'PUBLIC':
|
||||
this.displayText = 'LIBRARY.VISIBILITY.PUBLIC';
|
||||
break;
|
||||
case 'PRIVATE':
|
||||
this.displayText = 'LIBRARY.VISIBILITY.PRIVATE';
|
||||
break;
|
||||
case 'MODERATED':
|
||||
this.displayText = 'LIBRARY.VISIBILITY.MODERATED';
|
||||
break;
|
||||
default:
|
||||
this.displayText = 'UNKNOWN';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,32 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { NameColumnComponent } from './name-column.component';
|
||||
|
||||
describe('NameColumnComponent', () => {
|
||||
it('should be defined', () => {
|
||||
expect(NameColumnComponent).toBeDefined();
|
||||
});
|
||||
});
|
@@ -1,73 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {
|
||||
Component,
|
||||
Input,
|
||||
OnInit,
|
||||
ChangeDetectionStrategy,
|
||||
ViewEncapsulation,
|
||||
ElementRef
|
||||
} from '@angular/core';
|
||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||
|
||||
@Component({
|
||||
selector: 'app-name-column',
|
||||
template: `
|
||||
<span title="{{ node | adfNodeNameTooltip }}" (click)="onClick()">
|
||||
{{ displayText }}
|
||||
</span>
|
||||
`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: { class: 'adf-datatable-cell dl-link app-name-column' }
|
||||
})
|
||||
export class NameColumnComponent implements OnInit {
|
||||
@Input()
|
||||
context: any;
|
||||
|
||||
displayText: string;
|
||||
node: MinimalNodeEntity;
|
||||
|
||||
constructor(private element: ElementRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.node = this.context.row.node;
|
||||
if (this.node && this.node.entry) {
|
||||
this.displayText = this.node.entry.name || this.node.entry.id;
|
||||
}
|
||||
}
|
||||
|
||||
onClick() {
|
||||
this.element.nativeElement.dispatchEvent(
|
||||
new CustomEvent('name-click', {
|
||||
bubbles: true,
|
||||
detail: {
|
||||
node: this.node
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
@@ -1,114 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { TrashcanNameColumnComponent } from './trashcan-name-column.component';
|
||||
|
||||
describe('TrashcanNameColumnComponent', () => {
|
||||
let component;
|
||||
|
||||
beforeEach(() => {
|
||||
component = new TrashcanNameColumnComponent();
|
||||
});
|
||||
|
||||
it('should set displayText for content files', () => {
|
||||
const context = {
|
||||
data: { rows: [] },
|
||||
row: {
|
||||
node: {
|
||||
entry: {
|
||||
name: 'contentName',
|
||||
nodeType: 'content'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
component.context = context;
|
||||
component.ngOnInit();
|
||||
|
||||
expect(component.displayText).toBe('contentName');
|
||||
});
|
||||
|
||||
it('should set displayText for library', () => {
|
||||
const context = {
|
||||
data: {
|
||||
rows: []
|
||||
},
|
||||
row: {
|
||||
node: {
|
||||
entry: {
|
||||
nodeType: 'st:site',
|
||||
properties: {
|
||||
'cm:title': 'libraryTitle'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
component.context = context;
|
||||
component.ngOnInit();
|
||||
|
||||
expect(component.displayText).toBe('libraryTitle');
|
||||
});
|
||||
|
||||
it('should set custom displayText for libraries with same name', () => {
|
||||
const context = {
|
||||
data: {
|
||||
rows: [
|
||||
{
|
||||
node: {
|
||||
entry: {
|
||||
id: 'id1',
|
||||
name: 'name1',
|
||||
nodeType: 'st:site',
|
||||
properties: {
|
||||
'cm:title': 'bogus'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
row: {
|
||||
node: {
|
||||
entry: {
|
||||
id: 'id2',
|
||||
name: 'name1',
|
||||
nodeType: 'st:site',
|
||||
properties: {
|
||||
'cm:title': 'bogus'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
component.context = context;
|
||||
component.ngOnInit();
|
||||
|
||||
expect(component.displayText).toBe('bogus (name1)');
|
||||
});
|
||||
});
|
@@ -1,95 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {
|
||||
Component,
|
||||
ChangeDetectionStrategy,
|
||||
ViewEncapsulation,
|
||||
OnInit,
|
||||
Input
|
||||
} from '@angular/core';
|
||||
import { ShareDataRow } from '@alfresco/adf-content-services';
|
||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||
|
||||
@Component({
|
||||
selector: 'app-trashcan-name-column',
|
||||
template: `
|
||||
<ng-container *ngIf="!isLibrary">
|
||||
<span title="{{ node | adfNodeNameTooltip }}">{{ displayText }}</span>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="isLibrary">
|
||||
<span title="{{ displayTooltip }}">{{ displayText }}</span>
|
||||
</ng-container>
|
||||
`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: { class: 'adf-datatable-cell app-trashcan-name-column' }
|
||||
})
|
||||
export class TrashcanNameColumnComponent implements OnInit {
|
||||
@Input()
|
||||
context: any;
|
||||
|
||||
isLibrary = false;
|
||||
displayText: string;
|
||||
displayTooltip: string;
|
||||
node: MinimalNodeEntity;
|
||||
|
||||
ngOnInit() {
|
||||
this.node = this.context.row.node;
|
||||
const rows: Array<ShareDataRow> = this.context.data.rows || [];
|
||||
|
||||
if (this.node && this.node.entry) {
|
||||
this.isLibrary = this.node.entry.nodeType === 'st:site';
|
||||
|
||||
if (this.isLibrary) {
|
||||
const { properties } = this.node.entry;
|
||||
|
||||
this.displayText = this.makeLibraryTitle(this.node.entry, rows);
|
||||
this.displayTooltip =
|
||||
properties['cm:description'] || properties['cm:title'];
|
||||
} else {
|
||||
this.displayText = this.node.entry.name || this.node.entry.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
makeLibraryTitle(library: any, rows: Array<ShareDataRow>): string {
|
||||
const entries = rows.map((r: ShareDataRow) => r.node.entry);
|
||||
const { id } = library;
|
||||
const title = library.properties['cm:title'];
|
||||
|
||||
let isDuplicate = false;
|
||||
|
||||
if (entries) {
|
||||
isDuplicate = entries.some((entry: any) => {
|
||||
return entry.id !== id && entry.properties['cm:title'] === title;
|
||||
});
|
||||
}
|
||||
|
||||
return isDuplicate
|
||||
? `${library.properties['cm:title']} (${library.name})`
|
||||
: `${library.properties['cm:title']}`;
|
||||
}
|
||||
}
|
@@ -1,75 +1,101 @@
|
||||
<app-page-layout>
|
||||
<app-page-layout-header>
|
||||
<adf-breadcrumb root="APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.TITLE">
|
||||
</adf-breadcrumb>
|
||||
|
||||
<app-page-layout-header>
|
||||
<adf-breadcrumb root="APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.TITLE">
|
||||
</adf-breadcrumb>
|
||||
<adf-toolbar class="inline">
|
||||
<app-document-display-mode
|
||||
*ifExperimental="'cardview'"
|
||||
></app-document-display-mode>
|
||||
|
||||
<adf-toolbar class="inline">
|
||||
<app-document-display-mode *ifExperimental="'cardview'"></app-document-display-mode>
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
</app-page-layout-header>
|
||||
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
<app-page-layout-content>
|
||||
<div class="main-content">
|
||||
<adf-document-list
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
[node]="list"
|
||||
[loading]="isLoading"
|
||||
[loading]="dataIsLoading"
|
||||
selectionMode="single"
|
||||
[navigate]="false"
|
||||
[sorting]="['title', 'asc']"
|
||||
(node-dblclick)="navigateTo($event.detail?.node)"
|
||||
[imageResolver]="imageResolver"
|
||||
(name-click)="navigateTo($event.detail?.node)"
|
||||
>
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<adf-empty-content
|
||||
icon="library_books"
|
||||
[title]="
|
||||
'APP.BROWSE.LIBRARIES.EMPTY_STATE.FAVORITE_LIBRARIES.TITLE'
|
||||
"
|
||||
subtitle="APP.BROWSE.LIBRARIES.EMPTY_STATE.FAVORITE_LIBRARIES.TEXT"
|
||||
>
|
||||
</adf-empty-content>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
<ng-container
|
||||
*ngIf="column.template && !(column.desktopOnly && isSmallScreen)"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
<ng-template let-context>
|
||||
<adf-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context"
|
||||
>
|
||||
</adf-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
</app-page-layout-header>
|
||||
|
||||
<app-page-layout-content>
|
||||
<div class="main-content">
|
||||
<adf-document-list #documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
[node]="list"
|
||||
[loading]="isLoading"
|
||||
[loading]="dataIsLoading"
|
||||
selectionMode="single"
|
||||
[navigate]="false"
|
||||
[sorting]="[ 'title', 'asc' ]"
|
||||
(node-dblclick)="navigateTo($event.detail?.node)"
|
||||
[imageResolver]="imageResolver"
|
||||
(name-click)="navigateTo($event.detail?.node)">
|
||||
<ng-container
|
||||
*ngIf="!column.template && !(column.desktopOnly && isSmallScreen)"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<adf-empty-content icon="library_books" [title]="'APP.BROWSE.LIBRARIES.EMPTY_STATE.FAVORITE_LIBRARIES.TITLE'"
|
||||
subtitle="APP.BROWSE.LIBRARIES.EMPTY_STATE.FAVORITE_LIBRARIES.TEXT">
|
||||
</adf-empty-content>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
<adf-pagination
|
||||
[pagination]="pagination"
|
||||
(changePageSize)="onChangePageSize($event)"
|
||||
(changePageNumber)="onChange($event)"
|
||||
(nextPage)="onChange($event)"
|
||||
(prevPage)="onChange($event)"
|
||||
>
|
||||
</adf-pagination>
|
||||
</div>
|
||||
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
<ng-container *ngIf="column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column [key]="column.key" [title]="column.title" [type]="column.type" [format]="column.format"
|
||||
[class]="column.class" [sortable]="column.sortable">
|
||||
<ng-template let-context>
|
||||
<app-dynamic-column [id]="column.template" [context]="context">
|
||||
</app-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="!column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column [key]="column.key" [title]="column.title" [type]="column.type" [format]="column.format"
|
||||
[class]="column.class" [sortable]="column.sortable">
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
|
||||
<adf-pagination
|
||||
[pagination]="pagination"
|
||||
(changePageSize)="onChangePageSize($event)"
|
||||
(changePageNumber)="onChange($event)"
|
||||
(nextPage)="onChange($event)"
|
||||
(prevPage)="onChange($event)">
|
||||
</adf-pagination>
|
||||
</div>
|
||||
|
||||
<div class="sidebar" *ngIf="infoDrawerOpened$ | async">
|
||||
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
|
||||
</div>
|
||||
</app-page-layout-content>
|
||||
</app-page-layout>
|
||||
<div class="sidebar" *ngIf="(infoDrawerOpened$ | async)">
|
||||
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
|
||||
</div>
|
||||
</app-page-layout-content>
|
||||
</app-page-layout>
|
||||
|
@@ -1,81 +1,84 @@
|
||||
<app-page-layout>
|
||||
|
||||
<app-page-layout-header>
|
||||
<adf-breadcrumb root="APP.BROWSE.FAVORITES.TITLE">
|
||||
</adf-breadcrumb>
|
||||
<adf-breadcrumb root="APP.BROWSE.FAVORITES.TITLE"> </adf-breadcrumb>
|
||||
|
||||
<adf-toolbar class="inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
<adf-toolbar class="inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
</app-page-layout-header>
|
||||
|
||||
<app-page-layout-content>
|
||||
<div class="main-content">
|
||||
<adf-document-list #documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
currentFolderId="-favorites-"
|
||||
selectionMode="multiple"
|
||||
[navigate]="false"
|
||||
[sorting]="[ 'modifiedAt', 'desc' ]"
|
||||
(node-dblclick)="onNodeDoubleClick($event.detail?.node)"
|
||||
(name-click)="onNodeDoubleClick($event.detail?.node)">
|
||||
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<adf-empty-content
|
||||
icon="star_rate"
|
||||
[title]="'APP.BROWSE.FAVORITES.EMPTY_STATE.TITLE'"
|
||||
subtitle="APP.BROWSE.FAVORITES.EMPTY_STATE.TEXT">
|
||||
</adf-empty-content>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
|
||||
<ng-container *ngIf="column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
<ng-template let-context>
|
||||
<app-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context">
|
||||
</app-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="!column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
</data-column>
|
||||
</ng-container>
|
||||
<adf-document-list
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
currentFolderId="-favorites-"
|
||||
selectionMode="multiple"
|
||||
[navigate]="false"
|
||||
[sorting]="['modifiedAt', 'desc']"
|
||||
(node-dblclick)="onNodeDoubleClick($event.detail?.node)"
|
||||
(name-click)="onNodeDoubleClick($event.detail?.node)"
|
||||
>
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<adf-empty-content
|
||||
icon="star_rate"
|
||||
[title]="'APP.BROWSE.FAVORITES.EMPTY_STATE.TITLE'"
|
||||
subtitle="APP.BROWSE.FAVORITES.EMPTY_STATE.TEXT"
|
||||
>
|
||||
</adf-empty-content>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
<ng-container
|
||||
*ngIf="column.template && !(column.desktopOnly && isSmallScreen)"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
<ng-template let-context>
|
||||
<adf-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context"
|
||||
>
|
||||
</adf-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
|
||||
<ng-container
|
||||
*ngIf="!column.template && !(column.desktopOnly && isSmallScreen)"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
|
||||
<adf-pagination acaPagination [target]="documentList">
|
||||
</adf-pagination>
|
||||
<adf-pagination acaPagination [target]="documentList"> </adf-pagination>
|
||||
</div>
|
||||
|
||||
<div class="sidebar" *ngIf="infoDrawerOpened$ | async">
|
||||
<div class="sidebar" *ngIf="(infoDrawerOpened$ | async)">
|
||||
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
|
||||
</div>
|
||||
</app-page-layout-content>
|
||||
|
||||
</app-page-layout>
|
||||
|
@@ -1,10 +1,10 @@
|
||||
<app-page-layout [hasError]="!isValidPath">
|
||||
|
||||
<app-page-layout-header>
|
||||
<adf-breadcrumb
|
||||
[root]="title"
|
||||
[folderNode]="node"
|
||||
(navigate)="onBreadcrumbNavigate($event)">
|
||||
(navigate)="onBreadcrumbNavigate($event)"
|
||||
>
|
||||
</adf-breadcrumb>
|
||||
|
||||
<adf-toolbar class="inline">
|
||||
@@ -20,66 +20,71 @@
|
||||
|
||||
<app-page-layout-content>
|
||||
<div class="main-content">
|
||||
<adf-upload-drag-area
|
||||
[parentId]="node?.id"
|
||||
[disabled]="!canUpload">
|
||||
|
||||
<adf-document-list #documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
[sorting]="[ 'modifiedAt', 'desc' ]"
|
||||
selectionMode="multiple"
|
||||
[currentFolderId]="node?.id"
|
||||
[allowDropFiles]="true"
|
||||
[navigate]="false"
|
||||
[imageResolver]="imageResolver"
|
||||
(node-dblclick)="navigateTo($event.detail?.node)"
|
||||
(name-click)="navigateTo($event.detail?.node)">
|
||||
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
|
||||
<ng-container *ngIf="column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
<ng-template let-context>
|
||||
<app-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context">
|
||||
</app-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="!column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<adf-upload-drag-area [parentId]="node?.id" [disabled]="!canUpload">
|
||||
<adf-document-list
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
[sorting]="['modifiedAt', 'desc']"
|
||||
selectionMode="multiple"
|
||||
[currentFolderId]="node?.id"
|
||||
[allowDropFiles]="true"
|
||||
[navigate]="false"
|
||||
[imageResolver]="imageResolver"
|
||||
(node-dblclick)="navigateTo($event.detail?.node)"
|
||||
(name-click)="navigateTo($event.detail?.node)"
|
||||
>
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
<ng-container
|
||||
*ngIf="
|
||||
column.template && !(column.desktopOnly && isSmallScreen)
|
||||
"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
<ng-template let-context>
|
||||
<adf-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context"
|
||||
>
|
||||
</adf-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
|
||||
<ng-container
|
||||
*ngIf="
|
||||
!column.template && !(column.desktopOnly && isSmallScreen)
|
||||
"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
|
||||
<adf-pagination acaPagination [target]="documentList">
|
||||
</adf-pagination>
|
||||
<adf-pagination acaPagination [target]="documentList"> </adf-pagination>
|
||||
</adf-upload-drag-area>
|
||||
</div>
|
||||
|
||||
<div class="sidebar" *ngIf="infoDrawerOpened$ | async">
|
||||
<div class="sidebar" *ngIf="(infoDrawerOpened$ | async)">
|
||||
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
|
||||
</div>
|
||||
</app-page-layout-content>
|
||||
|
||||
</app-page-layout>
|
||||
|
@@ -4,8 +4,8 @@
|
||||
[tooltip]="appName$ | async"
|
||||
[color]="headerColor$ | async"
|
||||
[title]="appName$ | async"
|
||||
(clicked)="toggleClicked.emit($event)">
|
||||
|
||||
(clicked)="toggleClicked.emit($event)"
|
||||
>
|
||||
<div class="adf-toolbar--spacer adf-toolbar-divider"></div>
|
||||
|
||||
<aca-search-input></aca-search-input>
|
||||
@@ -15,10 +15,7 @@
|
||||
<aca-current-user></aca-current-user>
|
||||
|
||||
<ng-container *ngFor="let actionRef of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action
|
||||
[actionRef]="actionRef"
|
||||
color="default">
|
||||
<aca-toolbar-action [actionRef]="actionRef" color="default">
|
||||
</aca-toolbar-action>
|
||||
</ng-container>
|
||||
|
||||
</adf-layout-header>
|
||||
|
@@ -1,81 +1,86 @@
|
||||
<app-page-layout>
|
||||
|
||||
<app-page-layout-header>
|
||||
<adf-breadcrumb root="APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE">
|
||||
</adf-breadcrumb>
|
||||
<adf-breadcrumb root="APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE">
|
||||
</adf-breadcrumb>
|
||||
|
||||
<adf-toolbar class="inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
<adf-toolbar class="inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
</app-page-layout-header>
|
||||
|
||||
<app-page-layout-content>
|
||||
<div class="main-content">
|
||||
<adf-document-list #documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
currentFolderId="-mysites-"
|
||||
selectionMode="single"
|
||||
[navigate]="false"
|
||||
[sorting]="[ 'title', 'asc' ]"
|
||||
[imageResolver]="imageResolver"
|
||||
(node-dblclick)="navigateTo($event.detail?.node)"
|
||||
(name-click)="navigateTo($event.detail?.node)">
|
||||
<div class="main-content">
|
||||
<adf-document-list
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
currentFolderId="-mysites-"
|
||||
selectionMode="single"
|
||||
[navigate]="false"
|
||||
[sorting]="['title', 'asc']"
|
||||
[imageResolver]="imageResolver"
|
||||
(node-dblclick)="navigateTo($event.detail?.node)"
|
||||
(name-click)="navigateTo($event.detail?.node)"
|
||||
>
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<adf-empty-content
|
||||
icon="library_books"
|
||||
[title]="'APP.BROWSE.LIBRARIES.EMPTY_STATE.FILE_LIBRARIES.TITLE'"
|
||||
subtitle="APP.BROWSE.LIBRARIES.EMPTY_STATE.FILE_LIBRARIES.TEXT"
|
||||
>
|
||||
</adf-empty-content>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<adf-empty-content
|
||||
icon="library_books"
|
||||
[title]="'APP.BROWSE.LIBRARIES.EMPTY_STATE.FILE_LIBRARIES.TITLE'"
|
||||
subtitle="APP.BROWSE.LIBRARIES.EMPTY_STATE.FILE_LIBRARIES.TEXT">
|
||||
</adf-empty-content>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
<ng-container
|
||||
*ngIf="column.template && !(column.desktopOnly && isSmallScreen)"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
<ng-template let-context>
|
||||
<adf-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context"
|
||||
>
|
||||
</adf-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
<ng-container
|
||||
*ngIf="!column.template && !(column.desktopOnly && isSmallScreen)"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
|
||||
<ng-container *ngIf="column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
<ng-template let-context>
|
||||
<app-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context">
|
||||
</app-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
<adf-pagination acaPagination [target]="documentList"> </adf-pagination>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="!column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
|
||||
<adf-pagination acaPagination [target]="documentList">
|
||||
</adf-pagination>
|
||||
</div>
|
||||
|
||||
<div class="sidebar" *ngIf="infoDrawerOpened$ | async">
|
||||
<aca-info-drawer [node]="selection.library"></aca-info-drawer>
|
||||
</div>
|
||||
<div class="sidebar" *ngIf="(infoDrawerOpened$ | async)">
|
||||
<aca-info-drawer [node]="selection.library"></aca-info-drawer>
|
||||
</div>
|
||||
</app-page-layout-content>
|
||||
</app-page-layout>
|
||||
|
@@ -1,8 +1,6 @@
|
||||
<app-page-layout>
|
||||
|
||||
<app-page-layout-header>
|
||||
<adf-breadcrumb root="APP.BROWSE.RECENT.TITLE">
|
||||
</adf-breadcrumb>
|
||||
<adf-breadcrumb root="APP.BROWSE.RECENT.TITLE"> </adf-breadcrumb>
|
||||
|
||||
<adf-toolbar class="inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
@@ -13,70 +11,75 @@
|
||||
|
||||
<app-page-layout-content>
|
||||
<div class="main-content">
|
||||
<adf-document-list #documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
currentFolderId="-recent-"
|
||||
selectionMode="multiple"
|
||||
[navigate]="false"
|
||||
[sorting]="[ 'modifiedAt', 'desc' ]"
|
||||
[imageResolver]="imageResolver"
|
||||
(node-dblclick)="onNodeDoubleClick($event.detail?.node)"
|
||||
(name-click)="onNodeDoubleClick($event.detail?.node)">
|
||||
<adf-document-list
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
currentFolderId="-recent-"
|
||||
selectionMode="multiple"
|
||||
[navigate]="false"
|
||||
[sorting]="['modifiedAt', 'desc']"
|
||||
[imageResolver]="imageResolver"
|
||||
(node-dblclick)="onNodeDoubleClick($event.detail?.node)"
|
||||
(name-click)="onNodeDoubleClick($event.detail?.node)"
|
||||
>
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<adf-empty-content
|
||||
icon="access_time"
|
||||
[title]="'APP.BROWSE.RECENT.EMPTY_STATE.TITLE'"
|
||||
subtitle="APP.BROWSE.RECENT.EMPTY_STATE.TEXT"
|
||||
>
|
||||
</adf-empty-content>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<adf-empty-content
|
||||
icon="access_time"
|
||||
[title]="'APP.BROWSE.RECENT.EMPTY_STATE.TITLE'"
|
||||
subtitle="APP.BROWSE.RECENT.EMPTY_STATE.TEXT">
|
||||
</adf-empty-content>
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
<ng-container
|
||||
*ngIf="column.template && !(column.desktopOnly && isSmallScreen)"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
<ng-template let-context>
|
||||
<adf-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context"
|
||||
>
|
||||
</adf-dynamic-column>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
<ng-container
|
||||
*ngIf="!column.template && !(column.desktopOnly && isSmallScreen)"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
|
||||
<ng-container *ngIf="column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
<ng-template let-context>
|
||||
<app-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context">
|
||||
</app-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="!column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
|
||||
</adf-document-list>
|
||||
|
||||
<adf-pagination acaPagination [target]="documentList">
|
||||
</adf-pagination>
|
||||
<adf-pagination acaPagination [target]="documentList"> </adf-pagination>
|
||||
</div>
|
||||
|
||||
<div class="sidebar" *ngIf="infoDrawerOpened$ | async">
|
||||
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
|
||||
<div class="sidebar" *ngIf="(infoDrawerOpened$ | async)">
|
||||
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
|
||||
</div>
|
||||
</app-page-layout-content>
|
||||
</app-page-layout>
|
||||
|
@@ -1,8 +1,6 @@
|
||||
<app-page-layout>
|
||||
|
||||
<app-page-layout-header>
|
||||
<adf-breadcrumb root="APP.BROWSE.SEARCH_LIBRARIES.TITLE">
|
||||
</adf-breadcrumb>
|
||||
<adf-breadcrumb root="APP.BROWSE.SEARCH_LIBRARIES.TITLE"> </adf-breadcrumb>
|
||||
<adf-toolbar class="inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
@@ -13,92 +11,119 @@
|
||||
<app-page-layout-content>
|
||||
<div class="main-content">
|
||||
<div class="adf-search-results">
|
||||
<div class="adf-search-results__content">
|
||||
<mat-progress-bar
|
||||
*ngIf="isLoading"
|
||||
color="primary"
|
||||
mode="indeterminate">
|
||||
</mat-progress-bar>
|
||||
<div class="adf-search-results__content-header content" *ngIf="data?.list.entries.length">
|
||||
<div class="content__side--left">
|
||||
<div class="adf-search-results--info-text"
|
||||
*ngIf="totalResults !== 1">{{ 'APP.BROWSE.SEARCH_LIBRARIES.FOUND_RESULTS' | translate: { number: totalResults } }}</div>
|
||||
<div class="adf-search-results--info-text"
|
||||
*ngIf="totalResults === 1">{{ 'APP.BROWSE.SEARCH_LIBRARIES.FOUND_ONE_RESULT' | translate: { number: totalResults } }}</div>
|
||||
</div>
|
||||
<div class="adf-search-results__content">
|
||||
<mat-progress-bar
|
||||
*ngIf="isLoading"
|
||||
color="primary"
|
||||
mode="indeterminate"
|
||||
>
|
||||
</mat-progress-bar>
|
||||
<div
|
||||
class="adf-search-results__content-header content"
|
||||
*ngIf="data?.list.entries.length"
|
||||
>
|
||||
<div class="content__side--left">
|
||||
<div
|
||||
class="adf-search-results--info-text"
|
||||
*ngIf="totalResults !== 1"
|
||||
>
|
||||
{{
|
||||
'APP.BROWSE.SEARCH_LIBRARIES.FOUND_RESULTS'
|
||||
| translate: { number: totalResults }
|
||||
}}
|
||||
</div>
|
||||
|
||||
<adf-document-list
|
||||
#documentList
|
||||
acaContextActions
|
||||
acaDocumentList
|
||||
[showHeader]="true"
|
||||
[selectionMode]="'single'"
|
||||
[sorting]="[ 'name', 'asc' ]"
|
||||
[node]="data"
|
||||
[imageResolver]="imageResolver"
|
||||
(node-dblclick)="navigateTo($event.detail?.node)"
|
||||
(name-click)="navigateTo($event.detail?.node)">
|
||||
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
|
||||
<ng-container *ngIf="column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
<ng-template let-context>
|
||||
<app-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context">
|
||||
</app-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="!column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
|
||||
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<ng-container *ngIf="data">
|
||||
<div class="empty-search__block">
|
||||
<p class="empty-search__text">
|
||||
{{ 'APP.BROWSE.SEARCH.NO_RESULTS' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
</adf-document-list>
|
||||
|
||||
<adf-pagination *ngIf="!documentList.isEmpty()"
|
||||
acaPagination
|
||||
[target]="documentList"
|
||||
(change)="onPaginationChanged($event)">
|
||||
</adf-pagination>
|
||||
<div
|
||||
class="adf-search-results--info-text"
|
||||
*ngIf="totalResults === 1"
|
||||
>
|
||||
{{
|
||||
'APP.BROWSE.SEARCH_LIBRARIES.FOUND_ONE_RESULT'
|
||||
| translate: { number: totalResults }
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<adf-document-list
|
||||
#documentList
|
||||
acaContextActions
|
||||
acaDocumentList
|
||||
[showHeader]="true"
|
||||
[selectionMode]="'single'"
|
||||
[sorting]="['name', 'asc']"
|
||||
[node]="data"
|
||||
[imageResolver]="imageResolver"
|
||||
(node-dblclick)="navigateTo($event.detail?.node)"
|
||||
(name-click)="navigateTo($event.detail?.node)"
|
||||
>
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
<ng-container
|
||||
*ngIf="
|
||||
column.template && !(column.desktopOnly && isSmallScreen)
|
||||
"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
<ng-template let-context>
|
||||
<adf-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context"
|
||||
>
|
||||
</adf-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<ng-container
|
||||
*ngIf="
|
||||
!column.template && !(column.desktopOnly && isSmallScreen)
|
||||
"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<ng-container *ngIf="data">
|
||||
<div class="empty-search__block">
|
||||
<p class="empty-search__text">
|
||||
{{ 'APP.BROWSE.SEARCH.NO_RESULTS' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
</adf-document-list>
|
||||
|
||||
<adf-pagination
|
||||
*ngIf="!documentList.isEmpty()"
|
||||
acaPagination
|
||||
[target]="documentList"
|
||||
(change)="onPaginationChanged($event)"
|
||||
>
|
||||
</adf-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar" *ngIf="infoDrawerOpened$ | async">
|
||||
<div class="sidebar" *ngIf="(infoDrawerOpened$ | async)">
|
||||
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
|
||||
</div>
|
||||
</app-page-layout-content>
|
||||
|
||||
</app-page-layout>
|
||||
|
@@ -1,78 +1,83 @@
|
||||
<app-page-layout>
|
||||
<app-page-layout-header>
|
||||
<adf-breadcrumb root="APP.BROWSE.SHARED.TITLE">
|
||||
</adf-breadcrumb>
|
||||
<app-page-layout-header>
|
||||
<adf-breadcrumb root="APP.BROWSE.SHARED.TITLE"> </adf-breadcrumb>
|
||||
|
||||
<adf-toolbar class="inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
</app-page-layout-header>
|
||||
<adf-toolbar class="inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
</app-page-layout-header>
|
||||
|
||||
<app-page-layout-content>
|
||||
<div class="main-content">
|
||||
<adf-document-list #documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
currentFolderId="-sharedlinks-"
|
||||
selectionMode="multiple"
|
||||
[sorting]="[ 'modifiedAt', 'desc' ]"
|
||||
(node-dblclick)="showPreview($event.detail?.node)"
|
||||
(name-click)="showPreview($event.detail?.node)">
|
||||
<app-page-layout-content>
|
||||
<div class="main-content">
|
||||
<adf-document-list
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
currentFolderId="-sharedlinks-"
|
||||
selectionMode="multiple"
|
||||
[sorting]="['modifiedAt', 'desc']"
|
||||
(node-dblclick)="showPreview($event.detail?.node)"
|
||||
(name-click)="showPreview($event.detail?.node)"
|
||||
>
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<adf-empty-content
|
||||
icon="people"
|
||||
[title]="'APP.BROWSE.SHARED.EMPTY_STATE.TITLE'"
|
||||
subtitle="APP.BROWSE.SHARED.EMPTY_STATE.TEXT"
|
||||
>
|
||||
</adf-empty-content>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<adf-empty-content
|
||||
icon="people"
|
||||
[title]="'APP.BROWSE.SHARED.EMPTY_STATE.TITLE'"
|
||||
subtitle="APP.BROWSE.SHARED.EMPTY_STATE.TEXT">
|
||||
</adf-empty-content>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
<ng-container
|
||||
*ngIf="column.template && !(column.desktopOnly && isSmallScreen)"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
<ng-template let-context>
|
||||
<adf-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context"
|
||||
>
|
||||
</adf-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
<ng-container
|
||||
*ngIf="!column.template && !(column.desktopOnly && isSmallScreen)"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
|
||||
<ng-container *ngIf="column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
<ng-template let-context>
|
||||
<app-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context">
|
||||
</app-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
<adf-pagination acaPagination [target]="documentList"> </adf-pagination>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="!column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
</ng-container>
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
|
||||
<adf-pagination acaPagination [target]="documentList">
|
||||
</adf-pagination>
|
||||
</div>
|
||||
|
||||
<div class="sidebar" *ngIf="infoDrawerOpened$ | async">
|
||||
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
|
||||
</div>
|
||||
</app-page-layout-content>
|
||||
<div class="sidebar" *ngIf="(infoDrawerOpened$ | async)">
|
||||
<aca-info-drawer [node]="selection.last"></aca-info-drawer>
|
||||
</div>
|
||||
</app-page-layout-content>
|
||||
</app-page-layout>
|
||||
|
@@ -1,8 +1,6 @@
|
||||
<app-page-layout>
|
||||
|
||||
<app-page-layout-header>
|
||||
<adf-breadcrumb root="APP.BROWSE.TRASHCAN.TITLE">
|
||||
</adf-breadcrumb>
|
||||
<adf-breadcrumb root="APP.BROWSE.TRASHCAN.TITLE"> </adf-breadcrumb>
|
||||
|
||||
<adf-toolbar class="inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
@@ -13,72 +11,82 @@
|
||||
|
||||
<app-page-layout-content>
|
||||
<div class="main-content">
|
||||
<adf-document-list #documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
currentFolderId="-trashcan-"
|
||||
selectionMode="multiple"
|
||||
[navigate]="false"
|
||||
[imageResolver]="imageResolver"
|
||||
[sorting]="[ 'archivedAt', 'desc' ]">
|
||||
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<adf-empty-content
|
||||
icon="delete"
|
||||
[title]="'APP.BROWSE.TRASHCAN.EMPTY_STATE.TITLE'">
|
||||
<p class="adf-empty-content__text">{{ 'APP.BROWSE.TRASHCAN.EMPTY_STATE.FIRST_TEXT' | translate }}</p>
|
||||
<p class="adf-empty-content__text">{{ 'APP.BROWSE.TRASHCAN.EMPTY_STATE.SECOND_TEXT' | translate }}</p>
|
||||
</adf-empty-content>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
|
||||
<ng-container *ngIf="column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
<ng-template let-context>
|
||||
<app-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context">
|
||||
</app-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="!column.template && !(column.desktopOnly && isSmallScreen)">
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable">
|
||||
</data-column>
|
||||
</ng-container>
|
||||
|
||||
</ng-container>
|
||||
<adf-document-list
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
currentFolderId="-trashcan-"
|
||||
selectionMode="multiple"
|
||||
[navigate]="false"
|
||||
[imageResolver]="imageResolver"
|
||||
[sorting]="['archivedAt', 'desc']"
|
||||
>
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<adf-empty-content
|
||||
icon="delete"
|
||||
[title]="'APP.BROWSE.TRASHCAN.EMPTY_STATE.TITLE'"
|
||||
>
|
||||
<p class="adf-empty-content__text">
|
||||
{{ 'APP.BROWSE.TRASHCAN.EMPTY_STATE.FIRST_TEXT' | translate }}
|
||||
</p>
|
||||
<p class="adf-empty-content__text">
|
||||
{{ 'APP.BROWSE.TRASHCAN.EMPTY_STATE.SECOND_TEXT' | translate }}
|
||||
</p>
|
||||
</adf-empty-content>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
|
||||
<data-columns>
|
||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||
<ng-container
|
||||
*ngIf="column.template && !(column.desktopOnly && isSmallScreen)"
|
||||
>
|
||||
<data-column
|
||||
*ngIf="!isSmallScreen && (user$ | async)?.isAdmin"
|
||||
class="adf-data-table-cell--ellipsis"
|
||||
key="archivedByUser.displayName"
|
||||
title="APP.DOCUMENT_LIST.COLUMNS.DELETED_BY">
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
<ng-template let-context>
|
||||
<adf-dynamic-column
|
||||
[id]="column.template"
|
||||
[context]="context"
|
||||
>
|
||||
</adf-dynamic-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
</ng-container>
|
||||
|
||||
<adf-pagination acaPagination [target]="documentList">
|
||||
</adf-pagination>
|
||||
<ng-container
|
||||
*ngIf="!column.template && !(column.desktopOnly && isSmallScreen)"
|
||||
>
|
||||
<data-column
|
||||
[key]="column.key"
|
||||
[title]="column.title"
|
||||
[type]="column.type"
|
||||
[format]="column.format"
|
||||
[class]="column.class"
|
||||
[sortable]="column.sortable"
|
||||
>
|
||||
</data-column>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
<data-column
|
||||
*ngIf="!isSmallScreen && (user$ | async)?.isAdmin"
|
||||
class="adf-data-table-cell--ellipsis"
|
||||
key="archivedByUser.displayName"
|
||||
title="APP.DOCUMENT_LIST.COLUMNS.DELETED_BY"
|
||||
>
|
||||
</data-column>
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
|
||||
<adf-pagination acaPagination [target]="documentList"> </adf-pagination>
|
||||
</div>
|
||||
</app-page-layout-content>
|
||||
|
||||
</app-page-layout>
|
||||
|
Reference in New Issue
Block a user