Skip to content
Snippets Groups Projects
Commit 5def2d5f authored by Alvaro Graves's avatar Alvaro Graves
Browse files

Rename 'r' variable to 'models'

parent 414a7063
No related branches found
No related tags found
No related merge requests found
...@@ -329,9 +329,9 @@ class Utils{ ...@@ -329,9 +329,9 @@ class Utils{
$base = $baseObj; $base = $baseObj;
} }
$r2 = Convert::array_copy($results); $r2 = Convert::array_copy($results);
$r = Convert::array_to_object($r2); $models = Convert::array_to_object($r2);
$f = Convert::array_to_object($first); $f = Convert::array_to_object($first);
$vars = compact('uri', 'base', 'r', 'f'); $vars = compact('uri', 'base', 'models', 'f');
$fnc = Haanga::compile(file_get_contents($modelFile)); $fnc = Haanga::compile(file_get_contents($modelFile));
$query = $fnc($vars, TRUE); $query = $fnc($vars, TRUE);
...@@ -495,10 +495,10 @@ class Utils{ ...@@ -495,10 +495,10 @@ class Utils{
'template_dir' => $base['view']['directory'], 'template_dir' => $base['view']['directory'],
'cache_dir' => $conf['home'].'cache/', 'cache_dir' => $conf['home'].'cache/',
)); ));
$r = $data; $models = $data;
$first = $base['first']; $first = $base['first'];
unset($base['first']); unset($base['first']);
$vars = compact('uri','base', 'r', 'first'); $vars = compact('uri','base', 'models', 'first');
if($conf['debug']){ if($conf['debug']){
var_dump($vars); var_dump($vars);
} }
......
...@@ -35,7 +35,7 @@ viewHtml=$(cat <<VIEW ...@@ -35,7 +35,7 @@ viewHtml=$(cat <<VIEW
<div> <div>
<h2>Information from {{base.this.curie}}</h2> <h2>Information from {{base.this.curie}}</h2>
<table> <table>
{% for row in r.main %} {% for row in models.main %}
{% if row.s1%} {% if row.s1%}
<tr> <tr>
...@@ -55,7 +55,7 @@ viewHtml=$(cat <<VIEW ...@@ -55,7 +55,7 @@ viewHtml=$(cat <<VIEW
<br/><br/> <br/><br/>
<h2>Information pointing to {{base.this.curie}}</h2> <h2>Information pointing to {{base.this.curie}}</h2>
<table> <table>
{% for row in r.main %} {% for row in models.main %}
{% if row.s2%} {% if row.s2%}
<tr> <tr>
<td><a href='{{row.s2.value}}'>{{row.s2.curie}}</a></td> <td><a href='{{row.s2.value}}'>{{row.s2.curie}}</a></td>
...@@ -76,7 +76,7 @@ DESCRIBE ?resource WHERE { ...@@ -76,7 +76,7 @@ DESCRIBE ?resource WHERE {
QUERY) QUERY)
viewRdf=$(cat <<VIEW viewRdf=$(cat <<VIEW
{{r.main|safe}} {{models.main|safe}}
VIEW) VIEW)
modelTtl=$modelRdf modelTtl=$modelRdf
......
...@@ -28,7 +28,7 @@ viewHtml=$(cat <<VIEW ...@@ -28,7 +28,7 @@ viewHtml=$(cat <<VIEW
<body> <body>
<h1>Classes available</h1> <h1>Classes available</h1>
<ul> <ul>
{% for row in r.main %} {% for row in models.main %}
<li><a href="{{base.baseUrl}}special/instances/{{ row.resource.curie }}">{{row.resource.curie}}</a></li> <li><a href="{{base.baseUrl}}special/instances/{{ row.resource.curie }}">{{row.resource.curie}}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
......
...@@ -35,7 +35,7 @@ viewHtml=$(cat <<VIEW ...@@ -35,7 +35,7 @@ viewHtml=$(cat <<VIEW
<div> <div>
<h2>Information from {{base.this.curie}}</h2> <h2>Information from {{base.this.curie}}</h2>
<table> <table>
{% for row in r.main %} {% for row in models.main %}
{% if row.s1%} {% if row.s1%}
<tr> <tr>
...@@ -55,7 +55,7 @@ viewHtml=$(cat <<VIEW ...@@ -55,7 +55,7 @@ viewHtml=$(cat <<VIEW
<br/><br/> <br/><br/>
<h2>Information pointing to {{base.this.curie}}</h2> <h2>Information pointing to {{base.this.curie}}</h2>
<table> <table>
{% for row in r.main %} {% for row in models.main %}
{% if row.s2%} {% if row.s2%}
<tr> <tr>
<td><a href='{{row.s2.value}}'>{{row.s2.curie}}</a></td> <td><a href='{{row.s2.value}}'>{{row.s2.curie}}</a></td>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<div> <div>
<h2>Information from {{base.this.curie}}</h2> <h2>Information from {{base.this.curie}}</h2>
<table> <table>
{% for row in r.main %} {% for row in models.main %}
{% if row.s1%} {% if row.s1%}
<tr> <tr>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<br/><br/> <br/><br/>
<h2>Information pointing to {{base.this.curie}}</h2> <h2>Information pointing to {{base.this.curie}}</h2>
<table> <table>
{% for row in r.main %} {% for row in models.main %}
{% if row.s2%} {% if row.s2%}
<tr> <tr>
<td><a href='{{row.s2.value}}'>{{row.s2.curie}}</a></td> <td><a href='{{row.s2.value}}'>{{row.s2.curie}}</a></td>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<h1>Classes available</h1> <h1>Classes available</h1>
{%include "../header.inc"%} {%include "../header.inc"%}
<ul> <ul>
{% for row in r.main %} {% for row in models.main %}
<li><a href="{{base.baseUrl}}instances/{{ row.resource.curie }}">{{row.resource.curie}}</a></li> <li><a href="{{base.baseUrl}}instances/{{ row.resource.curie }}">{{row.resource.curie}}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<h1>Instances of class {{base.args.arg0}}</h1> <h1>Instances of class {{base.args.arg0}}</h1>
{%include "../header.inc"%} {%include "../header.inc"%}
<ul> <ul>
{% for row in r.main %} {% for row in models.main %}
<li><a href="{{ row.resource.value }}">{{row.resource.curie}}</a></li> <li><a href="{{ row.resource.value }}">{{row.resource.curie}}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<h1>Named graphs available</h1> <h1>Named graphs available</h1>
{%include "../header.inc"%} {%include "../header.inc"%}
<ul> <ul>
{% for row in r.main %} {% for row in models.main %}
<li>{{row.g.value}}</li> <li>{{row.g.value}}</li>
{% endfor %} {% endfor %}
</ul> </ul>
......
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