Skip to content

Commit

Permalink
Fix case when a concept property value is from another vocabulary. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
osma committed Dec 12, 2018
1 parent 3788c5a commit 9f114c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions model/ConceptMappingPropertyValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ public function getVocabName($lang = '')
// @codeCoverageIgnoreEnd
}

public function isExternal() {
$propertyUris = $this->resource->propertyUris();
return empty($propertyUris);
}

public function getNotation()
{
if ($this->resource->get('skos:notation')) {
Expand Down
2 changes: 1 addition & 1 deletion view/concept-shared.twig
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
{% if propval.uri and propval.type != 'rdf:type' %} {# resources with URI #}
{% if propval.label %}
{% if propval.isExternal %}
<a href="{{ propval.uri }}">{{ propval.uri }}</a>
<a href="{{ propval.uri | link_url(propval.exvocab, request.lang, 'page', request.contentLang) }}">{{ propval.label }}</a> ({{ propval.vocabname }})
{% else %}
{% if propval.isReified %} {# e.g. skos:definition's with resource values #}
<span class="versal reified-property-value"><img src="resource/pics/about.png">{% if propval.notation %}<span class="versal">{{ propval.notation }} </span>{% endif %} {{ propval.label(request.contentLang) }}</span>
Expand Down

0 comments on commit 9f114c1

Please sign in to comment.