From cddcd834ca1d6449d5e942693b82d1d1c4b95089 Mon Sep 17 00:00:00 2001 From: Jose Blanco Date: Fri, 1 Nov 2024 20:31:09 -0400 Subject: [PATCH] improved file listing in search and other changes --- .../admin-sidebar/admin-sidebar.component.ts | 8 ++- .../shared/listfiles/listfiles.component.html | 70 ++++++++----------- .../shared/listfiles/listfiles.component.ts | 7 +- ...-search-result-list-element.component.html | 60 +++++++++------- .../search-sidebar.component.html | 5 +- 5 files changed, 81 insertions(+), 69 deletions(-) diff --git a/src/app/admin/admin-sidebar/admin-sidebar.component.ts b/src/app/admin/admin-sidebar/admin-sidebar.component.ts index 26ded965d4d..916a14e5247 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar.component.ts +++ b/src/app/admin/admin-sidebar/admin-sidebar.component.ts @@ -49,7 +49,7 @@ export class AdminSidebarComponent extends MenuComponent implements OnInit { */ sidebarExpanded: Observable; - inFocus$: BehaviorSubject; + inFocus$: BehaviorSubject = new BehaviorSubject(false); constructor( protected menuService: MenuService, @@ -70,10 +70,16 @@ export class AdminSidebarComponent extends MenuComponent implements OnInit { ngOnInit(): void { super.ngOnInit(); this.sidebarWidth = this.variableService.getVariable('--ds-sidebar-items-width'); + + // Ensure the menu is shown and expanded initially + this.menuService.showMenu(this.menuID); // Assuming 'showMenu' makes the menu visible but does not expand it + this.menuService.expandMenu(this.menuID); // Expanding the menu initially + this.authService.isAuthenticated() .subscribe((loggedIn: boolean) => { if (loggedIn) { this.menuService.showMenu(this.menuID); + this.menuService.expandMenu(this.menuID); // Ensuring it's expanded when authenticated } }); this.menuCollapsed.pipe(first()) diff --git a/src/app/shared/listfiles/listfiles.component.html b/src/app/shared/listfiles/listfiles.component.html index 0894fa6e9a6..dbf1c4159f8 100644 --- a/src/app/shared/listfiles/listfiles.component.html +++ b/src/app/shared/listfiles/listfiles.component.html @@ -2,59 +2,49 @@
- + + +
+
- - -
+ + + -
-
- + + + - - {{ dsoNameService.getName(file) }} - + + + - ({{(file?.sizeBytes) | dsFileSize }}) + - + +
+ THIS IS A HIDDEN FILE +
+ ({{(file?.sizeBytes) | dsFileSize }}) -
-
- - - Click file name to request access from the owner - + - - - +
- -
-THIS IS A HIDDEN FILE -
- {{file.firstMetadataValue('dc.description')}} -
-
+
+ -
- - - -
- -
-
- -
+ +
+ +
+
+ +
diff --git a/src/app/shared/listfiles/listfiles.component.ts b/src/app/shared/listfiles/listfiles.component.ts index a4a663da315..aef9102612d 100644 --- a/src/app/shared/listfiles/listfiles.component.ts +++ b/src/app/shared/listfiles/listfiles.component.ts @@ -58,7 +58,10 @@ export class ListfilesComponent implements OnInit { public dsoNameService: DSONameService, @Inject(APP_CONFIG) protected appConfig: AppConfig ) { - this.pageSize = this.appConfig.item.bitstream.pageSize; + //this.pageSize = this.appConfig.item.bitstream.pageSize; + // Just going to hardcode it to 1000 + this.pageSize = 1000; + } ngOnInit(): void { @@ -143,4 +146,4 @@ export class ListfilesComponent implements OnInit { }); } -} \ No newline at end of file +} diff --git a/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html b/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html index 68537a94445..32ad4de9a36 100644 --- a/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html +++ b/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html @@ -14,35 +14,47 @@
--> -
-
- +
+
+ +
+ + + + + +
+ + () +
- - - - - + + - + + - - ; + + ; + + + + ; + + ; et. al. + + - - () - - - - + + - + - -
+ --> + +
diff --git a/src/app/shared/search/search-sidebar/search-sidebar.component.html b/src/app/shared/search/search-sidebar/search-sidebar.component.html index 8bf42792fa8..0fe2672c920 100644 --- a/src/app/shared/search/search-sidebar/search-sidebar.component.html +++ b/src/app/shared/search/search-sidebar/search-sidebar.component.html @@ -14,6 +14,9 @@ (changeViewMode)="changeViewMode.emit($event)"> -->