Commit 09918c9c authored by Laurent Wouters's avatar Laurent Wouters
Browse files

[fix] Fixing the person view for Cubicweb

parent 6cc6e0b1de92
......@@ -153,9 +153,9 @@ export interface Person extends rdfMeta.Loadable {
lastName: string;
phone: string;
homepage: string;
depiction: string;
thumbnail: string;
knows: string[];
depiction: rdfMeta.Loadable;
thumbnail: rdfMeta.Loadable;
knows: rdfMeta.Loadable[];
birthday: string;
age: string;
bio: string;
......@@ -214,8 +214,8 @@ export interface Track extends rdfMeta.Loadable {
export interface Talk extends rdfMeta.Loadable {
title: string;
abstract: string;
authors: string[];
docs: string[];
authors: rdfMeta.Loadable[];
docs: rdfMeta.Loadable[];
trackOrConferences: (Track | Conference)[];
}
......@@ -282,7 +282,12 @@ PERSON_METACLASS.properties = [
"http://xmlns.com/foaf/0.1/thumbnail",
LINK_METACLASS
),
new rdfMeta.MetaPropertyData("knows", "http://xmlns.com/foaf/0.1/knows"),
new rdfMeta.MetaPropertyObject(
"knows",
"http://xmlns.com/foaf/0.1/knows",
PERSON_METACLASS,
true
),
new rdfMeta.MetaPropertyData(
"birthday",
"http://xmlns.com/foaf/0.1/birthday"
......
......@@ -111,6 +111,12 @@
</div>
<hr/>
<h3>Links</h3>
<div v-for="related in person.knows" v-bind:key="related.__resource.uri" class="card">
<div className="card-body">
<span>Knows: </span>
<a v-on:click="(event) => {event.preventDefault(); context.event.onRequestNavigateTo(related.__resource);}" :href=related.__resource.uri>{{related.name != null ? related.name : related.__resource.uri}}</a>
</div>
</div>
</div>
</div>
<hr/>
......
......@@ -103,6 +103,11 @@ class PersonRendering implements implementation.ViewImplementation {
person.influencedBy.map((person: Person) =>
application.cloneResource(person.__resource)
)
)
.concat(
person.knows.map((person: Person) =>
application.cloneResource(person.__resource)
)
);
let errors: string[] = [];
let previous = Vue.config.errorHandler;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment