Skip to content
Snippets Groups Projects
Commit 07d449d4 authored by alangrafu's avatar alangrafu
Browse files

Change syntax for templates

instead of {{r[.INNERFILE].value.VARIABLE}}

now it will be {{r[.INNERFILE].VARIABLE.value}}
parent 1a3a7399
No related branches found
No related tags found
No related merge requests found
......@@ -82,13 +82,13 @@ class Utils{
foreach($aux as $w){
$row = array();
foreach($w as $k => $v){
$row['value'][$k] = $v['value'];
$row[$k]['value'] = $v['value'];
if($v['type'] == 'uri'){
$row['curie'][$k] = Utils::uri2curie($v['value']);
$row['uri'][$k] = 1;
$row[$k]['curie'] = Utils::uri2curie($v['value']);
$row[$k]['uri'] = 1;
}elseif($v['type'] == 'bnode'){
$row['curie'][$k] = 'blankNode';
}
$row[$k]['curie'] = 'blankNode';
}
}
/*if(sizeof($aux) == 1){
$obj = $row;
......
......@@ -14,14 +14,14 @@
<table>
{% for row in r %}
{% if row.value.s1 != null %}
{% if row.s1.value != null %}
<tr>
<td><a href='{{ row.value.s1 }}'>{{row.curie.s1}}</a></td>
<td><a href='{{ row.s1.value }}'>{{row.s1.curie}}</a></td>
{% if row.uri.p1 == 1 %}
<td><a rel='{{row.curie.s1}}' href='{{row.value.p1}}'>{{row.curie.p1}}</a></td>
{% if row.p1.uri == 1 %}
<td><a rel='{{row.s1.curie}}' href='{{row.p1.value}}'>{{row.p1.curie}}</a></td>
{% else %}
<td><span property='{{row.curie.s1}}'>{{row.value.p1}}</span></td>
<td><span property='{{row.s1.curie}}'>{{row.p1.value}}</span></td>
{% endif %}
</tr>
......@@ -32,10 +32,10 @@
<h2>Information pointing to {{base.this.curie}}</h2>
<table>
{% for row in r %}
{% if row.value.p2 != null %}
{% if row.p2.value != null %}
<tr>
<td><a href='{{row.value.s2 }}'>{{ row.curie.s2 }}</a></td>
<td><a rev='{{row.value.s2}}' href='{{row.value.p2}}'>{{row.curie.p2}}</a></td>
<td><a href='{{row.s2.value}}'>{{ row.s2.curie}}</a></td>
<td><a rev='{{row.s2.value}}' href='{{row.p2.value}}'>{{row.p2.curie}}</a></td>
</tr>
{%endif %}
{% endfor %}
......
......@@ -12,11 +12,11 @@
<ul>
{% if r.value.resource != null %}
<!-- Only one class available -->
<li><a href='{{base.baseUrl}}special/instances/{{ r.curie.resource }}'>{{r.curie.resource}}</a></li>
<li><a href='{{base.baseUrl}}special/instances/{{ r.resource.curie }}'>{{r.resource.curie}}</a></li>
{% endif %}
{% for row in r %}
{% if row.value.resource %}
<li><a href='{{base.baseUrl}}special/instances/{{ row.curie.resource }}'>{{row.curie.resource}}</a></li>
{% if row.resource.value %}
<li><a href='{{base.baseUrl}}special/instances/{{ row.resource.curie }}'>{{row.resource.curie}}</a></li>
{% endif %}
{% endfor %}
</ul>
......
......@@ -11,7 +11,7 @@
<h1>Instances of {{base.args.arg0}}</h1>
<ul>
{% for row in r %}
<li><a href='{{ row.value.resource }}'>{{row.curie.resource}}</a></li>
<li><a href='{{ row.resource.value }}'>{{row.resource.curie}}</a></li>
{% endfor %}
</ul>
</body>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment