Skip to content

Commit

Permalink
e
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrevryghem committed Dec 5, 2023
1 parent 9d8e265 commit 093f591
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { combineLatest as observableCombineLatest, Observable, Subscription } from 'rxjs';
import { Component, Inject, OnInit, OnDestroy } from '@angular/core';
import { Component, Inject, OnInit, OnDestroy, Input } from '@angular/core';
import { RemoteData } from '../../core/data/remote-data';
import { PaginatedList } from '../../core/data/paginated-list.model';
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
Expand Down
3 changes: 2 additions & 1 deletion src/app/browse-by/browse-by-switcher/browse-by-decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
export enum BrowseByDataType {
Title = 'title',
Metadata = 'text',
Date = 'date'
Date = 'date',
Hierarchy = 'hierarchy',
}

export const DEFAULT_BROWSE_BY_TYPE = BrowseByDataType.Metadata;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component } from '@angular/core';
import { ThemedComponent } from '../../shared/theme-support/themed.component';
import { rendersBrowseBy } from '../browse-by-switcher/browse-by-decorator';
import { rendersBrowseBy, BrowseByDataType } from '../browse-by-switcher/browse-by-decorator';
import { BrowseByTaxonomyPageComponent } from './browse-by-taxonomy-page.component';

@Component({
Expand All @@ -11,7 +11,7 @@ import { BrowseByTaxonomyPageComponent } from './browse-by-taxonomy-page.compone
/**
* Themed wrapper for BrowseByTaxonomyPageComponent
*/
@rendersBrowseBy('hierarchy')
@rendersBrowseBy(BrowseByDataType.Hierarchy)
export class ThemedBrowseByTaxonomyPageComponent extends ThemedComponent<BrowseByTaxonomyPageComponent>{

protected getComponentName(): string {
Expand Down
5 changes: 3 additions & 2 deletions src/app/community-page/community-page-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import { LinkMenuItemModel } from '../shared/menu/menu-item/models/link.model';
import { ThemedCommunityPageComponent } from './themed-community-page.component';
import { MenuItemType } from '../shared/menu/menu-item-type.model';
import { DSOEditMenuResolver } from '../shared/dso-page/dso-edit-menu.resolver';
import { CommunityBrowseSectionComponent } from './sections/community-browse-section/community-browse-section.component';
import { SubComColSectionComponent } from './sections/sub-com-col-section/sub-com-col-section.component';
import { BrowseByI18nBreadcrumbResolver } from '../browse-by/browse-by-i18n-breadcrumb.resolver';
import { BrowseByGuard } from '../browse-by/browse-by-guard';
import { ThemedBrowseBySwitcherComponent } from '../browse-by/browse-by-switcher/themed-browse-by-switcher.component';

@NgModule({
imports: [
Expand Down Expand Up @@ -61,7 +61,8 @@ import { BrowseByGuard } from '../browse-by/browse-by-guard';
{
path: 'browse/:id',
pathMatch: 'full',
component: CommunityBrowseSectionComponent,
// todo refactor to work like loaders and pass scope & extract title from component
component: ThemedBrowseBySwitcherComponent,
canActivate: [BrowseByGuard],
resolve: {
breadcrumb: BrowseByI18nBreadcrumbResolver,
Expand Down

0 comments on commit 093f591

Please sign in to comment.