<div class="col-lg-8">
<div class="card-body">
<ng-container *ngIf="result.sources > 0">
- <a (click)="searchByBrowseEntry(result)" href="javascript:void(0)">
+ <a routerLink="/staff/catalog/search"
+ [queryParams]="searchByBrowseEntryParams(result)">
{{result.value}} ({{result.sources}})
</a>
</ng-container>
Related term
</ng-container>
</span>
- <a (click)="newBrowseFromHeading(heading)" href="javascript:void(0)">
+ <a routerLink="/staff/catalog/browse"
+ [queryParams]="newBrowseFromHeadingParams(heading)">
{{heading.heading}} ({{heading.target_count}})
</a>
</div>
}
}
- searchByBrowseEntry(result) {
-
- // Avoid propagating browse values to term search.
- this.searchContext.browseSearch.reset();
-
- this.searchContext.termSearch.hasBrowseEntry =
+ searchByBrowseEntryParams(result) {
+ const ctx = this.searchContext.clone();
+ ctx.browseSearch.reset(); // we're done browsing
+ ctx.termSearch.hasBrowseEntry =
result.browse_entry + ',' + result.fields;
- this.staffCat.search();
+ return this.catUrl.toUrlParams(ctx);
}
// NOTE: to test unauthorized heading display in concerto
// browse for author = kab
- newBrowseFromHeading(heading) {
- this.searchContext.browseSearch.value = heading.heading;
- this.staffCat.browse();
+ newBrowseFromHeadingParams(heading) {
+ const ctx = this.searchContext.clone();
+ ctx.browseSearch.value = heading.heading;
+ return this.catUrl.toUrlParams(ctx);
}
}