Skip to content

Commit

Permalink
fixes #477
Browse files Browse the repository at this point in the history
  • Loading branch information
henriyli committed Jun 14, 2016
1 parent 7f82b41 commit da0d673
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 8 deletions.
12 changes: 9 additions & 3 deletions model/ConceptPropertyValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,16 @@ public function isReified() {

public function getReifiedPropertyValues() {
$ret = array();
$props = $this->resource->properties();
$props = $this->resource->propertyUris();
foreach($props as $prop) {
if ($prop !== 'rdf:value') { // shown elsewhere
$ret[$prop] = $this->resource->get($prop);
$prop = (EasyRdf_Namespace::shorten($prop) !== null) ? EasyRdf_Namespace::shorten($prop) : $prop;
foreach ($this->resource->allLiterals($prop) as $val) {
if ($prop !== 'rdf:value' && $this->resource->get($prop)) { // shown elsewhere
$ret[gettext($prop)] = new ConceptPropertyValueLiteral($this->resource->get($prop), $prop);
}
}
foreach ($this->resource->allResources($prop) as $val) {
$ret[gettext($prop)] = new ConceptPropertyValue($this->model, $this->vocab, $val, $prop, $this->clang);
}
}
return $ret;
Expand Down
22 changes: 20 additions & 2 deletions resource/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,31 @@ ul.dropdown-menu > li:last-child > input {
.qtip-skosmos {
background-color: #1E1E1E;
border-radius: 0;
margin-top: 2px;
border: 3px solid #75889F;
margin-top: 12px;
margin-left: 9px;
min-width: 400px;
}

.qtip-skosmos * {
color: #fff;
font-size: 14px;
font-weight: 400;
border: 3px solid #75889F;
}

.qtip-skosmos a {
color: #00ACD3 !important;
width: 100%;
}

.reified-tooltip {
display: none;
margin-top: 5px;
width: 100%;
}

.reified-property-value > img {
width: 18px;
}

/* front page stuff
Expand Down
15 changes: 13 additions & 2 deletions resource/js/docready.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,14 +474,25 @@ $(function() { // DOCUMENT READY
position: { my: 'top left', at: 'bottom center' },
style: { classes: 'qtip-tipsy qtip-skosmos' }
};

$('#navi4').qtip(qtip_skosmos);

$('.property-click').qtip(qtip_skosmos);

$('.redirected-vocab-id').qtip(qtip_skosmos);

$('.reified-property-value').qtip(qtip_skosmos);
$('.reified-property-value').each(function() {
$(this).qtip({
content: $(this).next('.reified-tooltip'),
position: { my: 'top left', at: 'top left' },
style: { classes: 'qtip-skosmos' },
show: { delay: 100 },
hide: {
fixed: true,
delay: 400
}
});
});

$('#hierarchy-disabled > #hier-trigger').qtip(qtip_skosmos_hierarchy);

Expand Down
Binary file added resource/pics/about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion view/concept-shared.twig
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
<a href="{{ propval.uri }}">{{ propval.uri }}</a>
{% else %}
{% if propval.isReified %} {# e.g. skos:definition's with resource values #}
<span class="versal reified-property-value" title="{% for key, val in propval.reifiedpropertyvalues %}{{ key }} : {{ val }}<br/>{% endfor %}">{% if propval.notation %}<span class="versal">{{ propval.notation }} </span>{% endif %} {{ propval.label(request.contentLang) }}</span>
<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>
<div class="reified-tooltip">{% for key, val in propval.reifiedPropertyValues %}<p>{{ key }}: <a href="{{ val.uri | link_url(val.exvocab, request.lang, 'page', request.contentLang) }}">{{ val.label(request.contentLang) }}</a></p>{% endfor %}</div>
{% else %}
<a href="{{ propval.uri | link_url(propval.vocab, request.lang, 'page', request.contentLang) }}">{% if propval.notation %}<span class="versal">{{ propval.notation }} </span>{% endif %} {{ propval.label(request.contentLang) }}</a>
Expand Down

0 comments on commit da0d673

Please sign in to comment.