html.template 11.8 KB
Newer Older
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html lang="no" prefix="og: http://ogp.me/ns#">
<head>
  {%include "../../includes/head_common.inc"%}
  {%include "../../includes/head_page.inc"%}
</head>
<body>
  {%include "../../includes/sidebar.inc"%}
  <div class="pusher">
    {%include "../../includes/static_sidebar_left.inc"%}
    <div class="ui inverted segment">
      <div class="main-content-wrapper">
        {%include "../../includes/header.inc"%}

        <div class="main-content">
          <div class="ui grid">  
            <div class="ui sixteen wide column">
              <h1>{{first.main.label.value}}</h1>
              <span class="ui label">{{first.count.total.value}}</span>

              {% if first.main.description.value %}<p itemprop="http://schema.org/description">{{first.main.description.value}}</p>{% endif %}

              <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 not first.dbpedia.sameas.dbparticle | null %}
              <div class="ui message">
                {% for i in models.dbpedia.sameas %}
                {% ifchanged i.dbparticle.value %}
                <img class="ui small right floated image" src="{{i.thumbnail.value}}">
                <p>{% autoescape off %}{{i.abstract.value}}{% endautoescape %}<p>
                  <p><i class="fa fa-wikipedia-w"></i> Fra Wikipedia (<a href="{{i.dbparticle.value}}"><small>{{i.dbparticle.value}}</small></a>)</p>
                  {% endifchanged %}
                  {% endfor %}
              </div>
              {% endif %}

                {% if models.ms|length != 0 %}
                <div class="ui message">
                  <p><strong>{{ first.main.label.value }} er relatert til disse samlingene.</strong> Disse samlingene er ikke tilgjengelig i Marcus, men du kan finne mer informasjon i den gamle <a href="http://www.uib.no/filearchive/manuskriptkatalogen-ms-1-2097.pdf" target="_blank">Manuskriptkatalogen (pdf)</a>.</p>
                  <div class="ui horizontal list">
                    {% for row in models.ms %}
                    <div class="item"><i class="icon fa fa-dot-circle-o"></i> {{row.label.value}}</div>
                    {% endfor %}
                  </div>
                </div>
                {% endif%}


                {% if models.collections|length != 0 %}
                <div class="ui items">
                  <h3>Relaterte samlinger</h3>
                  {% for row in models.collections %}

                  {% ifchanged row.uri.value %}
                  <div style="item">

                    <div class="content">
                      <h4><i class="fa fa-archive"></i><a href="{{ row.uri.value }}"> {% if row.label && row.label.value != "" %}{{row.label.value}}{% else %} {{row.identifier.value}}{%endif%}</a></h4>

                      {% if row.description.value %}
                      <div class="description">
                        <p>{{row.description.value|truncatewords:35}}</p>
                        {% endif %}
                      </div>

                      <p><span class="ui label">Samling</span> <span><i class="fa fa-key"></i>{{row.identifier.value}}</span></p>
                    </div>
                  </div>
                  {% endifchanged %}

                  {% endfor %}
                </div>
                {% endif%}

            </div>
          </div>

          <div class="equal width row">
             <div class="three wide column">
                <div class="ui list">
                  {% if first.main.birthdate %}<div class="item"><i class="icon asterisk"></i><div class="content">{{first.main.birthdate.value}}</div></div>{% endif %}
                  {% if first.main.deathdate %}<div class="item"><i class="icon"><strong></strong></i><div class="content">{{first.main.deathdate.value}}</div></div>{% endif %}
83
                  {% if  not first.main.email.value | null %}<div class="item"><i class="icon email"></i><div class="content">{{first.main.email.value}}</div></div>{% endif %}
84
85
86
87
88
89
90
91
92
93
94
                </div>



                {% if models.webresources|length != 0 %}
                <p><strong class="text-muted">Nettsider</strong><br>
                  {% for row in models.webresources %}
                  <a target="_blank" href="{{row.uri.value}}">{{row.label.value}}</a> <i class="fa fa-external-link"></i><br>
                  {% endfor %}
                </p>
                {% endif %}
