mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[MNT-25615] Add repository view (#5114)
* [MNT-25615] Add repository view * [MNT-25615] CR fixes
This commit is contained in:
@@ -190,22 +190,29 @@
|
||||
"route": "recent-files"
|
||||
},
|
||||
{
|
||||
"id": "app.navbar.favorites",
|
||||
"id": "app.navbar.repositoryView",
|
||||
"order": 500,
|
||||
"title": "APP.BROWSE.REPOSITORY_VIEW.SIDENAV_LINK.LABEL",
|
||||
"description": "APP.BROWSE.REPOSITORY_VIEW.SIDENAV_LINK.TOOLTIP",
|
||||
"route": "repository"
|
||||
},
|
||||
{
|
||||
"id": "app.navbar.favorites",
|
||||
"order": 600,
|
||||
"title": "APP.BROWSE.FAVORITES.SIDENAV_LINK.LABEL",
|
||||
"description": "APP.BROWSE.FAVORITES.SIDENAV_LINK.TOOLTIP",
|
||||
"route": "favorites"
|
||||
},
|
||||
{
|
||||
"id": "app.navbar.shared",
|
||||
"order": 600,
|
||||
"order": 700,
|
||||
"title": "APP.BROWSE.SHARED.SIDENAV_LINK.LABEL",
|
||||
"description": "APP.BROWSE.SHARED.SIDENAV_LINK.TOOLTIP",
|
||||
"route": "shared"
|
||||
},
|
||||
{
|
||||
"id": "app.navbar.trashcan",
|
||||
"order": 700,
|
||||
"order": 800,
|
||||
"title": "APP.BROWSE.TRASHCAN.SIDENAV_LINK.LABEL",
|
||||
"description": "APP.BROWSE.TRASHCAN.SIDENAV_LINK.TOOLTIP",
|
||||
"route": "trashcan"
|
||||
|
||||
@@ -114,6 +114,13 @@
|
||||
"TITLE": "Permissions"
|
||||
}
|
||||
},
|
||||
"REPOSITORY_VIEW": {
|
||||
"TITLE": "Repository",
|
||||
"SIDENAV_LINK": {
|
||||
"LABEL": "Repository",
|
||||
"TOOLTIP": "View the repository"
|
||||
}
|
||||
},
|
||||
"LIBRARIES": {
|
||||
"TITLE": "File Libraries",
|
||||
"DESCRIPTION": "Access File Libraries",
|
||||
|
||||
@@ -43,6 +43,7 @@ import { ShellLayoutComponent } from '@alfresco/adf-core/shell';
|
||||
import { SearchAiResultsComponent } from './components/knowledge-retrieval/search-ai/search-ai-results/search-ai-results.component';
|
||||
import { SavedSearchesSmartListComponent } from './components/search/search-save/list/smart-list/saved-searches-smart-list.component';
|
||||
import { LibraryListComponent } from './components/library-list/library-list.component';
|
||||
import { RepositoryViewComponent } from './components/repository-view/repository-view.component';
|
||||
|
||||
export const CONTENT_ROUTES: ExtensionRoute[] = [
|
||||
{
|
||||
@@ -168,6 +169,35 @@ export const CONTENT_LAYOUT_ROUTES: Route[] = [
|
||||
...createViewRoutes('personal-files')
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'repository',
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: RepositoryViewComponent,
|
||||
data: {
|
||||
sortingPreferenceKey: 'repository',
|
||||
title: 'APP.BROWSE.REPOSITORY_VIEW.TITLE',
|
||||
defaultNodeId: '-root-'
|
||||
}
|
||||
},
|
||||
...createViewRoutes('repository')
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'repository/:folderId',
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: RepositoryViewComponent,
|
||||
data: {
|
||||
title: 'APP.BROWSE.REPOSITORY_VIEW.TITLE',
|
||||
sortingPreferenceKey: 'repository'
|
||||
}
|
||||
},
|
||||
...createViewRoutes('repository')
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'libraries',
|
||||
children: [
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
PaginationComponent,
|
||||
ShowHeaderMode
|
||||
} from '@alfresco/adf-core';
|
||||
import { Component, OnDestroy, OnInit, ViewEncapsulation, inject } from '@angular/core';
|
||||
import { Component, Input, OnDestroy, OnInit, ViewEncapsulation, inject } from '@angular/core';
|
||||
import { ActivatedRoute, Params } from '@angular/router';
|
||||
import { Node, NodeEntry, PathElement } from '@alfresco/js-api';
|
||||
import { NodeActionsService } from '../../services/node-actions.service';
|
||||
@@ -108,6 +108,9 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
|
||||
private nodePath: PathElement[];
|
||||
private _errorTranslationKey = 'APP.MESSAGES.ERRORS.MISSING_CONTENT';
|
||||
|
||||
@Input()
|
||||
navigationPath = '/personal-files';
|
||||
|
||||
get errorTranslationKey(): string {
|
||||
return this._errorTranslationKey;
|
||||
}
|
||||
@@ -139,7 +142,7 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
|
||||
if (node?.entry?.isFolder) {
|
||||
void this.updateCurrentNode(node.entry);
|
||||
} else {
|
||||
void this.router.navigate(['/personal-files', node.entry.parentId], {
|
||||
void this.router.navigate([this.navigationPath, node.entry.parentId], {
|
||||
replaceUrl: true
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<aca-files [navigationPath]="'/repository'" />
|
||||
@@ -0,0 +1,34 @@
|
||||
/*!
|
||||
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* 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
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
import { FilesComponent } from '../files/files.component';
|
||||
|
||||
@Component({
|
||||
imports: [FilesComponent],
|
||||
templateUrl: './repository-view.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
selector: 'aca-repository-view'
|
||||
})
|
||||
export class RepositoryViewComponent {}
|
||||
Reference in New Issue
Block a user