mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Using "type" value to determine path & innerHTML of first button
This commit is contained in:
@@ -14,8 +14,12 @@
|
||||
[hasInnerHtml]="true">
|
||||
</ds-comcol-page-content>
|
||||
|
||||
<!-- News -->
|
||||
<ds-comcol-page-content [content]="parentContext.sidebarText" [hasInnerHtml]="true" [title]="'community.page.news'">
|
||||
</ds-comcol-page-content>
|
||||
|
||||
<!-- Browse-By Links -->
|
||||
<ds-comcol-page-browse-by [id]="parentContext.id"></ds-comcol-page-browse-by>
|
||||
<ds-comcol-page-browse-by [id]="parentContext.id" [contentType]="parentContext.type"></ds-comcol-page-browse-by>
|
||||
</header>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -17,7 +17,7 @@
|
||||
</ds-comcol-page-content>
|
||||
<!-- Browse-By Links -->
|
||||
|
||||
<ds-comcol-page-browse-by [id]="collection.id" [thisurl]="thisurl"></ds-comcol-page-browse-by>
|
||||
<ds-comcol-page-browse-by [id]="collection.id" [contentType]="collection.type"></ds-comcol-page-browse-by>
|
||||
</header>
|
||||
<ng-container *ngVar="(itemRD$ | async) as itemRD">
|
||||
<div *ngIf="itemRD?.hasSucceeded" @fadeIn>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<!-- Community name -->
|
||||
<ds-comcol-page-header [name]="communityPayload.name"></ds-comcol-page-header>
|
||||
<!-- Browse-By Links -->
|
||||
<ds-comcol-page-browse-by [id]="communityPayload.id"></ds-comcol-page-browse-by>
|
||||
<ds-comcol-page-browse-by [id]="communityPayload.id" [contentType]="communityPayload.type"></ds-comcol-page-browse-by>
|
||||
<!-- Community logo -->
|
||||
<ds-comcol-page-logo *ngIf="logoRD$"
|
||||
[logo]="(logoRD$ | async)?.payload"
|
||||
|
@@ -1,7 +1,10 @@
|
||||
<div role="navigation" class="comcol-browse">
|
||||
<div class="comcol-browse-label">{{'browse.comcol.head' | translate}}</div>
|
||||
<div class="list-group list-group-horizontal">
|
||||
<a [href]="thisurl | dsSafeUrl" class="list-group-item" routerLinkActive="active" >Submission date</a>
|
||||
<a *ngIf="contentType=='collection'" [routerLink]="['/collections/' + id ]" class="list-group-item" routerLinkActive="active">
|
||||
Submission date</a>
|
||||
<a *ngIf="contentType=='community'" [routerLink]="['/communities/' + id ]" class="list-group-item" routerLinkActive="active">
|
||||
Subcommunties and collections</a>
|
||||
<a *ngFor="let config of types" class="list-group-item" [routerLink]="['/browse/' + config.id]" [queryParams]="{scope: id}" routerLinkActive="active">{{'browse.comcol.by.' + config.id | translate}}</a>
|
||||
</div>
|
||||
</div>
|
@@ -18,19 +18,6 @@ export class ComcolPageBrowseByComponent implements OnInit {
|
||||
@Input() id: string;
|
||||
@Input() contentType: string;
|
||||
|
||||
/**
|
||||
* getPathfromType
|
||||
*/
|
||||
getPathfromType(t) {
|
||||
if (t === "collection") {
|
||||
t = "/collections/";
|
||||
} else if (t === "community") {
|
||||
t = "/communities/";
|
||||
} else {
|
||||
t = "/";
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
/**
|
||||
* List of currently active browse configurations
|
||||
@@ -42,7 +29,6 @@ export class ComcolPageBrowseByComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.types = this.config.browseBy.types;
|
||||
this.contentTypePath = this.getPathfromType(this.contentType) ;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user