Commit d3ad7f19 authored by Øyvind gjesdal's avatar Øyvind gjesdal
Browse files

replace != null with not filter null

parent 3e62be5e
Pipeline #48669 passed with stages
in 1 minute and 35 seconds
......@@ -11,13 +11,13 @@
<tr>
<td class="collapsing">{% ifchanged row.p.value %}<a href="{{row.p.value}}">{% if row.classLabel %}{{row.classLabel.curie}}{% else %}{{row.p.value}}{%endif%}</a>{% endifchanged%}</td>
<td>
{%if row.o.uri == 1 && row.label %}
{%if not row.o | null %}
<a rel='{{row.p.value}}' href='{{row.o.value}}'>{{row.label.value}}</a>
{%endif%}
{%if row.o.uri == 1 && !row.label %}
{%if not row.o | null %}
<a rel='{{row.p.value}}' href='{{row.o.value}}'>{{row.o.curie}}</a>
{%endif%}
{%if row.o.uri == 0 && !row.label %}
{%if not row.o | null %}
<span property='{{row.p.value}}'>{{row.o.value}}</span>
{%endif%}
</td>
......
......@@ -23,7 +23,7 @@
<div class="equal width stackable row">
<div class="three wide column">
{% if first.main.logo != null %}
{% if not first.main.logo | null %}
<img class="ui circular image" src="{{first.main.logo.value}}">
{% endif %}
......
......@@ -17,7 +17,7 @@
<div class="ui segment">
<div class="ui grid">
<div class="three wide column">
{% if first.main.logo != null %}
{% if not first.main.logo | null %}
<img class="ui circular image" src="{{first.main.logo.value}}">
{% endif %}
......
......@@ -22,7 +22,7 @@
<p>{% if first.main.altname %}Også kjent som: <ul class="list-inline text-muted">{% for row in models.main %}{% ifchanged row.label.value %}<li><i>{{row.altname.value}}</i></li>{% endifchanged %}{% endfor %}</ul>{% endif %}</p>
{% if first.dbpedia.sameas.dbparticle != null %}
{% if not first.dbpedia.sameas.dbparticle | null %}
<div class="ui message">
{% for i in models.dbpedia.sameas %}
{% ifchanged i.dbparticle.value %}
......
......@@ -21,7 +21,7 @@
<div class="equal width stackable row">
<div class="three wide column">
{% if first.main.logo != null %}
{% if not first.main.logo | null %}
<img class="ui image" src="{{first.main.logo.value}}">
{% endif %}
......@@ -130,7 +130,7 @@
</div>
{% endif %}
{% if first.haspart.uri != null %}
{% if not first.haspart.uri | null %}
<div class="ui items">
{% for row in models.haspart %}
{% ifchanged row.uri.value %}
......
......@@ -22,7 +22,7 @@
<p>{% if first.main.altname %}Også kjent som: <ul class="list-inline text-muted">{% for row in models.main %}{% ifchanged row.label.value %}<li><i>{{row.altname.value}}</i></li>{% endifchanged %}{% endfor %}</ul>{% endif %}</p>
{% if first.dbpedia.sameas.dbparticle != null %}
{% if not first.dbpedia.sameas.dbparticle | null %}
<div class="ui message">
{% for i in models.dbpedia.sameas %}
{% ifchanged i.dbparticle.value %}
......
......@@ -22,7 +22,7 @@
<p>{% if first.main.altname %}Også kjent som: <ul class="list-inline text-muted">{% for row in models.main %}{% ifchanged row.label.value %}<li><i>{{row.altname.value}}</i></li>{% endifchanged %}{% endfor %}</ul>{% endif %}</p>
{% if first.dbpedia.sameas.dbparticle != null %}
{% if not first.dbpedia.sameas.dbparticle | null %}
<div class="ui clearing segment">
{% for i in models.dbpedia.sameas %}
{% ifchanged i.dbparticle.value %}
......
......@@ -19,7 +19,7 @@
</h1>
<p>{{ first.description.descriptions.value }}</p>
{% if first.haspart.uri != null %}
{% if not first.haspart.uri | null %}
<div class="ui divided items">
{% for row in models.haspart %}
{% ifchanged row.uri.value %}
......
......@@ -50,7 +50,7 @@
</div>
<div class="column">
{% if first.places.long.value != null || first.narrower.long.value != null %}
{% if not first.places.long.value | null || not first.narrower.long.value | null %}
<div class="row">
<div class="column">
......@@ -63,7 +63,7 @@
<script>
var map = L.map('map');
var bounds = [{% for row in models.narrower %}{% if row.lat.value != null %}[{{ row.lat.value }}, {%endif%}{% if row.long.value != "" %}{{ row.long.value }}]{%if forloop.first && row.lat.value != null%}, {%endif%}{%if !forloop.last && row.lat.value != null%}, {%endif%}{%endif%}{% endfor %}];
var bounds = [{% for row in models.narrower %}{% if not row.lat.value | null %}[{{ row.lat.value }}, {%endif%}{% if row.long.value != "" %}{{ row.long.value }}]{%if forloop.first && not row.lat.value | null%}, {%endif%}{%if !forloop.last && not row.lat.value | null%}, {%endif%}{%endif%}{% endfor %}];
bounds = $.grep(bounds,function(n){ return(n) });
{% if first.places.long.value %}
......@@ -86,13 +86,13 @@
L.control.layers.provided(baseLayers, overlayLayers, {collapsed: true}).addTo(map);
{% for row in models.places %}
{% if row.long.value != null %}
{% if not row.long.value | null %}
L.marker([{{ row.lat.value }}, {{ row.long.value }}]).addTo(map).bindPopup("<b><a href=\"{{ row.place.value }}\">{{row.placeName.value}}</a></b>").openPopup();
{% endif %}
{% endfor %}
{% for row in models.narrower %}
{% if row.long.value != null %}
{% if not row.long.value | null %}
L.marker([{{ row.lat.value }}, {{ row.long.value }}]).addTo(map).bindPopup("<b><a href=\"{{ row.narrower.value }}\">{{row.narrowerLabel.value}}</a></b>").openPopup();
{% endif %}
{% endfor %}
......
......@@ -19,7 +19,7 @@
<h1>{% for row in models.main %}{% if row.title && row.title.value != "" %}{{row.title.value}}{% else %}{% if row.label && row.label.value != "" %}{{row.label.value}}{% else %} {{row.identifier.value}}{%endif%}{%endif%}{% endfor %} <span class="ui label">{{ first.count.total.value }}</span></h1>
<p>{{ first.description.descriptions.value }}</p>
{% if first.haspart.uri != null %}
{% if not first.haspart.uri | null %}
<div class="ui six doubling cards">
{% for row in models.haspart %}
{% ifchanged row.uri.value %}
......
......@@ -24,7 +24,7 @@
<!-- <p>Signatur: <a href="{{lodspk.this.value}}">{{ first.main.identifier.value }}</a></p> -->
{% if first.maker.maker.value != null %}
{% if not first.maker.maker.value | null %}
<p><span class="glyphicon glyphicon-pencil"></span>
{% for row in models.maker %}
<a href="{{ row.maker.value }}">{{ row.makerName.value }}</a>{%if !forloop.last%}, {%endif%}
......@@ -66,7 +66,7 @@
</div>
{% endif %}
{% if first.transcription.html.value != null %}
{% if not first.transcription.html.value | null %}
<div id="transcription" class="row well">
<iframe src="{{first.transcription.html.value}}" width="100%" height="300"></iframe>
<p>Last ned XML: <a href="{{first.transcription.xml.value}}">{{first.transcription.xml.value}}</a></p>
......@@ -143,9 +143,9 @@
{% endif %}
{% if first.places.place.value != null %}
{% if not first.places.place.value | null %}
<div id="places">
{% if first.places.long.value != null %}
{% if not first.places.long.value | null %}
<div id="map-wrap">
<div id="map"></div>
<ul class="places-inline-list">
......@@ -157,14 +157,14 @@
{% endif %}
{% if first.places.place.value != null %}
{% if not first.places.place.value | null %}
</div>
{% endif %}
{% endif %}
<script>
var map = L.map('map');
var bounds = [{% for row in models.places %}{% if row.lat.value != null %}[{{ row.lat.value }}, {%endif%}{% if row.long.value != "" %}{{ row.long.value }}]{%if forloop.first && row.lat.value != null%}, {%endif%}{%if !forloop.last && row.lat.value != null%}, {%endif%}{%endif%}{% endfor %}];
var bounds = [{% for row in models.places %}{% if not row.lat.value | null %}[{{ row.lat.value }}, {%endif%}{% if row.long.value != "" %}{{ row.long.value }}]{%if forloop.first && not row.lat.value | null%}, {%endif%}{%if !forloop.last && not row.lat.value | null%}, {%endif%}{%endif%}{% endfor %}];
bounds = $.grep(bounds,function(n){ return(n) });
if (bounds.length > 1) { map.fitBounds(new L.LatLngBounds(bounds)); } else { map.setView(bounds[0], 11);}
......@@ -182,7 +182,7 @@
L.control.layers.provided(baseLayers, overlayLayers, {collapsed: true}).addTo(map);
{% for row in models.places %}
{% if row.long.value != null %}
{% if not row.long.value | null %}
L.marker([{{ row.lat.value }}, {{ row.long.value }}]).addTo(map).bindPopup("<b><a href=\"{{ row.place.value }}\">{{row.placeName.value}}</a></b>").openPopup();
{% endif %}
{% endfor %}
......
......@@ -21,7 +21,7 @@
{% endfor %}
{% if first.maker.makerName.value != null %}
{% if not first.maker.makerName.value | null %}
<ul class="list-unstyled">
{% for row in models.maker %}
{% ifchanged row.maker.value %}
......@@ -32,14 +32,14 @@
{% endif %}
<!-- CREATION -->
{% if first.main.created.value != null %}
{% if not first.main.created.value | null %}
<p><strong><i class="fa fa-calendar"></i>
Dato: <span itemprop="dateCreated">{{ first.main.created.value }}</span>
</strong></p>
<hr>
{% endif %}
{% if first.main.acqusitiontype.value != null %}
{% if not first.main.acqusitiontype.value | null %}
<p>
{% for row in models.main %}
<strong>{{ row.acqusitiontype.value }}</strong>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment