html.template 13.7 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
<!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 segment">
      <div class="main-content-wrapper">
        {%include "../../includes/header.inc"%}
        <div class="main-content">

          <div class="ui grid">  
            <div class="ui sixteen wide column">
              <div class="row digitalresource-block">
                {%include "../../includes/digital_resources.inc"%}
              </div>
            </div>
          </div>

          <div class="ui stackable grid">
            <div class="ui sixteen wide column">
              <div class="ui accordion lightgrey">
                <div class="title">
                  <i class="dropdown icon"></i>
                  Intern info
                </div>
                <div class="content">
                  <p class="transition hidden">

                   <!-- IDENTIFIER -->
                   {% if first.main.identifier %}
                   <p><strong>ID: <a href="{{lodspk.local.curie}}">{{ first.main.identifier.value }}</a></strong></p>
                   {% endif %}

39
                   {% if not first.main.cataloguer | null %}
Tarje.Lavik's avatar
Tarje.Lavik committed
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
                   <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%}

                   <!-- QR CODE -->
                   <div id="qrcode">
                    <script type="text/javascript"> 
                    $("#qrcode").qrcode({ render: "image", minVersion: 3, maxVersion: 40, size: 150, quiet: 2, radius: 0.3, ecLevel: "Q", fill: "#00a7df", text:"{{lodspk.local.curie}}" }); 
                    </script>
                  </div>
                </p>
              </div>
            </div>
          </div>
        </div>

        <div class="ui stackable grid">
          <div class="ui eleven wide column solo">
            {% for row in models.main %}
            <h1>
              {% 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%}
            </h1>
          </div>
          <div class="ui five wide column solo">
            <!-- DOWNLOAD -->
            {%include "../../includes/download_button.inc"%}
74
            <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> 
Tarje.Lavik's avatar
Tarje.Lavik committed
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
            {%include "../../includes/show_on_site.inc"%}
          </div>
          <div class="ui sixteen wide column">
            {% if row.alternative %}
            <h2 itemprop="alternativeHeadline"><small>{{row.alternative.value}}</small></h2>
            {% endif %}
            {% endfor %}

            {% for row in models.description %}
            {% autoescape off %}
            <p itemprop="description" class="lead">{{ row.description.value|decodedescription }}</p>
            {% endautoescape %}
            {% endfor %}      

            <!-- INTERNAL NOTE -->
            {% for row in models.internalnote %}
            <div class="ui warning message" role="alert">
              <div class="header">Intern notat</div>
              {% autoescape off %}
              <p>{{ row.internalNote.value }}</p>
              {% endautoescape %}
            </div>
            {% endfor %}

            <!-- SUBJECTS -->
100
            {% if models.subjects| length > 0 %}
Tarje.Lavik's avatar
Tarje.Lavik committed
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
            <!--Emner--> 
            {%for row in models.subjects%}
            {%ifchanged row.uri.value%}
            {%if forloop.first%}{%else%} {%endif%}
            <span class="ui label green" style="margin-bottom:7px;"><a href="{{ row.uri.value }}">{{ row.label.value }}</a></span>
            {%endifchanged%}
            {%endfor%} 
            {% endif %}
          </div>
        </div>

        <!-- OBJEKT META -->

        <div class="ui grid">
          <div class="four wide column lightgrey"> 
            <!-- CLASS AND MAKER -->
            <span class="header">Info:</span>
            <br />  
            {% for row in models.main %}
            <p><i class="file outline icon"></i><strong>{{ row.classLabel.value }}</strong>
              {% endfor %} 
              {% if first.maker.maker.value == null %}
            </p>
            {% endif %}

            <!-- CREATION -->
            {%include "../../includes/creation_date.inc"%}

            <!-- CREATORS -->
            {% if first.maker.makerName.value != null %}
            <br /> 
            <i class="ui write icon"></i> Skapt av:
            <div class="ui list">
              {% for row in models.maker %}
              {% ifchanged row.maker.value %}
              <div class="item" itemprop="creator" itemscope itemtype="http://schema.org/Person">
                {% if row.thumb %}<img itemprop="image" class="ui avatar image" src="{{row.thumb.value}}">
                {%else%}

                {%endif%} 
                <div class="middle aligned content">
                  <a itemprop="url" href="{{ row.maker.value }}"><span itemprop="name">{{ row.makerName.value }}</span></a>
                </div>
              </div>
              {% endifchanged %}
              {% endfor %}
            </div>
            {% endif %}


            <!-- PHYSICAL INFORMATION -->
152
            {% if models.physical| length > 0 %}
