all-data-modal.inc 2.22 KB
Newer Older
Tarje.Lavik's avatar
Tarje.Lavik committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{%if models.po|length != 0 %}
<div class="ui segment">
  <div class="header">
    Denne siden har disse egenskapene
  </div>
  <table class="ui fluid very compact very basic large table" about="{{uri}}">
    <thead>
      <tr><th>Predikat</th><th>Objekt</th></tr>
    </thead>
    {% for row in models.po %}
    <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 %}
        <a rel='{{row.p.value}}' href='{{row.o.value}}'>{{row.label.value}}</a>
        {%endif%}
        {%if row.o.uri == 1 && !row.label %}
        <a rel='{{row.p.value}}' href='{{row.o.value}}'>{{row.o.curie}}</a>
        {%endif%}
        {%if row.o.uri == 0 && !row.label %}
        <span property='{{row.p.value}}'>{{row.o.value}}</span>
        {%endif%}
      </td>
    </tr>
    {% endfor %}
    <tfoot>
      <tr><th>Predikat</th><th>Objekt</th></tr>
    </tfoot>
  </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%}
-->