Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
SemWeb
libview
Commits
5c6375727b4d
Commit
09918c9c
authored
Oct 19, 2018
by
Laurent Wouters
Browse files
[fix] Fixing the person view for Cubicweb
parent
6cc6e0b1de92
Changes
3
Hide whitespace changes
Inline
Side-by-side
views-logilab/src/common/schema.ts
View file @
5c637572
...
...
@@ -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
"
...
...
views-logilab/src/person/PersonImpl.vue
View file @
5c637572
...
...
@@ -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/>
...
...
views-logilab/src/person/person.ts
View file @
5c637572
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment