Page title - only show if there is no parent

This commit is contained in:
L. Henze
2019-10-15 13:47:51 -04:00
parent b7b8eed6db
commit 150aace38e
3 changed files with 6 additions and 1 deletions

View File

@@ -25,6 +25,7 @@
<div class="browse-by-metadata w-100">
<ds-browse-by *ngIf="startsWithOptions" class="col-xs-12 w-100"
title="{{'browse.title' | translate:{collection: (parent$ | async)?.payload?.name || '', field: 'browse.metadata.' + browseId | translate, value: (value)? '&quot;' + value + '&quot;': ''} }}"
parentname="{{(parent$ | async)?.payload?.name || ''}}"
[objects$]="(items$ !== undefined)? items$ : browseEntries$"
[paginationConfig]="paginationConfig"
[sortConfig]="sortConfig"

View File

@@ -1,5 +1,5 @@
<ng-container *ngVar="(objects$ | async) as objects">
<h3 class="sr-only">{{title | translate}}</h3>
<h3 [ngClass]="{'sr-only': parentname }" >{{title | translate}}</h3>
<ng-container *ngComponentOutlet="getStartsWithComponent(); injector: objectInjector;"></ng-container>
<div *ngIf="objects?.hasSucceeded && !objects?.isLoading && objects?.payload?.page.length > 0" @fadeIn>
<div *ngIf="!enableArrows">

View File

@@ -26,6 +26,10 @@ export class BrowseByComponent implements OnInit {
*/
@Input() title: string;
/**
* The parent name
*/
@Input() parentname: string;
/**
* The list of objects to display
*/