Commit 5d660508 authored by Øyvind gjesdal's avatar Øyvind gjesdal
Browse files

wip, gjennomgang av endringer

parent a00f6597
Pipeline #48915 passed with stages
in 1 minute and 30 seconds
{%if not models.po| null %}
{%if models.po | length > 0 %}
<div class="ui segment">
<div class="header">
Denne siden har disse egenskapene
......@@ -29,38 +29,3 @@
</table>
</div>
{%endif%}
<!--
{%if models.sp|length != 0 %}
<div class="ui segment">
<div class="header">
Disse objektene lenker til denne siden
</div>
<table class="ui basic collapsing celled table" about="{{uri}}">
<thead>
<tr><th>Subjekt</th><th>Predikat</th><th>Objekt</th></tr>
</thead>
{% for row in models.sp %}
<tr>
<td>
{%if row.s.uri == 1 && row.label %}
<a rel='{{row.p.value}}' href='{{row.s.value}}'>{{row.label.curie}}</a>
{%endif%}
{%if row.s.uri == 1 && !row.label %}
<a rel='{{row.p.value}}' href='{{row.s.value}}'>{{row.s.curie}}</a>
{%endif%}
{%if row.s.uri != 1 && !row.label %}
<span property='{{row.p.value}}'>{{row.s.value}}</span>
{%endif%}
</td>
<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 class="collapsing">{%if forloop.first%}<a href='{{lodspk.this.value}}'>Denne siden</a>{%endif%}</td>
</tr>
{% endfor %}
<tfoot>
<tr><th>Subjekt</th><th>Predikat</th><th>Objekt</th></tr>
</tfoot>
</table>
</div>
{%endif%}
-->
\ No newline at end of file
{% if models.dzi | count > 0 %}
{% if models.dzi | length > 0 %}
{% set dzi_enabled = true %}
{% else %}
{% set dzi_enabled = false %}
{% endif %}
{% if models.digitalresources | length > 0 %}
{% set dr_enabled = true %}
{% else %}
{% set dr_enabled = false %}
{% endif %}
{% if dzi_enabled %}
<!-- Contains the OpenSeadragon viewer -->
......@@ -10,15 +15,15 @@
</div>
{% endif %}
{% if not models.digitalresources| null %}
<div data-tab="jpeg" class="{% if models.dzi| null %}active{% endif %} ui top attached tab segment no-padding">
{% if models.digitalresources| length > 0 %}
<div data-tab="jpeg" class="{% if not dzi_enabled %}active{% endif %} ui top attached tab segment no-padding">
<!-- fotorama.css & fotorama.js. -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.3/fotorama.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.3/fotorama.js"></script>
<div class="fotorama">
{% for row in models.digitalresources %}
{% for row in models.digitalresources %}
<a href="{{row.imgSM.value}}" data-full="{{row.imgMD.value}}"></a>
{% endfor %}
</div>
......@@ -26,10 +31,10 @@
</div>
{% endif %}
{% if dzi_enabled && not models.digitalresources| null %}
{% if dzi_enabled && dr_enabled %}
<div class="ui bottom attached tabular menu dr-tab">
<a class="item {% if not models.dzi| null %}active{% else %}disabled{% endif %}" data-tab="dzi">Zoom</a>
<a class="item {% if models.dzi| null %}active{% endif %}" data-tab="jpeg">Jpeg</a>
<a class="item {% if dzi_enabled %}active{% else %}disabled{% endif %}" data-tab="dzi">Zoom</a>
<a class="item {% if not dzi_enabled %}active{% endif %}" data-tab="jpeg">Jpeg</a>
<div id="dzi-control" class="right menu">
......
......@@ -5,7 +5,7 @@
<button id="full-page" class="ui button" alt="Fullskjermvisning av og på"><i id="fullPage" class="fa fa-expand"></i></button>
<button id="zoom-out" class="ui button"><i class="fa fa-search-minus"></i></button>
<button id="zoom-in" class="ui button"><i class="fa fa-search-plus"></i></button>
{% if not models.dzi|null %}
{% models.dzi|length > 1 %}
<button id="previous" class="ui button"><i class="fa fa-arrow-left"></i> forrige</button>
<button>gå til side &nbsp;<input style="width: 55px;" type="number" id="page" value="1"/> av <span id="tileSourcesLength"></span></button>
<button id="next" class="ui button">neste <i class="fa fa-arrow-right"></i></button>
......
......@@ -11,7 +11,7 @@
</a>
{% endif %}
<div class="middle aligned content">
<a class="header" href="{{row.uri.value}}">{% if row.title && not row.title.value null %}{{row.title.value}}{% else %}{% if row.label && not row.label.value | null %}{{row.label.value}}{% else %} {{row.identifier.value}}{%endif%}{%endif%}</a>
<a class="header" href="{{row.uri.value}}">{% if row.title && not row.title.value | null %}{{row.title.value}}{% else %}{% if row.label && not row.label.value | null %}{{row.label.value}}{% else %} {{row.identifier.value}}{%endif%}{%endif%}</a>
<!-- {% if row.description %}
<div class="description">
<p>{{row.description.value|truncatewords:25}}</p>
......
<div class="ui horizontal list">
{% if not models.sender| null %}
{% if models.sender| length > 0 %}
{% for row in models.sender %}
<div class="item"><a href="{{row.uri.value}}">{{ row.label.value }}</a></div>
{% endfor %}
......@@ -9,7 +9,7 @@
<div class="item"><i class="fa fa-arrow-right"></i> <i class="fa fa-envelope"></i></div>
{% if not models.recipient| null %}
{% if models.recipient| length > 0 %}
{% for row in models.recipient %}
<div class="item"><a href="{{row.uri.value}}">{{ row.label.value }}</a></div>
{% endfor %}
......
......@@ -51,7 +51,7 @@
<script>$('[data-toggle="tooltip"]').tooltip({'placement': 'top'});</script>
{% endif %}
<!-- PDF DOWNLOAD -->
{% if not models.pdf| null %}
{% if models.pdf| length > 0 %}
<li><small>Last ned</small><br><i class="fa fa-download"></i> <a href="{{first.pdf.uri.value }}">PDF</a></li>
{% endif %}
</ul>
......
......@@ -36,7 +36,7 @@
<p><strong>ID: <a href="{{lodspk.local.curie}}">{{ first.main.identifier.value }}</a></strong></p>
{% endif %}
{% if not first.main.cataloguer | null %}
{% if first.main.cataloguer | length > 0 %}
<p><i class="fa fa-pencil"></i> Katalogisert av {%for row in models.main%}{%if !forloop.last%}, {%endif%}<strong>{{row.cataloguer.value}}</strong>{%endfor%}
</p>
{%endif%}
......@@ -71,7 +71,7 @@
<div class="ui five wide column solo">
<!-- DOWNLOAD -->
{%include "../../includes/download_button.inc"%}
<span class="ui label {% if first.main.showweb.value == "false" %}red{%else%}green{%endif%}">{% if first.main.showweb.value == "false" %}Upublisert{%else%}Publisert{%endif%}</span>
<span class="ui label {% if first.main.showweb.value == 'false' %}red{%else%}green{%endif%}">{% if first.main.showweb.value == 'false' %}Upublisert{%else%}Publisert{%endif%}</span>
{%include "../../includes/show_on_site.inc"%}
</div>
<div class="ui sixteen wide column">
......@@ -97,7 +97,7 @@
{% endfor %}
<!-- SUBJECTS -->
{% if not models.subjects| null %}
{% if models.subjects| length > 0 %}
<!--Emner-->
{%for row in models.subjects%}
{%ifchanged row.uri.value%}
......@@ -149,7 +149,7 @@
<!-- PHYSICAL INFORMATION -->
{% if not models.physical| null %}
{% if models.physical| length > 0 %}
<strong>Fysisk beskrivelse</strong>
<ul id="physical-reference">
{% if first.physical.height.value != null && first.physical.width.value != null %}
......
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