mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
108588: Fix header ordering issues on community & collection pages
This commit is contained in:
@@ -1,22 +1,21 @@
|
||||
<div class="container">
|
||||
<section class="comcol-page-browse-section">
|
||||
<div class="browse-by-metadata w-100">
|
||||
<ds-browse-by *ngIf="startsWithOptions" class="col-xs-12 w-100"
|
||||
title="{{'browse.title' | translate:
|
||||
{
|
||||
field: 'browse.metadata.' + browseId | translate,
|
||||
startsWith: (startsWith)? ('browse.startsWith' | translate: { startsWith: '"' + startsWith + '"' }) : '',
|
||||
value: (value)? '"' + value + '"': ''
|
||||
} }}"
|
||||
[objects$]="(items$ !== undefined)? items$ : browseEntries$"
|
||||
[paginationConfig]="(currentPagination$ |async)"
|
||||
[sortConfig]="(currentSort$ |async)"
|
||||
[type]="startsWithType"
|
||||
[startsWithOptions]="startsWithOptions"
|
||||
(prev)="goPrev()"
|
||||
(next)="goNext()">
|
||||
</ds-browse-by>
|
||||
<ds-themed-loading *ngIf="!startsWithOptions" message="{{'loading.browse-by-page' | translate}}"></ds-themed-loading>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<section class="comcol-page-browse-section">
|
||||
<div class="browse-by-metadata w-100">
|
||||
<ds-browse-by *ngIf="startsWithOptions" class="col-xs-12 w-100"
|
||||
title="{{'browse.title' | translate:{
|
||||
field: 'browse.metadata.' + browseId | translate,
|
||||
startsWith: (startsWith)? ('browse.startsWith' | translate: { startsWith: '"' + startsWith + '"' }) : '',
|
||||
value: (value)? '"' + value + '"': ''
|
||||
} }}"
|
||||
[displayTitle]="displayTitle"
|
||||
[objects$]="(items$ !== undefined)? items$ : browseEntries$"
|
||||
[paginationConfig]="(currentPagination$ |async)"
|
||||
[sortConfig]="(currentSort$ |async)"
|
||||
[type]="startsWithType"
|
||||
[startsWithOptions]="startsWithOptions"
|
||||
(prev)="goPrev()"
|
||||
(next)="goNext()">
|
||||
</ds-browse-by>
|
||||
<ds-themed-loading *ngIf="!startsWithOptions"
|
||||
message="{{'loading.browse-by-page' | translate}}"></ds-themed-loading>
|
||||
</div>
|
||||
</section>
|
||||
|
@@ -52,6 +52,11 @@ export class BrowseByMetadataComponent implements OnInit, OnChanges, OnDestroy {
|
||||
*/
|
||||
@Input() scope: string;
|
||||
|
||||
/**
|
||||
* Display the h1 title in the section
|
||||
*/
|
||||
@Input() displayTitle = true;
|
||||
|
||||
scope$: BehaviorSubject<string> = new BehaviorSubject(undefined);
|
||||
|
||||
/**
|
||||
|
@@ -1,2 +1,4 @@
|
||||
<ds-browse-by-switcher [browseByType]="browseByType$ | async">
|
||||
</ds-browse-by-switcher>
|
||||
<div class="container">
|
||||
<ds-browse-by-switcher [browseByType]="browseByType$ | async">
|
||||
</ds-browse-by-switcher>
|
||||
</div>
|
||||
|
@@ -15,6 +15,8 @@ export class BrowseBySwitcherComponent extends AbstractComponentLoaderComponent<
|
||||
|
||||
@Input() browseByType: BrowseByDataType;
|
||||
|
||||
@Input() displayTitle: boolean;
|
||||
|
||||
@Input() scope: string;
|
||||
|
||||
protected inputNamesDependentForComponent: (keyof this & string)[] = [
|
||||
@@ -25,6 +27,7 @@ export class BrowseBySwitcherComponent extends AbstractComponentLoaderComponent<
|
||||
protected inputNames: (keyof this & string)[] = [
|
||||
'context',
|
||||
'browseByType',
|
||||
'displayTitle',
|
||||
'scope',
|
||||
];
|
||||
|
||||
|
@@ -1,4 +1,11 @@
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1 *ngIf="displayTitle">
|
||||
{{ ('browse.title') | translate:{
|
||||
field: 'browse.metadata.' + vocabularyName | translate,
|
||||
startsWith: '',
|
||||
value: '',
|
||||
} }}
|
||||
</h1>
|
||||
<div class="mb-3">
|
||||
<ds-vocabulary-treeview [vocabularyOptions]=vocabularyOptions
|
||||
[multiSelect]="true"
|
||||
@@ -11,4 +18,4 @@
|
||||
[queryParams]="queryParams"
|
||||
[queryParamsHandling]="'merge'">
|
||||
{{ 'browse.taxonomy.button' | translate }}</a>
|
||||
</div>
|
||||
</section>
|
||||
|
@@ -36,6 +36,11 @@ export class BrowseByTaxonomyComponent implements OnInit, OnChanges, OnDestroy {
|
||||
*/
|
||||
@Input() scope: string;
|
||||
|
||||
/**
|
||||
* Display the h1 title in the section
|
||||
*/
|
||||
@Input() displayTitle = true;
|
||||
|
||||
scope$: BehaviorSubject<string> = new BehaviorSubject(undefined);
|
||||
|
||||
/**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<ng-container *ngVar="(subCollectionsRDObs | async) as subCollectionsRD">
|
||||
<div *ngIf="subCollectionsRD?.hasSucceeded && subCollectionsRD?.payload.totalElements > 0" @fadeIn>
|
||||
<h2>{{'community.sub-collection-list.head' | translate}}</h2>
|
||||
<h3>{{'community.sub-collection-list.head' | translate}}</h3>
|
||||
<ds-viewable-collection
|
||||
[config]="config"
|
||||
[sortConfig]="sortConfig"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<ng-container *ngVar="(subCommunitiesRDObs | async) as subCommunitiesRD">
|
||||
<div *ngIf="subCommunitiesRD?.hasSucceeded && subCommunitiesRD?.payload.totalElements > 0" @fadeIn>
|
||||
<h2>{{'community.sub-community-list.head' | translate}}</h2>
|
||||
<h3>{{'community.sub-community-list.head' | translate}}</h3>
|
||||
<ds-viewable-collection
|
||||
[config]="config"
|
||||
[sortConfig]="sortConfig"
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<ng-container *ngVar="(objects$ | async) as objects">
|
||||
<h3>{{title | translate}}</h3>
|
||||
<h1 *ngIf="displayTitle">{{title | translate}}</h1>
|
||||
<ng-container *ngComponentOutlet="getStartsWithComponent(); injector: objectInjector;"></ng-container>
|
||||
<div *ngIf="objects?.hasSucceeded && !objects?.isLoading && objects?.payload?.page.length > 0" @fadeIn>
|
||||
<div *ngIf="shouldDisplayResetButton$ |async" class="mb-2 reset">
|
||||
|
@@ -38,6 +38,11 @@ export class BrowseByComponent implements OnInit, OnDestroy {
|
||||
*/
|
||||
@Input() title: string;
|
||||
|
||||
/**
|
||||
* Whether the title should be displayed
|
||||
*/
|
||||
@Input() displayTitle = true;
|
||||
|
||||
/**
|
||||
* The list of objects to display
|
||||
*/
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<h2 class="comcol-browse-label h5">{{'browse.comcol.head' | translate}}</h2>
|
||||
<h2 class="comcol-browse-label">{{'browse.comcol.head' | translate}}</h2>
|
||||
<nav *ngIf="(allOptions$ | async) as allOptions" class="comcol-browse mb-4" aria-label="Browse Community or Collection">
|
||||
<div class="d-none d-sm-block">
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
<ds-browse-by-switcher [browseByType]="browseByType$ | async"
|
||||
[displayTitle]="false"
|
||||
[scope]="scope$ | async">
|
||||
</ds-browse-by-switcher>
|
||||
|
Reference in New Issue
Block a user