Tarje.Lavik's avatar
Tarje.Lavik committed
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
            <strong>Fysisk beskrivelse</strong>
            <ul id="physical-reference">
              {% if first.physical.height.value != null && first.physical.width.value != null %}
              <li><i class="fa fa-arrows-v"></i> {{ first.physical.height.value }}, <i class="fa fa-arrows-h"></i> {{ first.physical.width.value }}</li>
              {% endif %}
              {% if first.main.pages.value != null %}
              <li>{{ first.main.pages.value }} sider</li>
              {% endif %}
              {% if first.physical.physicalCondition.value != null %} 
              <li><i>{{ first.physical.physicalCondition.value }}</i></li>
              {% endif %}
              {% if first.physical.physicalDescription.value != null %}
              <li>{{ first.physical.physicalDescription.value }}</li>
              {% endif %}
            </ul>
            {% endif %}


            <!-- RECIPIENT -->
172
            {% if not models.recipient| null || not models.sender| null %}
Tarje.Lavik's avatar
Tarje.Lavik committed
173
174
175
176
177
            <strong>Mottaker:</strong>
            {%include "../../includes/post_sender_recipient.inc"%}
            {% endif %}

            <!-- COMMISSIONED BY -->
Øyvind gjesdal's avatar
Øyvind gjesdal committed
178
            {% if models.commissionedby| length > 0 %}
Tarje.Lavik's avatar
Tarje.Lavik committed
179
180
181
182
183
184
185
186
187
188
            <strong>Oppdragsgiver:</strong>
            <ul class="ui list">
              {% for row in models.commissionedby %}
              <li><a href="{{row.uri.value}}">{{row.label.value}}</a> {% if first.main.isbn %}<br><small>ISBN: {{first.main.isbn.value}}</small>{% endif %}</li>
              {% endfor %}
            </ul>
            {% endif %}


            <!-- ALBUM -->
Øyvind gjesdal's avatar
Øyvind gjesdal committed
189
            {% if models.albums| length > 0 %}
Tarje.Lavik's avatar
Tarje.Lavik committed
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
            <p><i class="fa fa-book"></i> Finnes i albumet<br>
              <a href="{{ first.albums.uri.value }}">{% if first.albums.label.value %}{{ first.albums.label.value }}{% else %}{{ first.albums.identifier.value }}{% endif %}</a>
            </p>
            {% endif %}

            <!-- PUBLISHED -->
            {% for row in models.published %}
            <p><small>Publisert i</small><br><a href="{{row.uri.value}}">{{row.label.value}}</a> {% if row.vol %} vol. {{row.vol.value}} {% endif %}{% if row.issue %} nr. {{row.issue.value}} {% endif %} {% if row.pageStart && row.pageEnd %}(s. {{row.pageStart.value}}-{{row.pageEnd.value}}){% endif %}<br>{% if row.issn %}<small>ISSN: {{row.issn.value}}{% endif %}</small></p>
            {% endfor %}

            <!-- PUBLISHER -->
            {% for row in models.publisher %}
            <p>Utgitt av: <br><a href="{{row.uri.value}}">{{row.label.value}}</a> {% if first.main.isbn %}<br><small>ISBN: {{first.main.isbn.value}}</small>{% endif %}</p>
            {% endfor %}

Øyvind gjesdal's avatar
Øyvind gjesdal committed
205
            {% if models.referencedby|length > 0 %}
Tarje.Lavik's avatar
Tarje.Lavik committed
206
207
208
209
210
211
212
213
214
215
216
217
            <!-- REFERENCED BY -->
            <p>Referanse:</p>
            <ul>
              {% for row in models.referencedby %}
              {% ifchanged row.label.value %}
              <li><a href="{{row.uri.value}}">{{row.label.value}}</a></li>
              {% endifchanged %}
              {% endfor %}
            </ul>
            {% endif %}   

            <!-- EIER--> 
Øyvind gjesdal's avatar
Øyvind gjesdal committed
218
            {% if models.owner|length > 0 %}
Tarje.Lavik's avatar
Tarje.Lavik committed
219
220
221
222
223
            <p>
              <i class="fa fa-archive"></i> Eier: {%for row in models.owner%}{%if !forloop.last%}, {%endif%}<a href="{{row.uri.value}}">{{row.label.value}}</a>{%endfor%}
            </p>
            {%endif%}
          </div>
224
          
Øyvind gjesdal's avatar
Øyvind gjesdal committed
225
          {% set events_enabled = 'test' %}
226
          {% if models.events | length > 0 %}
