Skip to content

Commit

Permalink
public-search: repare detail links
Browse files Browse the repository at this point in the history
* Repares documents and persons detail links.

Co-Authored-by: Alicia Zangger <alicia.zangger@rero.ch>
  • Loading branch information
Alicia Zangger authored and jma committed Dec 3, 2019
1 parent d641094 commit df4148f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</div>
<div class="card-body w-100 py-0">
<h4 class="card-title mb-1">
<a target="_self" href="/{{ detailUrl }}">{{ record.metadata.title }}</a>
<a target="_self" [routerLink]="[detailUrl.link]">{{ record.metadata.title }}</a>
</h4>
<article class="card-text">
<!-- author -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,28 @@ import { BioInformationsPipe } from './../pipes/bio-informations.pipe';
import { DocumentBriefComponent } from './document-brief.component';
import { HttpClientModule } from '@angular/common/http';
import { TranslateModule } from '@ngx-translate/core';
import { AppRoutingModule } from '../app-routing.module';
import { PersonBriefComponent } from '../person-brief/person-brief.component';

describe('DocumentBriefComponent', () => {
let component: DocumentBriefComponent;
let fixture: ComponentFixture<DocumentBriefComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DocumentBriefComponent, MefTitlePipe, BirthDatePipe, BioInformationsPipe ],
imports: [ RecordModule, HttpClientModule, TranslateModule.forRoot() ]
declarations: [
DocumentBriefComponent,
MefTitlePipe,
BirthDatePipe,
BioInformationsPipe,
PersonBriefComponent
],
imports: [
RecordModule,
HttpClientModule,
TranslateModule.forRoot(),
AppRoutingModule
]
})
.compileComponents();
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-->
<div *ngIf="record">
<h5 class="card-title mb-0 rero-ils-person">
<a href="{{ detailUrl }}">{{record.metadata | mefTitle}}</a>
<a [routerLink]="[detailUrl.link]">{{record.metadata | mefTitle}}</a>
<small *ngIf="record.metadata.rero" class="badge badge-secondary ml-1">RERO</small>
<small *ngIf="record.metadata.gnd" class="badge badge-secondary ml-1">GND</small>
<small *ngIf="record.metadata.bnf" class="badge badge-secondary ml-1">BNF</small>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,32 @@ import { MefTitlePipe } from './../pipes/mef-title.pipe';
import { BirthDatePipe } from './../pipes/birth-date.pipe';
import { BioInformationsPipe } from './../pipes/bio-informations.pipe';
import { PersonBriefComponent } from './person-brief.component';
import { AppRoutingModule } from 'projects/admin/src/app/app-routing.module';
import { FrontpageComponent } from 'projects/admin/src/app/frontpage/frontpage.component';
import { TranslateModule } from '@ngx-translate/core';
import { HttpClientModule } from '@angular/common/http';
import { RecordModule } from '@rero/ng-core';

describe('PersonBriefComponent', () => {
let component: PersonBriefComponent;
let fixture: ComponentFixture<PersonBriefComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PersonBriefComponent, MefTitlePipe, BirthDatePipe, BioInformationsPipe ]
declarations: [
PersonBriefComponent,
MefTitlePipe,
BirthDatePipe,
BioInformationsPipe,
FrontpageComponent
],
imports:
[
RecordModule,
HttpClientModule,
TranslateModule.forRoot(),
AppRoutingModule
]
})
.compileComponents();
}));
Expand Down

0 comments on commit df4148f

Please sign in to comment.