Skip to content

Commit

Permalink
edit about page and biographies
Browse files Browse the repository at this point in the history
  • Loading branch information
Sepideh Alassi committed Jan 19, 2024
1 parent b219f6d commit 05a677a
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 74 deletions.
26 changes: 24 additions & 2 deletions src/app/about/about.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { Component, OnInit } from '@angular/core';
import {Component, Inject, OnInit} from '@angular/core';
import { Location } from '@angular/common';
import {KnoraApiConnection, ReadResource, ReadResourceSequence} from "@dasch-swiss/dsp-js";
import {AppInitService, DspApiConnectionToken} from "../dsp-ui-lib/core";
import {ActivatedRoute, Router} from "@angular/router";
import {BeolService} from "../services/beol.service";

@Component({
selector: 'app-contact',
Expand All @@ -8,9 +12,27 @@ import { Location } from '@angular/common';
})
export class AboutComponent implements OnInit {

constructor(public location: Location) { }
constructor(
@Inject(DspApiConnectionToken) protected _dspApiConnection: KnoraApiConnection,
private _appInitService: AppInitService,
private _router: Router,
private _route: ActivatedRoute,
private _beol: BeolService,
public location: Location
) {
}

ngOnInit() {

}
goToResource(iri: string) {
const resType = this._appInitService.config['ontologyIRI'] + '/ontology/0801/beol/v2#person';

// create a query that gets the person by gnd
this._dspApiConnection.v2.res.getResource(iri).subscribe(
(personResource: ReadResource) => {
this._beol.routeByResourceType(resType, iri, personResource);
}
);
}
}
Loading

0 comments on commit 05a677a

Please sign in to comment.