Øyvind gjesdal's avatar
Øyvind gjesdal committed
227
            {# set events_enabled = true #}
228
          {% else %}
Øyvind gjesdal's avatar
Øyvind gjesdal committed
229
            {# set events_enabled = false #}
230
231
232
233
          {% endif %}
          {% if models.collections | length > 0 %}
          {% set collections_enabled = true %}
          {% else %}
Øyvind gjesdal's avatar
Øyvind gjesdal committed
234
          {% set events_enabled = 'test2' %}
235
236
237
          {% set collections_enabled = false %}
          {% endif %}
          
Tarje.Lavik's avatar
Tarje.Lavik committed
238
          <!-- KNYTTET TIL... -->
Øyvind gjesdal's avatar
Øyvind gjesdal committed
239
          {# events_enabled #} 
Øyvind gjesdal's avatar
Øyvind gjesdal committed
240
          
Tarje.Lavik's avatar
Tarje.Lavik committed
241
          <div class="twelve wide column lightgrey">
Øyvind gjesdal's avatar
Øyvind gjesdal committed
242
            {% if events_enabled or collections_enabled %}
Tarje.Lavik's avatar
Tarje.Lavik committed
243
            <!-- COLLECTIONS -->
244
            {% if collections_enabled %}
Tarje.Lavik's avatar
Tarje.Lavik committed
245
246
247
248
249
            <span class="header">Knyttet til følgende samlinger:</span>
            {% include "../../includes/collections.inc" %} 
            <br />
            {% endif %} 
            <!-- EVENTS -->
250
            {% if events_enabled %}
Tarje.Lavik's avatar
Tarje.Lavik committed
251
252
253
254
255
256
257
258
259
            <span class="header">Knyttet til følgende hendelser:</span>
            {%include "../../includes/events.inc"%}
            <br />
            {% endif %}
            {% endif %}            
          </div>

          <div class="sixteen wide column">
            <!-- DEPICTED -->
Øyvind gjesdal's avatar
Øyvind gjesdal committed
260
            {% if models.depicted| length > 0 %}
Tarje.Lavik's avatar
Tarje.Lavik committed
261
262
263
264
265
266
267
268
            <div class="row">
              <div class="column">
                {%include "../../includes/depicted.inc"%}
              </div>
            </div>
            {% endif %}

            <!-- VERSIONS -->
Øyvind gjesdal's avatar
Øyvind gjesdal committed
269
            {% if models.hasversion|length > 0 %}
Tarje.Lavik's avatar
Tarje.Lavik committed
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
            <div class="row">
              <div class="column">
                <span class="header">Versjoner</span>
                <div class="ui stackable cards">
                  {% for row in models.hasversion %}        
                  <div class="ui card">
                    <a style="min-height:250px; width: 100%;" class="ui image" href="{{ row.uri.value }}">
                      <img {% if row.img %}src="{{row.img.value}}"{%else%}data-src="holder.js/350x250"{%endif%}  alt="">
                    </a>
                    <div class="extra content">
                      <a href="{{ row.uri.value }}">{{ row.label.value }}</a>
                    </div>
                  </div>
                  {% endfor %}
                </div>
              </div>
            </div> 
            {% endif %}

            <!-- RELATION -->
Øyvind gjesdal's avatar
Øyvind gjesdal committed
290
            {% if models.relation| length > 0 %}
Tarje.Lavik's avatar
Tarje.Lavik committed
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
            <div class="row">
              <div class="column">
                <span class="header">Relaterte objekt</span>
                <div class="ui eight doubling cards">
                  {% for row in models.relation %}        
                  <div class="ui card">
                    <a style="min-height:150px; width: 100%;" class="ui image" href="{{ row.uri.value }}">
                      <img {% if row.img %}src="{{row.img.value}}"{%else%}data-src="holder.js/350x250"{%endif%}  alt="">
                    </a>
                    <div class="extra content">
                      <a href="{{ row.uri.value }}">{{ row.label.value }}</a>
                    </div>
                  </div>
                  {% endfor %}
                </div>
              </div>
            </div> 
            <br /> 
            {% endif %}

            <!-- HASPART -->
Øyvind gjesdal's avatar
Øyvind gjesdal committed
312
            {% if models.haspart| length > 0 %}
Tarje.Lavik's avatar
Tarje.Lavik committed
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
            <div class="row">
              <div class="column">
                <span class="header">Inneholder deler:</span>
                <div class="ui eight doubling cards">
                  {% for row in models.haspart %}
                  <div class="ui card">      
                    <a class="ui image" href="{{ row.uri.value }}">
                      <img {% if row.img %}src="{{row.img.value}}"{%else%}data-src="holder.js/250x250"{%endif%} alt=""></a>
                      <div class="description">
                        <a href="{{ row.uri.value }}">{{ row.identifier.value }}</a>
                      </div>
                    </div>
                    {% endfor %}
                  </div>
                </div>
                {% endif %}
              </div>
            </div>
            
            <div class="sixteen wide column">
              <!-- PLACES/MAP -->
              <div class="row">
                <div style="width: 100%;" class="column">
Øyvind gjesdal's avatar
Øyvind gjesdal committed
336
                  {% if models.places| length > 0 %}
Tarje.Lavik's avatar
Tarje.Lavik committed
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
                  {% include "../../includes/place.inc" %}
                  {% endif %}
                </div>
              </div>
            </div>
            <!-- ALL DATA MODAL -->
            {% include "../../includes/all-data-modal.inc" %}
          </div>
        </div>
      </div>
    </div>
  </div>
  {%include "../../includes/footer.inc"%}
</body>
</html>