95
:
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
              </div>

              <div class="column">

                {% if first.count.total.value > 100 %}
                <div class="ui borderless pagination menu">
                  <script>
                  if ("{{lodspk.args.arg1}}".length < 1)
                    {page = 0;}
                  else {page = "{{lodspk.args.arg1}}";}
                  if ("{{lodspk.args.arg0}}".length > 0)
                    {page=parseInt(page)}
                  else {}
                    var offset = 50;
                  var count = {{first.count.total.value}};
                  var totalPages = Math.floor(count / 50);
                  var lastPage = '{{lodspk.home}}instance/person/{{lodspk.args.arg0}}/'+ (count - ((count - (50*totalPages))));

                  var nextPage = page+offset;
                  var prevPage = page-offset;
                  var next_uri = '{{lodspk.home}}instance/person/{{lodspk.args.arg0}}/'+ nextPage;
                  var prev_uri = '{{lodspk.home}}instance/person/{{lodspk.args.arg0}}/'+ prevPage;
                  if (prevPage === 0){
                    document.write('<div class="item"><a href="{{lodspk.home}}instance/person/{{lodspk.args.arg0}}" id="prev"><i class="icon left arrow"></i> Forrige 50</a></div>'); 
                  }   
                  else if ("{{lodspk.args.arg1}}".length > 1){
                    document.write('<div class="item"><a href="{{lodspk.home}}instance/person/{{lodspk.args.arg0}}/">Første side</a></div><div class="item"><a href="" class="prev">Forrige 50</a></div>');
                    $(".prev").attr("href",prev_uri);
                  };

                  if ({{first.count.total.value}} > nextPage){
                    document.write('<div class="item"><a href="" class="next">Neste 50</a></div><div class="item"><a class="lastpage" href="">Siste side <i class="icon right arrow"></i></a></div>');
                    $(".next").attr("href",next_uri);
                    $(".lastpage").attr("href",lastPage);
                  };
                  </script> 
                </div>
                {% endif %}

                <div class="ui items">
                  {% for row in models.related %}
                  {% ifchanged row.uri.value %}
                  <div class="item">
                    {% if row.classLabel.value != "Samling" %}
                    <a class="ui medium image" href="{{row.uri.value}}"><img {% if row.img %}{% else %}data-src="holder.js/100%x150/text:Ingen forhåndsvisning"{% endif %} src="{{row.img.value}}" /></a>
                    {% endif %}
                    {% if row.classLabel.value == "Samling" %}
                    <a class="ui medium image" style="color:#bbb;" href="{{row.uri.value}}">{% if row.img %}<img src="{{row.img.value}}" />{% else %}<span class="right floated fa-stack fa-3x">
                      <i class="fa fa-circle fa-stack-2x"></i>
                      <i class="fa fa-archive fa-stack-1x fa-inverse"></i>
                    </span>{% endif %}</a>
                    {% endif %}
                    <div class="content">
                      <a class="header" href="{{ row.uri.value }}">{% 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%}</a>
                      <div class="meta">
                        {% if row.makerNames %}
                        <p><i style="margin-right: 5px;" data-trigger="hover" data-toggle="tooltip" data-placement="left" title="Personer knyttet til samlingen eller dokumentet" class="fa fa-users"></i> <strong>{{row.makerNames.value}}</strong></p>
                        {% endif %}
                      </div>

                      {% if row.description.value %}
                      <div class="description">
                        <p>{{row.description.value|truncatewords:35}}</p>
                      </div>{% endif %}
                      <div class="extra">
                        {% if row.subjectLabels %}
                        <p class="text-muted"><i class="fa fa-tags"></i> <i itemprop="keywords">{{row.subjectLabels.value}}</i></p>
                        {% endif %}


                        <p> {% if row.classLabel %}<span class="ui label">{{row.classLabel.value}}</span> {% endif %} {% if row.hasTranscription.value == "true" %}<span class="ui label">Transkribert</span>{% endif %} {% if row.hasPage.value == "true" %}<span class="ui label">Faksimile</span>{% endif %} <span ><i class="fa fa-key"></i>{{row.identifier.value}}</span></p>
                        {% if row.show.value == false %}<p><span class="ui red label">Upublisert</span></p>{% endif %}
                        {% if row.show.value === "true" %}<p><span class="ui blue label">Publisert</span></p>{% endif %}
                      </div>
                    </div>
                  </div>
                  {% endifchanged %}    
                  {% endfor %}
                </div>

                {% if first.count.total.value > 100 %}
                <div class="ui borderless pagination menu">
                  <script>
                  if ("{{lodspk.args.arg1}}".length < 1)
                    {page = 0;}
                  else {page = "{{lodspk.args.arg1}}";}
                  if ("{{lodspk.args.arg0}}".length > 0)
                    {page=parseInt(page)}
                  else {}
                    var offset = 50;
                  var count = {{first.count.total.value}};
                  var totalPages = Math.floor(count / 50);
                  var lastPage = '{{lodspk.home}}instance/person/{{lodspk.args.arg0}}/'+ (count - ((count - (50*totalPages))));

                  var nextPage = page+offset;
                  var prevPage = page-offset;
                  var next_uri = '{{lodspk.home}}instance/person/{{lodspk.args.arg0}}/'+ nextPage;
                  var prev_uri = '{{lodspk.home}}instance/person/{{lodspk.args.arg0}}/'+ prevPage;
                  if (prevPage === 0){
                    document.write('<div class="item"><a href="{{lodspk.home}}instance/person/{{lodspk.args.arg0}}" id="prev"><i class="icon left arrow"></i> Forrige 50</a></div>'); 
                  }   
                  else if ("{{lodspk.args.arg1}}".length > 1){
                    document.write('<div class="item"><a href="{{lodspk.home}}instance/person/{{lodspk.args.arg0}}/">Første side</a></div><div class="item"><a href="" class="prev">Forrige 50</a></div>');
                    $(".prev").attr("href",prev_uri);
                  };

                  if ({{first.count.total.value}} > nextPage){
                    document.write('<div class="item"><a href="" class="next">Neste 50</a></div><div class="item"><a class="lastpage" href="">Siste side <i class="icon right arrow"></i></a></div>');
                    $(".next").attr("href",next_uri);
                    $(".lastpage").attr("href",lastPage);
                  };
                  </script> 
                </div>
                {% endif %}
              </div>
            </div>

            <div class="row">
              <div class="column">
                <!-- ALL DATA MODAL -->
                {% include "../../includes/all-data-modal.inc" %}
              </div>
            </div>

          </div>
        </div>
      </div>
    </div>

    {%include "../../includes/footer.inc"%}

  </body>
  </html>