mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-1545] Library - create (#506)
* create site implementation * lint * update validation * reuse existent service and renamed site to library
This commit is contained in:
committed by
Denys Vuika
parent
19021c8b51
commit
0504b28b3c
@@ -12,6 +12,14 @@
|
||||
<mat-icon *ngIf="displayMode === 'gallery'" matTooltip="{{ 'APP.DOCUMENT_LIST.TOOLBAR.LISTVIEW' | translate }}">list</mat-icon>
|
||||
</button>
|
||||
|
||||
<button
|
||||
mat-icon-button
|
||||
color="primary"
|
||||
*ifExperimental="'libraries'"
|
||||
(click)="createLibrary()">
|
||||
<mat-icon>create_new_folder</mat-icon>
|
||||
</button>
|
||||
|
||||
<ng-container *ngIf="!selection.isEmpty">
|
||||
<ng-container *ifExperimental="'libraries'">
|
||||
<button
|
||||
|
@@ -30,7 +30,7 @@ import { ShareDataRow } from '@alfresco/adf-content-services';
|
||||
import { PageComponent } from '../page.component';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { AppStore } from '../../store/states/app.state';
|
||||
import { DeleteLibraryAction } from '../../store/actions';
|
||||
import { DeleteLibraryAction, CreateLibraryAction } from '../../store/actions';
|
||||
import { SiteEntry } from 'alfresco-js-api';
|
||||
import { ContentManagementService } from '../../common/services/content-management.service';
|
||||
import { ContentApiService } from '../../services/content-api.service';
|
||||
@@ -54,7 +54,8 @@ export class LibrariesComponent extends PageComponent implements OnInit {
|
||||
super.ngOnInit();
|
||||
|
||||
this.subscriptions.push(
|
||||
this.content.siteDeleted.subscribe(() => this.reload())
|
||||
this.content.libraryDeleted.subscribe(() => this.reload()),
|
||||
this.content.libraryCreated.subscribe(() => this.reload())
|
||||
);
|
||||
}
|
||||
|
||||
@@ -105,4 +106,8 @@ export class LibrariesComponent extends PageComponent implements OnInit {
|
||||
this.store.dispatch(new DeleteLibraryAction(node.entry.id));
|
||||
}
|
||||
}
|
||||
|
||||
createLibrary() {
|
||||
this.store.dispatch(new CreateLibraryAction());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user