From fd92c6e61c728247537a378d2daf7d7b8b5e6475 Mon Sep 17 00:00:00 2001
From: root <root@hindustan.uib.no>
Date: Sun, 3 Nov 2013 22:36:41 +0100
Subject: [PATCH] Loads of fixes. Person and SpatialThing is updated. Maps on
 Charters.

---
 components/includes/footer.inc                | 103 +++---
 components/includes/header.inc                |  29 +-
 .../services/instance%2Fcharter/html.template |  24 +-
 .../instance%2Fcharter/queries/places.query   |   3 +-
 .../instance%2Fcharter/queries/po.query       |   1 +
 .../instance%2Fcharter/queries/sp.query       |   1 +
 .../html.template                             |   4 +-
 .../queries/count.query                       |   0
 .../queries/description.query                 |   0
 .../queries/haspart.query                     |   0
 .../queries/main.query                        |   0
 .../queries/photographlist.query              |   0
 .../instance%2Fcollection/html.template       |  35 +-
 .../queries/haspart.query                     |  11 +-
 .../instance%2Fcollection/queries/main.query  |   4 +-
 .../queries/photographlist.query              |  12 +-
 .../services/instance%2Fperson/html.template  |  17 +-
 .../instance%2Fperson/queries/related.query   |  15 +-
 .../instance%2Fspatialthing/html.template     |  76 +++-
 .../queries/count.query                       |   6 +-
 .../queries/locationFor.query                 |  15 +-
 .../instance%2Fspatialthing}/queries/po.query |   0
 .../instance%2Fspatialthing}/queries/sp.query |   0
 components/static/css/basic.css               |  16 +-
 components/static/index.html                  |  14 +-
 components/static/technology.html             | 148 ++++++--
 components/types/bibo__Document/html.template | 346 ++++++++++++++++++
 .../types/bibo__Document/html.template.bak2   | 325 ++++++++++++++++
 .../queries/collections.query                 |   0
 .../queries/description.query                 |   0
 .../queries/dzi.query                         |   3 +-
 .../queries/image.query                       |   0
 .../queries/internalnote.query                |   0
 .../queries/main.query                        |   3 +-
 .../queries/maker.query                       |   0
 .../types/bibo__Document/queries/pdf.query    |   8 +
 .../queries/physicalcondition.query           |   0
 .../queries/physicaldescription.query         |   0
 .../queries/places.query                      |   0
 .../types/bibo__Document/queries/po.query     |   4 +
 .../bibo__Document/queries/recipient.query    |   8 +
 .../queries/relatedresources.query            |   0
 .../types/bibo__Document/queries/sender.query |   8 +
 .../types/bibo__Document/queries/sp.query     |   4 +
 .../bibo__Document/queries/subjects.query     |   8 +
 components/types/bibo__Document/ttl.template  |   1 +
 components/types/bibo__Letter/html.template   |  81 +++-
 .../types/bibo__Letter/queries/dzi.query      |   3 +-
 components/types/rdfs__Resource/html.template |   2 +-
 .../types/ubbont__Document/html.template      | 257 -------------
 .../ubbont__Document/queries/subjects.query   |   8 -
 .../queries/transcription.query               |  17 -
 components/types/xfoaf__Person/html.template  |  41 ---
 .../types/xfoaf__Person/queries/po.query      |   9 -
 .../types/xfoaf__Person/queries/sp.query      |   9 -
 55 files changed, 1125 insertions(+), 554 deletions(-)
 rename components/services/{instance%2Fcollection%2Fastrup-samlingen => instance%2Fcollection%2Fastrup-samlingenNULL}/html.template (96%)
 rename components/services/{instance%2Fcollection%2Fastrup-samlingen => instance%2Fcollection%2Fastrup-samlingenNULL}/queries/count.query (100%)
 rename components/services/{instance%2Fcollection%2Fastrup-samlingen => instance%2Fcollection%2Fastrup-samlingenNULL}/queries/description.query (100%)
 rename components/services/{instance%2Fcollection%2Fastrup-samlingen => instance%2Fcollection%2Fastrup-samlingenNULL}/queries/haspart.query (100%)
 rename components/services/{instance%2Fcollection%2Fastrup-samlingen => instance%2Fcollection%2Fastrup-samlingenNULL}/queries/main.query (100%)
 rename components/services/{instance%2Fcollection%2Fastrup-samlingen => instance%2Fcollection%2Fastrup-samlingenNULL}/queries/photographlist.query (100%)
 rename components/{types/ubbont__Document => services/instance%2Fspatialthing}/queries/po.query (100%)
 mode change 100755 => 100644
 rename components/{types/ubbont__Document => services/instance%2Fspatialthing}/queries/sp.query (100%)
 mode change 100755 => 100644
 create mode 100644 components/types/bibo__Document/html.template
 create mode 100644 components/types/bibo__Document/html.template.bak2
 rename components/types/{ubbont__Document => bibo__Document}/queries/collections.query (100%)
 rename components/types/{ubbont__Document => bibo__Document}/queries/description.query (100%)
 rename components/types/{ubbont__Document => bibo__Document}/queries/dzi.query (63%)
 rename components/types/{ubbont__Document => bibo__Document}/queries/image.query (100%)
 rename components/types/{ubbont__Document => bibo__Document}/queries/internalnote.query (100%)
 rename components/types/{ubbont__Document => bibo__Document}/queries/main.query (65%)
 rename components/types/{ubbont__Document => bibo__Document}/queries/maker.query (100%)
 create mode 100755 components/types/bibo__Document/queries/pdf.query
 rename components/types/{ubbont__Document => bibo__Document}/queries/physicalcondition.query (100%)
 rename components/types/{ubbont__Document => bibo__Document}/queries/physicaldescription.query (100%)
 rename components/types/{ubbont__Document => bibo__Document}/queries/places.query (100%)
 create mode 100755 components/types/bibo__Document/queries/po.query
 create mode 100755 components/types/bibo__Document/queries/recipient.query
 rename components/types/{ubbont__Document => bibo__Document}/queries/relatedresources.query (100%)
 create mode 100755 components/types/bibo__Document/queries/sender.query
 create mode 100755 components/types/bibo__Document/queries/sp.query
 create mode 100755 components/types/bibo__Document/queries/subjects.query
 create mode 100644 components/types/bibo__Document/ttl.template
 delete mode 100755 components/types/ubbont__Document/html.template
 delete mode 100755 components/types/ubbont__Document/queries/subjects.query
 delete mode 100755 components/types/ubbont__Document/queries/transcription.query
 delete mode 100755 components/types/xfoaf__Person/html.template
 delete mode 100755 components/types/xfoaf__Person/queries/po.query
 delete mode 100755 components/types/xfoaf__Person/queries/sp.query

diff --git a/components/includes/footer.inc b/components/includes/footer.inc
index 406522f1..7d170afd 100755
--- a/components/includes/footer.inc
+++ b/components/includes/footer.inc
@@ -9,20 +9,43 @@
 					<!-- <li><a href="http://marcus.uib.no/manuscripts"><span class="glyphicon glyphicon-book"></span>  Manuskript</a></li>
 					<li><a href="http://marcus.uib.no/charters"><span class="glyphicon glyphicon-book"></span>  Diplom</a></li> -->										
 				</ul>
+				<img class="col-md-10 hidden-xs hidden-sm" src="{{lodspk.home}}img/UiBmerke.svg" />
+			</div>
 			
-<!--
-				<h3>Sider som må lages</h3>
-					<ul class="nav">
-						<li><a href="#">Om nettsiden</a></li>
-						<li><a href="#">Rettigheter</a></li>
-						<li><a href="http://marcus.uib.no/technology.html"><span class="glyphicon glyphicon-cog"></span> Teknologi</a></li>
-					</ul>
--->
+			<div class="col-md-9">
+			<div class="row">
+			<div class="col-md-4 col-sm-6">
+				<h3>Om Marcus</h3>
+				<ul class="nav">
+					<!-- <li><a href="#">Om nettsiden</a></li> -->
+					<li><a href="http://marcus.uib.no/rights.html"><span class="glyphicon glyphicon-copyright-mark"></span> Rettigheter</a></li> 
+					<li><a href="http://marcus.uib.no/technology.html"><span class="glyphicon glyphicon-cog"></span> Teknologi</a></li>
+				</ul>
+				
+				<div class="hidden-xs">
+				<h3>Ã…pningstider:</h3>
+				<ul class="list-unstyled">
+					<li><b>Mandag:</b> <span class="pull-right">09:00 - 15:00</span></li>
+					<li><b>Tirsdag:</b> <span class="pull-right">09:00 - 15:00</span></li>
+					<li><b>Onsdag:</b> <span class="pull-right">09:00 - 15:00</span></li>
+					<li><b>Torsdag:</b> <span class="pull-right">10:00 - 15:00</span></li>
+					<li><b>Fredag:</b> <span class="pull-right">Stengt</span></li>
+				</ul>
+			
+				<h3>Postadresse</h3>
+				<address>
+				<strong>Universitetsbiblioteket i Bergen</strong><br>
+				Billedsamlingen /<br>
+				Manuskript- og Librarsamlingen<br>
+				Postboks 7808<br>
+				5020 Bergen
+				</address>
+				</div>
 			</div>
 		
-			<div class="col-md-3">
+			<div class="col-md-4 col-sm-6">
 				<h3><a href="http://spesial.b.uib.no/?page_id=505">Manuskript- og librarsamlingen</a></h3>
-				<ul class="list-unstyled">
+				<ul class="hidden-xs list-unstyled">
 					<li><a href="http://spesial.b.uib.no/?page_id=1928">Samlingene</a></li>
 					<li><a href="http://spesial.b.uib.no/?page_id=1749">Om Manuskriptsamlingen</a></li>
 					<li><a href="http://spesial.b.uib.no/?page_id=1013">Utstillinger</a></li>
@@ -30,62 +53,40 @@
 					<li><a href="http://spesial.b.uib.no/?page_id=776">Presse</a></li>
 					<li><a href="http://spesial.b.uib.no/?page_id=1914">Digitalisert materiale</a></li>
 				</ul>
+				<h4>Besøksadresse</h4>
+				<address>
+				<strong>Manuskript- og Librarsamlingen</strong><br>
+				HF-bygget<br>
+				Sydnesplassen 7
+				</address>
+				
+				<address>
+				<a href="mailto:mslib@ub.uib.no">Epost</a>
+				</address>
 			</div>
 		
-			<div class="col-md-3">
+			<div class="col-md-4 col-sm-6">
 				<h3><a href="http://spesial.b.uib.no/?page_id=14">Billedsamlingen</a></h3>
-				<ul class="list-unstyled">
+				<ul class="hidden-xs list-unstyled">
 					<li><a href="http://spesial.b.uib.no/?page_id=97">Samlingene</a></li>
 					<li><a href="http://spesial.b.uib.no/?page_id=304">Vilkår for bruk av Universitetsbiblioteket i Bergens Billedsamling</a></li>
 					<li><a href="http://spesial.b.uib.no/?page_id=24">Priser og tjenester</a></li>
 					<li><a href="http://spesial.b.uib.no/?page_id=175">Nettutstillinger</a></li>
 					<li><a href="http://spesial.b.uib.no/?page_id=229">Tekster og artikler fra Billedsamlingen</a></li>
 				</ul>
-				<img class="col-md-12" src="{{lodspk.home}}img/UiBmerke.svg" />
-			</div>
-		
-			<div class="col-md-3">	
-				<h3>Ã…pningstider:</h3>
-				<ul class="list-unstyled">
-					<li><b>Mandag:</b> <span class="pull-right">09:00 - 15:00</span></li>
-					<li><b>Tirsdag:</b> <span class="pull-right">09:00 - 15:00</span></li>
-					<li><b>Onsdag:</b> <span class="pull-right">09:00 - 15:00</span></li>
-					<li><b>Torsdag:</b> <span class="pull-right">10:00 - 15:00</span></li>
-					<li><b>Fredag:</b> <span class="pull-right">Stengt</span></li>
-				</ul>
-				
-				<h3>Besøksadresse</h3>
+				<h4>Besøksadresse</h4>	
 				<address>
 				<strong>Billedsamlingen</strong><br>
-				Rokkanhuset<br>
+				Rokkanhuset (1.etasje)<br>
 				Nygårdsgaten 5<br>
 				</address>
-				1.etasje<br>
-				<address>
-				<a href="mailto:billed@ub.uib.no">Epost</a>
-				</address>
 				
 				<address>
-				<strong>Manuskript- og Librarsamlingen</strong><br>
-				HF-bygget<br>
-				Sydnesplassen 7
-				</address>
-				
-				<address>
-				<a href="mailto:mslib@ub.uib.no">Epost</a>
-				</address>
-				
-				
-				<h3>Postadresse</h3>
-				<address>
-				<strong>Universitetsbiblioteket i Bergen</strong><br>
-				Billedsamlingen /<br>
-				Manuskript- og Librarsamlingen<br>
-				Postboks 7808<br>
-				5020 Bergen
+				<a href="mailto:billed@ub.uib.no">Epost</a>
 				</address>
-			
 			</div>
+			</div>
+
 		</div>
 	</div>
 </footer>  
@@ -93,8 +94,8 @@
 <script type="text/javascript">
 $('.bs-sidebar').affix({
     offset: {
-      top: 50
-    , bottom: function () {
+      top: 0, 
+      bottom: function () {
         return (this.bottom = $('.footer').outerHeight(false))
       }
     }
diff --git a/components/includes/header.inc b/components/includes/header.inc
index ab0aee55..9bd1e613 100755
--- a/components/includes/header.inc
+++ b/components/includes/header.inc
@@ -2,12 +2,7 @@
 <html lang="no" prefix="og: http://ogp.me/ns#">
   <head>
     <meta charset="utf-8">
-    <title>
-    {% if first.main.label.value != null %}
-    {{first.main.label.value}} - 
-    {% else %}
-    {{first.main.title.value}}
-    {% endif %}{{lodspk.title}}</title>
+    <title>{{lodspk.title}}</title> 
     
     <link rel="shortcut icon" type="image/x-icon" href="{{lodspk.home}}/img/favicon.ico">
 
@@ -50,7 +45,6 @@
     <link rel="alternate" type="text/plain" title="N-Triples Version" href="{{lodspk.local.value}}.nt" />
     <link rel="alternate" type="application/json" title="RDFJSON Version" href="{{lodspk.local.value}}.json" />
     <style>
-      body { padding-top: 90px; }
       .wait{
         background-image:url('{{lodspk.home}}img/wait.gif');
         background-repeat:no-repeat;
@@ -136,7 +130,7 @@
   </head>
   <body>
       <div id="wrap">
- <div class="navbar navbar-default navbar-fixed-top navbar-inverse marcus-header">
+		<header class="navbar navbar-default navbar-fixed-top navbar-inverse marcus-header" role="banner">
 		  <div class="navbar-header">
             <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
               <span class="icon-bar"></span>
@@ -148,16 +142,13 @@
           </div>
 
           
-          <div class="collapse navbar-collapse">
+          <nav class="collapse navbar-collapse">
             <ul class="nav navbar-nav">
-<!--               	<li><a href="{{lodspk.home}}">Hjem</a></li> -->
-              	
-
-<li class="dropdown">
-<a id="browse1" class="dropdown-toggle" role="button" data-toggle="dropdown" data-target="#" href="#"> Meny <span class="caret"></span></a>              				
-	<ul class="dropdown-menu list-unstyled" aria-labelledby="browse1" role="meny">
-    	{%include "../../includes/nav.inc"%}
-	</ul>
+<!--            <li><a href="{{lodspk.home}}">Hjem</a></li> -->
+              	<li class="dropdown">
+				  	<a id="browse1" class="dropdown-toggle" role="button" data-toggle="dropdown" data-target="#" href="#"> Meny <span class="caret"></span></a>              							<ul class="dropdown-menu" aria-labelledby="browse1" role="meny">
+					  	{%include "../../includes/nav.inc"%}
+					</ul>
 				</li>
 			</ul>
 
@@ -196,7 +187,7 @@
             -->
 
             
-          </div><!--/.nav-collapse -->
-      </div>
+          </nav><!--/.nav-collapse -->
+      </header>
 
 
diff --git a/components/services/instance%2Fcharter/html.template b/components/services/instance%2Fcharter/html.template
index 754f6a67..36a0367b 100755
--- a/components/services/instance%2Fcharter/html.template
+++ b/components/services/instance%2Fcharter/html.template
@@ -143,23 +143,29 @@
 		{% endfor %} 
 		
 		
-		{% if first.places.place.value != null %}
+		{% if models.places|length != 0%}
     		<div id="places">
-    	 {% if first.places.long.value != null %}
-    	 	<div id="map-wrap">
+    		<div class="map-wrap">
+    		{% if first.coordinates.long.value != null%}
     		<div id="map"></div>
+    		
+    		{% else %}
+	    		<div class="no-map">
+		    		<div class="alert alert-warning">
+		    			<p><strong>Oi!</strong> Her har vi ikke plassert stedene på kartet. Trykker du på lenkene får du uansett opp mange flott bilder!</p>
+		    		</div>
+		    {% endif %}
+    		    		
     		<ul class="places-inline-list">
 		{% for row in models.places %}
         	<li><a href="{{ row.place.value }}" /><span class="glyphicon glyphicon-map-marker"></span> {{row.placeName.value}}</a></li>
 		{% endfor %} 
-		</ul>
-    		</div>
-    	{% endif %} 
 		
-
-		{% if first.places.place.value != null %}
+		</ul>
+    		</div>		   	 
+			{% endif %}
+		{% if models.places|length != 0 %}
     		</div>
-    	{% endif %} 
     	{% endif %} 
 		
 		<script>
diff --git a/components/services/instance%2Fcharter/queries/places.query b/components/services/instance%2Fcharter/queries/places.query
index 0398c7be..e86dbeb9 100755
--- a/components/services/instance%2Fcharter/queries/places.query
+++ b/components/services/instance%2Fcharter/queries/places.query
@@ -1,6 +1,7 @@
 SELECT DISTINCT ?place ?placeName ?lat ?long WHERE {
 
-	OPTIONAL { <{{ uri|deurifier }}> dct:spatial ?place . ?place rdfs:label ?placeName . OPTIONAL { ?place geo:lat ?lat ; geo:long ?long .}}
+	OPTIONAL { <{{ uri|deurifier }}> dct:spatial ?place . ?place skos:prefLabel ?placeName . 
+	OPTIONAL { ?place geo:lat ?lat ; geo:long ?long .}}
 	
 
 }
diff --git a/components/services/instance%2Fcharter/queries/po.query b/components/services/instance%2Fcharter/queries/po.query
index de3f136a..a52155d5 100755
--- a/components/services/instance%2Fcharter/queries/po.query
+++ b/components/services/instance%2Fcharter/queries/po.query
@@ -1,4 +1,5 @@
 SELECT ?p ?o  WHERE {
 	 <{{uri}}> ?p ?o .
 }
+ORDER BY ?p
 LIMIT 100
\ No newline at end of file
diff --git a/components/services/instance%2Fcharter/queries/sp.query b/components/services/instance%2Fcharter/queries/sp.query
index ce7b67f5..0a62145a 100755
--- a/components/services/instance%2Fcharter/queries/sp.query
+++ b/components/services/instance%2Fcharter/queries/sp.query
@@ -1,4 +1,5 @@
 SELECT ?s ?p  WHERE {  
        ?s ?p <{{uri}}> .
 }
+ORDER BY ?p
 LIMIT 100
\ No newline at end of file
diff --git a/components/services/instance%2Fcollection%2Fastrup-samlingen/html.template b/components/services/instance%2Fcollection%2Fastrup-samlingenNULL/html.template
similarity index 96%
rename from components/services/instance%2Fcollection%2Fastrup-samlingen/html.template
rename to components/services/instance%2Fcollection%2Fastrup-samlingenNULL/html.template
index cdccd13a..baca8171 100755
--- a/components/services/instance%2Fcollection%2Fastrup-samlingen/html.template
+++ b/components/services/instance%2Fcollection%2Fastrup-samlingenNULL/html.template
@@ -1,8 +1,8 @@
 {%include "../../includes/header.inc"%}
      <div class="container main-body">
     	<div class="row">
-			<div class="col-md-3">
-			<div id="bs-sidebar hidden-xs hidden-sm affix">
+			<div class="col-md-3 hidden-xs hidden-sm ">
+			<div id="bs-sidebar affix">
 				
 				<div class="feedback-error alert alert-warning">
 					<p><a href="mailto:billed@uib.no"><span class="glyphicon glyphicon-exclamation-sign"></span> Feil!? Gi oss beskjed!</a></p>
diff --git a/components/services/instance%2Fcollection%2Fastrup-samlingen/queries/count.query b/components/services/instance%2Fcollection%2Fastrup-samlingenNULL/queries/count.query
similarity index 100%
rename from components/services/instance%2Fcollection%2Fastrup-samlingen/queries/count.query
rename to components/services/instance%2Fcollection%2Fastrup-samlingenNULL/queries/count.query
diff --git a/components/services/instance%2Fcollection%2Fastrup-samlingen/queries/description.query b/components/services/instance%2Fcollection%2Fastrup-samlingenNULL/queries/description.query
similarity index 100%
rename from components/services/instance%2Fcollection%2Fastrup-samlingen/queries/description.query
rename to components/services/instance%2Fcollection%2Fastrup-samlingenNULL/queries/description.query
diff --git a/components/services/instance%2Fcollection%2Fastrup-samlingen/queries/haspart.query b/components/services/instance%2Fcollection%2Fastrup-samlingenNULL/queries/haspart.query
similarity index 100%
rename from components/services/instance%2Fcollection%2Fastrup-samlingen/queries/haspart.query
rename to components/services/instance%2Fcollection%2Fastrup-samlingenNULL/queries/haspart.query
diff --git a/components/services/instance%2Fcollection%2Fastrup-samlingen/queries/main.query b/components/services/instance%2Fcollection%2Fastrup-samlingenNULL/queries/main.query
similarity index 100%
rename from components/services/instance%2Fcollection%2Fastrup-samlingen/queries/main.query
rename to components/services/instance%2Fcollection%2Fastrup-samlingenNULL/queries/main.query
diff --git a/components/services/instance%2Fcollection%2Fastrup-samlingen/queries/photographlist.query b/components/services/instance%2Fcollection%2Fastrup-samlingenNULL/queries/photographlist.query
similarity index 100%
rename from components/services/instance%2Fcollection%2Fastrup-samlingen/queries/photographlist.query
rename to components/services/instance%2Fcollection%2Fastrup-samlingenNULL/queries/photographlist.query
diff --git a/components/services/instance%2Fcollection/html.template b/components/services/instance%2Fcollection/html.template
index 94c08fa7..711dae2c 100755
--- a/components/services/instance%2Fcollection/html.template
+++ b/components/services/instance%2Fcollection/html.template
@@ -1,13 +1,12 @@
 {%include "../../includes/header.inc"%}
      <div class="container main-body">
     	<div class="row">
-			<div class="col-md-3">
-			<div id="bs-sidebar hidden-xs hidden-sm affix">
-				
-				<div class="feedback-error alert alert-warning">
-					<p><a href="mailto:billed@uib.no"><span class="glyphicon glyphicon-exclamation-sign"></span> Feil!? Gi oss beskjed!</a></p>
-				</div>
-				
+			<div class="col-md-3 hidden-xs hidden-sm">
+			
+			<div id="bs-sidebar affix">
+			{% if first.main.logo != null %}
+				<img class="img-circle img-border img-responsive" src="{{first.main.logo.value}}">
+			{% endif %}
 				<div class="browse-sidebar">
 					<h4>Bla i:</h4>
 					<ul class="nav">
@@ -21,13 +20,14 @@
 			
     <h1>{{first.main.label.value}} <span class="badge">{{ first.count.total.value }}</span></h1>
     <p class="lead">{{ first.main.description.value }}</p>
+    
    {% if first.photographlist.imgUri != null %}
-   {% for row in models.haspart %}
+   {% for row in models.photographlist %}
     	<div class="col-md-4 col-lg-4">
         	<div>
-				<a class="thumbnail" href="{{ row.imgUri.value }}"><img data-src="holder.js/300x200" src="{{row.image.value}}" alt=""></a>
+				<a class="thumbnail" href="{{ row.uri.value }}"><img data-src="holder.js/300x200" src="{{row.image.value}}" alt=""></a>
       		<div class="caption">
-      		<h3>{{ row.imgTitle.value }}</h3>
+      		<h3>{{ row.label.value }}</h3>
       		</div>
 	  		</div>
       	</div>
@@ -37,14 +37,15 @@
    {% if first.haspart.uri != null %}
    <ul class="list-unstyled">
    {% for row in models.haspart %}
-	      	<li>
-	      		<strong><a href="{{ row.uri.value }}"><span class="glyphicon glyphicon-th"></span> {{ row.label.value }}</a></strong><br>
-				<p>{{row.description.value}}</p>
-			</li>
+    	<li>
+	    	<strong><a href="{{ row.uri.value }}"><span class="glyphicon glyphicon-book"></span>  {{row.label.value}}</a></strong> {% if row.hasTranscription.value == "true" %}<span class="label label-primary">Transkribert</span>{% endif %} {% if row.hasPage.value == "true" %}<span class="label label-default">Faksimile</span>{% endif %}<br>
+			<p>{{row.description.value}}</p>
+		</li>
 	{% endfor %}
+	</ul>
 	{% endif %}
     
-        </div>
+    
         {% if first.count.total.value > 100 %}
         <script>
 	    if ("{{lodspk.args.arg1}}".length < 1)
@@ -56,8 +57,8 @@
 	    var offset = 100;
 	    var nextPage = page+offset;
 		var prevPage = page - offset;
-		var next_uri = '{{lodskp.home}}instance/collection/'+'{{lodspk.args.arg0}}'+'/' + nextPage;
-	    var prev_uri = '{{lodskp.home}}instance/collection/'+'{{lodspk.args.arg0}}'+'/' + prevPage;
+		var next_uri = '{{lodskp.home}}'+'{{lodspk.args.arg0}}'+'/' + nextPage;
+	    var prev_uri = '{{lodskp.home}}'+'{{lodspk.args.arg0}}'+'/' + prevPage;
 		</script>
 	    <ul class="pager">
 	    	<li><a href="" id="prev">Forrige 100</a></li>
diff --git a/components/services/instance%2Fcollection/queries/haspart.query b/components/services/instance%2Fcollection/queries/haspart.query
index 641b5736..cb32a591 100644
--- a/components/services/instance%2Fcollection/queries/haspart.query
+++ b/components/services/instance%2Fcollection/queries/haspart.query
@@ -1,7 +1,14 @@
-SELECT DISTINCT ?uri ?label ?description WHERE {
+SELECT * WHERE {
+	{ SELECT DISTINCT ?uri ?label ?description ?hasTranscription ?hasPage WHERE {
 	<http://data.ub.uib.no/instance/collection/{{ lodspk.args.arg0 }}> dct:hasPart ?uri .
+	BIND ( EXISTS { ?uri ubbont:hasPage ?page } AS ?hasPage )
+	BIND ( EXISTS { ?uri ubbont:hasTranscription ?transcription } AS ?hasTranscription )
 	OPTIONAL { ?uri dct:title ?label . }
 	OPTIONAL { ?uri rdfs:label ?label . }
 	OPTIONAL { ?uri dct:description ?description . }
 }
-ORDER BY ?label
\ No newline at end of file
+ORDER BY ?label
+	OFFSET {{lodspk.args.arg1|default:0}} 
+	LIMIT 100 
+	}
+}
\ No newline at end of file
diff --git a/components/services/instance%2Fcollection/queries/main.query b/components/services/instance%2Fcollection/queries/main.query
index 744e6843..076f9c0e 100755
--- a/components/services/instance%2Fcollection/queries/main.query
+++ b/components/services/instance%2Fcollection/queries/main.query
@@ -1,5 +1,7 @@
-SELECT DISTINCT ?label ?description WHERE {
+SELECT DISTINCT ?label ?description ?logo WHERE {
 	OPTIONAL { <http://data.ub.uib.no/instance/collection/{{lodspk.args.arg0}}> rdfs:label ?label . }
 	OPTIONAL { <http://data.ub.uib.no/instance/collection/{{lodspk.args.arg0}}> dct:title ?label . }
 	OPTIONAL { <http://data.ub.uib.no/instance/collection/{{lodspk.args.arg0}}> dct:description ?description . }
+	OPTIONAL { <http://data.ub.uib.no/instance/collection/{{lodspk.args.arg0}}> foaf:logo ?logo . }
+
 } 
\ No newline at end of file
diff --git a/components/services/instance%2Fcollection/queries/photographlist.query b/components/services/instance%2Fcollection/queries/photographlist.query
index 23ee7b34..d227897a 100755
--- a/components/services/instance%2Fcollection/queries/photographlist.query
+++ b/components/services/instance%2Fcollection/queries/photographlist.query
@@ -1,12 +1,12 @@
 SELECT * WHERE {
-	{ SELECT DISTINCT ?imgUri ?image ?imgTitle WHERE {
-	<http://data.ub.uib.no/instance/collection/{{ lodspk.args.arg0 }}> dct:hasPart ?imgUri .
-	OPTIONAL { ?imgUri ubbont:hasRepresentation/ubbont:hasURI ?image .}
-	OPTIONAL { ?imgUri dct:title ?imgTitle . }
+	{ SELECT DISTINCT ?uri ?image ?label WHERE {
+	<http://data.ub.uib.no/instance/collection/{{ lodspk.args.arg0 }}> dct:hasPart ?uri .
+	OPTIONAL { ?uri ubbont:hasRepresentation/ubbont:hasURI ?image .}
+	OPTIONAL { ?uri dct:title ?label . }
     }
-    ORDER BY ?imgUri
+    ORDER BY ?uri
 OFFSET {{lodspk.args.arg1|default:0}} LIMIT 100 
 	}
    
-    ?imgUri ubbont:showWeb true .
+    ?uri ubbont:showWeb true .
 } 
\ No newline at end of file
diff --git a/components/services/instance%2Fperson/html.template b/components/services/instance%2Fperson/html.template
index c9cf2952..a683e459 100755
--- a/components/services/instance%2Fperson/html.template
+++ b/components/services/instance%2Fperson/html.template
@@ -21,8 +21,10 @@
 			<div class="col-md-9">
 
     {% for row in models.main %}
-    	<h1>{{ row.name.value }}</h1>
-    	<p>{% if row.birthDate %}Født: {{ row.birthDate.value }}. {% endif %}{% if row.deathDate %}Død: {{ row.deathDate.value }}{% endif %}</p>
+    	<h1>{{ row.name.value }} <small>{% if row.birthDate.value || row.deathDate.value %}
+    	({% if row.birthDate %}{{ row.birthDate.value }}{% else %}&nbsp;&nbsp;&nbsp;&nbsp;-{% endif %}
+    	{% if row.deathDate %}-{{ row.deathDate.value }}{% else %}-&nbsp;&nbsp;&nbsp;&nbsp;){% endif %}
+    	{% else %}{% endif %}</small></h1>
     {% endfor %}
 
 {% if first.dbpedia.sameas.dbparticle != null %}
@@ -39,15 +41,16 @@
 	{% if models.related %}
 	<div class="row related">
     {% for row in models.related %}
-        <div class="col-md-4 col-lg-4">
-        	<div>
-			<a class="thumbnail" href="{{row.imgUri.value}}"><img src="{{row.image.value}}" alt=""></a>
+        <div class="col-xs-12 col-sm-6 col-md-3 col-lg-3">
+        	<div class="thumbnail">
+			<a href="{{row.uri.value}}"><img {% if row.image.value %} src="{{ row.image.value }}" {% else %} data-src="holder.js/100%x140/text:Uten bilde" {% endif %} alt=""></a>
+
 			<div class="caption">
-      		<h3>{%if row.p.localname == "made" %}<span class="glyphicon glyphicon-camera"></span> {%endif%}
+      		<h3><a href="{{row.uri.value}}">{%if row.p.localname == "made" %}<span class="glyphicon glyphicon-camera"></span> {%endif%}
       		{%if row.p.localname == "commissioned" %}<span class="glyphicon glyphicon-credit-card"></span> {%endif%}
 	  		{%if row.p.localname == "depiction" %}<span class="glyphicon glyphicon-user"></span> {%endif%}
 	  		{%if row.p.localname == "relation" %}<span class="glyphicon glyphicon-user"></span> {%endif%}
-      		{{ row.title.value }}</h3>
+      		{{ row.label.value }}</a></h3>
       		<p>{{row.p.localname}}</p>
 	  		</div>
 	  		</div>
diff --git a/components/services/instance%2Fperson/queries/related.query b/components/services/instance%2Fperson/queries/related.query
index d798b478..e9f8fb85 100755
--- a/components/services/instance%2Fperson/queries/related.query
+++ b/components/services/instance%2Fperson/queries/related.query
@@ -1,14 +1,17 @@
 SELECT * WHERE {
 	{
-	SELECT ?title ?imgUri ?image ?p WHERE {
-    <http://data.ub.uib.no/instance/person/{{ lodspk.args.arg0 }}> ?p ?imgUri .
-    ?imgUri ubbont:hasRepresentation/ubbont:hasURI ?image .
-    OPTIONAL { ?imgUri dct:title ?title .} 
+	SELECT ?label ?uri ?image ?p WHERE {
+    <http://data.ub.uib.no/instance/person/{{ lodspk.args.arg0 }}> ?p ?uri .
+    ?uri a ?class .
+    ?class rdfs:subClassOf+ bibo:Document .
+	OPTIONAL { ?uri ubbont:hasRepresentation/ubbont:hasURI ?image . }
+	OPTIONAL { ?uri ubbont:hasRepresentation/ubbont:hasThumbnail ?image . }
+    OPTIONAL { ?uri dct:title ?label .} 
+    OPTIONAL { ?uri rdfs:label ?label .}
     }
-    ORDER BY ?imgUri
+    ORDER BY ?uri
 OFFSET {{lodspk.args.arg1|default:0}}
 LIMIT 100
 	}
-    ?imgUri ubbont:showWeb true .
 }  
 
diff --git a/components/services/instance%2Fspatialthing/html.template b/components/services/instance%2Fspatialthing/html.template
index c25db08c..14df0001 100755
--- a/components/services/instance%2Fspatialthing/html.template
+++ b/components/services/instance%2Fspatialthing/html.template
@@ -3,7 +3,7 @@
     <div class="container main-body">
     	<div class="row">
 		    <div class="col-md-3 col-lg-3">
-			    <div class="bs-sidebar">
+			    <div class="bs-sidebar col-lg-12">
 			    {% for row in models.broader %}
 				<ul class="broader-subjects">
 				{% if row.broader %}
@@ -88,19 +88,19 @@
    	<div class="row related">
     {% for row in models.locationFor %}
     {% if row.class.value == "http://data.ub.uib.no/ontology/CatalogueCard" %}
-    	    <div class="col-md-4 col-lg-4">
-    	<div class="catalogue-card">
-       		<h3><a href="{{ row.imgUri.value }}"> {{ row.title.value }}</a></h3>
-       		<p>…fra Brosings topografiske katalogkort</p>
-      	</div>
+    	<div class="col-md-4 col-lg-4">
+    		<div class="catalogue-card">
+       			<h3><a href="{{ row.imgUri.value }}"> {{ row.title.value }}</a></h3>
+	   			<p>…fra Brosings topografiske katalogkort</p>
+	   		</div>
       	</div>
     {% else %}
     	<div class="col-md-4 col-lg-4">
-        	<div>
-				<a class="thumbnail" href="{{ row.imgUri.value }}"><img data-src="holder.js/300x200" src="{{row.image.value}}" alt=""></a>
-      		<div class="caption">
-      			<h3>{{ row.title.value }}</h3>
-      		</div>
+        	<div class="thumbnail">
+				<a href="{{ row.uri.value }}"><img {% if row.image.value %} src="{{ row.image.value }}" {% else %} data-src="holder.js/100%x200/text:Uten bilde" {% endif %} alt=""></a>
+				<div class="caption">
+      				<h3><a href="{{ row.uri.value }}">{{ row.label.value }}</a></h3>
+	  				</div>
 	  		</div>
       	</div>
       	{% endif %}
@@ -109,7 +109,7 @@
     {% endif %}
     
     {% if first.count.total.value > 100 %}
-    <div class="row">
+    <div>
         <script>
 	    if ("{{lodspk.args.arg1}}".length < 1)
 	    	{page = 0;}
@@ -130,13 +130,53 @@
 		<script>
 		$("#next").attr("href",next_uri);
 		$("#prev").attr("href",prev_uri);
-	</script>
-      </div>
-	  {% endif %}
-    </div> <!-- End Row -->
-    
+		</script>
+    </div>
+	{% endif %}
+
+
+        <div class="row full-metadata-div">
+    	<div class="col-lg-12">
+			<button type="button" class="btn btn-sm btn-info" data-toggle="collapse" data-target="#full-meta-view">
+				Vis all informasjon
+			</button>
+
+			<div id="full-meta-view" class="collapse">
+				<table class="table table-striped" about="{{uri}}">
+					<thead>
+						<tr><th>Subject</th><th>Predicate</th><th>Object</th></tr>
+					</thead>
+			    {% for row in models.po %}
+						<tr>
+							<td>{%if forloop.first%}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{%endif%}</td>
+							<td><a href='{{row.p.value}}'>{{row.p.curie}}</a></td>
+							<td>
+								{%if row.o.uri == 1%}
+								<a rel='{{row.p.value}}' href='{{row.o.value}}'>{{row.o.curie}}</a>
+								{%else%}
+								<span property='{{row.p.value}}'>{{row.o.value}}</span>
+								{%endif%}
+							</td>
+						</tr>
+				{% endfor %}
+
+				{% for row in models.sp %}
+						<tr>
+							<td><a href='{{row.s.value}}'>{{row.s.curie}}</a></td>
+							<td><a rev='{{row.s.value}}' href='{{row.p.value}}'>{{row.p.curie}}</a></td>
+							<td>{%if forloop.first%}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{%endif%}</td>
+						</tr>
+				{% endfor %}
+					<thead>
+						<tr><th>Subject</th><th>Predicate</th><th>Object</th></tr>
+					</thead>
+				</table>
+			</div>
+		</div>
+    </div>      
+
 
-</div></div>
+</div></div></div>
 {%include "../../includes/footer.inc"%}
   </body>
 </html>
diff --git a/components/services/instance%2Fspatialthing/queries/count.query b/components/services/instance%2Fspatialthing/queries/count.query
index 6d49f138..7ca7811c 100755
--- a/components/services/instance%2Fspatialthing/queries/count.query
+++ b/components/services/instance%2Fspatialthing/queries/count.query
@@ -1,4 +1,4 @@
-SELECT DISTINCT (COUNT(?imgUri) AS ?total) WHERE {	 
-	OPTIONAL {<http://data.ub.uib.no/instance/spatialthing/{{ lodspk.args.arg0 }}>  ubbont:locationFor ?imgUri . 
-	?imgUri ubbont:showWeb true .}	
+SELECT DISTINCT (COUNT(?uri) AS ?total) WHERE {	 
+	OPTIONAL { <http://data.ub.uib.no/instance/spatialthing/{{ lodspk.args.arg0 }}>  ubbont:locationFor ?uri . }
+	OPTIONAL { ?uri dct:spatial <http://data.ub.uib.no/instance/spatialthing/{{ lodspk.args.arg0 }}> . }	
 }  
diff --git a/components/services/instance%2Fspatialthing/queries/locationFor.query b/components/services/instance%2Fspatialthing/queries/locationFor.query
index 4fc7dcb5..e230e28a 100755
--- a/components/services/instance%2Fspatialthing/queries/locationFor.query
+++ b/components/services/instance%2Fspatialthing/queries/locationFor.query
@@ -1,13 +1,14 @@
 SELECT * WHERE {
-	{ SELECT DISTINCT ?imgUri ?image ?title ?class WHERE {
-	<http://data.ub.uib.no/instance/spatialthing/{{ lodspk.args.arg0 }}> ubbont:locationFor ?imgUri .
-	?imgUri a ?class .
-	OPTIONAL { ?imgUri ubbont:hasRepresentation/ubbont:hasURI ?image . }
-    OPTIONAL { ?imgUri dct:title ?title . }
+	{ SELECT DISTINCT ?uri ?image ?label ?class WHERE {
+	{ ?uri dct:spatial <http://data.ub.uib.no/instance/spatialthing/{{ lodspk.args.arg0 }}> . } UNION
+	{ <http://data.ub.uib.no/instance/spatialthing/{{ lodspk.args.arg0 }}> ubbont:locationFor ?uri . }
+	OPTIONAL { ?uri ubbont:hasRepresentation/ubbont:hasURI ?image . }
+	OPTIONAL { ?uri ubbont:hasRepresentation/ubbont:HhasThumbnail ?image . }
+    OPTIONAL { ?uri dct:title ?label . }
+    OPTIONAL { ?uri rdfs:label ?label . }
     }
-    ORDER BY ?imgUri
+    ORDER BY ?uri
 OFFSET {{lodspk.args.arg1|default:0}} LIMIT 100 
 	}
    
-    ?imgUri ubbont:showWeb true .
 }  
diff --git a/components/types/ubbont__Document/queries/po.query b/components/services/instance%2Fspatialthing/queries/po.query
old mode 100755
new mode 100644
similarity index 100%
rename from components/types/ubbont__Document/queries/po.query
rename to components/services/instance%2Fspatialthing/queries/po.query
diff --git a/components/types/ubbont__Document/queries/sp.query b/components/services/instance%2Fspatialthing/queries/sp.query
old mode 100755
new mode 100644
similarity index 100%
rename from components/types/ubbont__Document/queries/sp.query
rename to components/services/instance%2Fspatialthing/queries/sp.query
diff --git a/components/static/css/basic.css b/components/static/css/basic.css
index 3ac54062..93a6e964 100755
--- a/components/static/css/basic.css
+++ b/components/static/css/basic.css
@@ -1,7 +1,12 @@
+.main-body { padding-top: 90px; }
+
 /* Large desktops and up */
 @media screen and (min-width: 800px) {
 
-.main-body { min-height: 500px;}
+.main-body { 
+	min-height: 500px;
+
+}
 
 }
 
@@ -17,11 +22,11 @@
   /* Widen the fixed sidebar */
   .bs-sidebar.affix,
   .bs-sidebar.affix-bottom {
-    
+	width: 263px;
   }
   .bs-sidebar.affix {
     position: fixed; /* Undo the static from mobile-first approach */
-    top: 80px;
+    top: 90px;
   }
   .bs-sidebar.affix-bottom {
     position: absolute; /* Undo the static from mobile-first approach */
@@ -220,7 +225,7 @@ footer {
 .dzi-wrap {
 	margin: 0; padding: 0 !important;
 }
-#dzi1, #dzi2 {
+#dzi1 {
     height: 800px;
     width: 100%; 
     background-color: black;
@@ -248,8 +253,7 @@ input[id="pagenum"] {
 .service-search form { margin-top: 20px; } 
 
 
-.browse-sidebar { margin-top: 40px; opacity: 0.4; transition: opacity 0.5s; transition: opacity 0.5s, border 0.7s;} 
-.browse-sidebar:hover { opacity: 1; transition: opacity 0.5s, border 0.7s;} 
+.browse-sidebar { margin-top: 40px; } 
 .feedback-error {margin: 20px 0;}
 
 
diff --git a/components/static/index.html b/components/static/index.html
index 74322caf..f5f0205d 100755
--- a/components/static/index.html
+++ b/components/static/index.html
@@ -139,7 +139,7 @@
 
   <body>
       <div id="wrap">
- <div class="navbar navbar-default navbar-fixed-top navbar-inverse marcus-header">
+ <header class="navbar navbar-default navbar-fixed-top navbar-inverse marcus-header">
       
 		  <div class="navbar-header">
             <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
@@ -152,7 +152,7 @@
           </div>
 
           
-          <div class="collapse navbar-collapse">
+          <nav class="collapse navbar-collapse">
             <ul class="nav navbar-nav">
 <!--               <li><a href="{{lodspk.home}}">Hjem</a></li> -->
               <li class="dropdown">
@@ -195,9 +195,9 @@
 				    }
 				});
 			</script>                        
-          </div><!--/.nav-collapse -->
+          </nav><!--/.nav-collapse -->
         
-      </div>
+      </header>
       
 
 <div id="myCarousel" class="carousel slide visible-lg visible-md">
@@ -315,7 +315,7 @@
 
     
 	
-	<div class="row inline-browse-menu">
+	<div class="row inline-browse-menu hidden-xs hidden-sm">
 		<ul class="list-unstyled list-centered list-inline">
 		<li><strong>Se også:</strong></li>
 			{%include "../includes/nav.inc"%}
@@ -325,7 +325,7 @@
 	
 	<hr class="featurette-divider hidden-xs">
 	<div class="row featurette">
-		<div class="col-md-5">
+		<div class="col-md-5 hidden-xs">
           <img class="featurette-image img-responsive" src="img/dsc0551.jpg">
         </div>
         
@@ -348,7 +348,7 @@
           <p><a class="btn btn-large btn-primary" href="http://marcus.app.uib.no">GÃ¥ til Marcus - Billedsamlingens database</a></p>
 
         </div>
-          <div class="col-md-5">
+          <div class="col-md-5 hidden-xs">
           <img class="featurette-image img-responsive" src="img/ubb-trom-137.jpg">
         </div>
       </div>
diff --git a/components/static/technology.html b/components/static/technology.html
index fef96f08..248873db 100755
--- a/components/static/technology.html
+++ b/components/static/technology.html
@@ -21,12 +21,7 @@
 	<meta name=”twitter:description” content=”{{lodspk.title}} - {{lodspk.subtitle}}“>
 	<meta name=”twitter:image” content=”{{ first.main.img.value }}”>
     
-    <title>
-    {% if first.main.label.value != null %}
-    {{first.main.label.value}} - 
-    {% else %}
-    {{first.main.title.value}}
-    {% endif %}{{lodspk.title}}</title>  
+    <title>Teknologi - {{lodspk.title}}</title>  
     
     <link rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico">
   
@@ -50,7 +45,6 @@
     <link rel="alternate" type="text/plain" title="N-Triples Version" href="{{lodspk.local.value}}.nt" />
     <link rel="alternate" type="application/json" title="RDFJSON Version" href="{{lodspk.local.value}}.json" />
     <style>
-      body {padding-top: 50px;}
       .wait{
         background-image:url('{{lodspk.home}}img/wait.gif');
         background-repeat:no-repeat;
@@ -137,10 +131,9 @@
   
   </head>
 
-  <body>
+  <body class="main-body">
       <div id="wrap">
  <div class="navbar navbar-default navbar-fixed-top navbar-inverse marcus-header">
-      
 		  <div class="navbar-header">
             <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
               <span class="icon-bar"></span>
@@ -148,58 +141,135 @@
               <span class="icon-bar"></span>
             </button>
             <a class="navbar-brand" href="{{lodspk.home}}">{{lodspk.title}}</a>
-            <a class="navbar-text hidden-xs hidden-sm" href="{{lodspk.home}}"><small>{{lodspk.subtitle}}</small></a>
+            <a class="nav-subtitle hidden-xs hidden-sm" href="{{lodspk.home}}"><small>Spesialsamlingene ved <br>Universitetet i Bergen</small></a>
           </div>
 
           
           <div class="collapse navbar-collapse">
             <ul class="nav navbar-nav">
-<!--               <li><a href="{{lodspk.home}}">Hjem</a></li> -->
-              <li class="dropdown">
-				  <a id="browse1" class="dropdown-toggle" role="button" data-toggle="dropdown" data-target="#" href="#">Meny <span class="caret"></span></a>              				
-				  <ul class="dropdown-menu list-unstyled" aria-labelledby="browse1" role="meny">
-					  {%include "../includes/nav.inc"%}
-					</ul>
+<!--               	<li><a href="{{lodspk.home}}">Hjem</a></li> -->
+              	
+
+<li class="dropdown">
+<a id="browse1" class="dropdown-toggle" role="button" data-toggle="dropdown" data-target="#" href="#"> Meny <span class="caret"></span></a>              				
+	<ul class="dropdown-menu list-unstyled" aria-labelledby="browse1" role="meny">
+    	{%include "../includes/nav.inc"%}
+	</ul>
 				</li>
 			</ul>
-						
+
 			<form class="navbar-form navbar-right" role="search" action="">
             <div class="form-group">
               <input type="text" data-provide="typeahead" class="typeahead form-control search-query" placeholder="Søk"/>
             </div>
             </form>
-            
-            <script type="text/javascript">
-            	if (simpleCart.total() == null )
-            	{
-	            	document.write('<ul class="nav navbar-nav navbar-right">
-            	<li>
+			
+			<div id="popover-beta-head" style="display: none;">
+				<strong>Beta?</strong>
+			</div>
+			<div id="popover-beta-content" style="display: none;">
+				<p>Beta beta beta beta... Ja, det må mye testing til før man har noe som virkelig er bra. 
+			</div>
+			<p rel="popover" class="navbar-text pull-right hidden-xs hidden-sm beta"><span class="glyphicon glyphicon-warning-sign"></span> Beta</p> 
+			<script>
+				$('.beta').popover({ 
+					placement : 'bottom',
+				    html : true,
+				    title: function() {
+				      return $("#popover-beta-head").html();
+				    },
+				    content: function() {
+				      return $("#popover-beta-content").html();
+				    }
+				});
+			</script>
+	            
+            <!--
+            <ul class="nav navbar-nav navbar-right">
+             	<li>
             		<a href="/cart.html"><span class="glyphicon glyphicon-shopping-cart"></span> <span class="label label-primary simpleCart_quantity"></span> Handlekurv</a>
 				</li>
-            </ul>');
-            	}
-            </script>
+            </ul>
+            -->
 
-            			
-           <p class="navbar-text pull-right hidden-xs hidden-sm beta">Beta</p>
-                        
+            
           </div><!--/.nav-collapse -->
-        
-      </div>   
+      </div>
     
     <div class="container">
     	<div class="row">
-			<div class="col-md-12">
+			<div class="col-lg-8">
             	<h1>Teknologi</h1>
-            	<p>Introduksjon</p>
-            	<p>Komponenter</p>
+            	<p class="lead"><strong>Marcus</strong> er et resultat av mange år med digitalisering og registrering ved Spesialsamlingene ved Universitetsbiblioteket i Bergen og prosjektene <i><a href="http://www.uib.no/tilvekstavd/om-biblioteket/prosjekter/digitale-fulltekstarkiv">Digitale fulltekstarkiv</a></i> og <i><a href="http://www.ntnu.no/ub/tilbyr/utgivelser/prosjekter">Linked Data - et nettverk</a></i> i 2012-2013. For å få mest ut av alt som er registrert av metadata i ulike system og format har vi besluttet å konvertere alt til <a href="http://sv.wikipedia.org/wiki/L%C3%A4nkad_data">Linked data</a>. Dette har vi valgt for å knytte sammen alle våre egne samlinger/datasett, men også for å dele vår data og bruke hva som allerede eksisterer av Linked Data. Vi er langt fra en ferdig teknisk infrastruktur, men vi har kommet godt i gang.</p>
+            	<iframe src="//player.vimeo.com/video/36752317" width="500" height="375" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> 
+            	<p><a href="http://vimeo.com/36752317">Linked Open Data - What is it?</a> fra <a href="http://vimeo.com/europeana">Europeana</a> på <a href="https://vimeo.com">Vimeo</a>.</p>
+            	
+            	<h2>Bakgrunn</h2>
+            	<p>Bakgrunnen for å gjøre dette er gamle systemer som er nær sagt umulige å vedlikeholde, og av og til et fravær av egnede systemer for å registrere og formidle våre samlinger.</p>
+            	
+            	<h2>Infrastruktur</h2>
+            	<img class="col-lg-12" src="https://docs.google.com/drawings/d/11Esm4wOT98oWmo6Ice3tbj9QXGbSFdh5By24ZX9XqQ8/pub?w=1080&amp;h=366">
+            	
+            	<h2>Verktøy</h2>
+            	<p>En stor grunn til at vi har kunnet gjennomføre dette prosjektet er Open Source programvare. Alle funksjonene vi trenger finner vi gratis programvare for, uten å binde oss til kommersielle og proprietære leverandører. Dersom vi ikke kan lese dokumentasjon eller se på koden og installere programvaren på under én dag, skal det mye til for at vi benytter oss av det i denne fasen av prosjektet.</p>
+            	
+            	<h3>Konvertering av data</h3>
+            	<p>Prosjektene har handlet mye om å konvertere data fra ulike format til rdf. Våre data har hovedsakelig vært i CSV-filer dumpet fra databaser og EAD-XML filer.
+        	    <h4>OpenRefine</h4>
+        	    <p>CSV-filene har hovedsakelig blitt konvertert ved OpenRefine (tidligere Google Refine). Dette verktøyet er laget for å vaske store mengder data og passer derfor godt til å rydde opp i databaser der små og store feil har sneket seg inn gjennom årenes løp. Ved hjelp av utvidelser har vi mappet eller "reconciled" våre data med eksterne datasett som Freebase. Deretter er alle kolonner blir mappet til vår datamodell og dataene eksporter som RDF.
+				<ul>
+        	    	<li><a href="http://openrefine.org/">OpenRefine</a></li>
+					<li><a href="http://code.zemanta.com/sparkica/">LODRefine</a></li>
+				</ul>
+        	    
+        	    <h4>XSLT</h4>
+        	    <p>EAD til RDF...</p>
+        	    
+        	    <h3>Registreringsklient</h3>
+        	    <p>Vi ønsker å ha en registreringsklient som å kunne produsere og redigere våre Linked Data. Denne funksjonen er kanskje der det er minst utvalg av løsninger.
+        		<p>Vi har eksperimentert med Protégé som vår registreringsklient. Med et server-klient oppsett kan alle jobbe mot samme datasett på serveren med lokalt installerte klienter. Dette oppsettet har noen problemer med hastigheten og føles lite responsivt, men vi håper å få ordnet dette.
+        		<ul>
+        			<li><a href="http://protege.stanford.edu/">Protégé</a></li>
+        		</ul>
+        		<p>Google Spreadsheet bruker vi til å registrere enkelt dokument i ulike samlinger og sammenhenger. Disse regnearkene konverteres til Linked Data med OpenRefine eller med XSLT-stilark. For bruk 
+        		<p>Andre aktuelle løsninger</p>
+        		<ul>
+        			<li>Topbraid Composer</li>
+        		</ul>
+        		
+        		<h3>Lagring av data og filer</h3>
+        		<h4>Fuseki</h4>
+        		<ul>
+        			<li><a href="http://jena.apache.org/documentation/serving_data/index.html">Fuseki</a></li>
+        		</ul>
+        		
+        		<h4>Filer</h4>
+        		
+        		<h3>Visualisering</h3>
+        		<p>Vi har testet ulike system for å lage nettsider på vår Linked Data. <a href="https://drupal.org/">Drupal</a> var tidlig en kandidat, men det føltes tungvint og lite fleksibelt. <a href="https://github.com/csarven/linked-data-pages">Linked Data Pages</a> var en tidlig utfordrer sammen med <a href="http://graphite.ecs.soton.ac.uk/">Graphite</a>. Etter litt testing gikk vi videre med LODSpeakr. LODSpeakr har vist seg å være et enkelt system å lage tilpassede visninger på våre materialtyper.</p>
+        		<ul>
+        			<li><a href="http://lodspeakr.org/">LODspeakr</a></li>
+        		</ul>
+            	
+            	<h2>Ontologi</h2>
+            	<p><a href="http://marcus.uib.no/files/ontology/ubbont.owl">ubbont</a></p>
             	<ul>
-            		<li>OpenRefine</li>
-            		<li>Protege</lil>
-            		<li>Fuseki</li>
-            		<li><a href="http://lodspeakr.org/">LODspeakr</a></li>
+            		<li><strong>55</strong>: klasser</li>
+            		<li><strong>86</strong>: datatype-egenskaper</li>
+            		<li><strong>71</strong>: objekt-egenskaper</li>
             	</ul>
-            	<p>Ontologi</p>
+            	
+            	<h2>Takk til</h2>
+            	<p>En stor takk til alle som har hjulpet oss med prosjektene!</p>
+            </div>
+			
+			<div class="col-lg-3 pull-right well">
+				<h3>Kontaktinformasjon</h3>
+				<p>Ta kontakt med oss om du har kommentarer, finner feil, eller ønsker å snakke med oss som jobber med nettsidene:</p>
+				<ul>
+					<li><a href="mailto:tarje.lavik@ub.uib.no">Tarje Sælen Lavik</a></li>
+					<li>Øyvind Gjesdal</li>
+				</ul>
 			</div>
 		</div>
 	</div>
diff --git a/components/types/bibo__Document/html.template b/components/types/bibo__Document/html.template
new file mode 100644
index 00000000..656e686c
--- /dev/null
+++ b/components/types/bibo__Document/html.template
@@ -0,0 +1,346 @@
+{% include "../../includes/header.inc" %}
+    <div class="container main-body">
+    	<div class="row">
+			<div class="col-md-3">
+			<div class="bs-sidebar hidden-xs hidden-sm affix">
+				<ul class="nav">
+				
+					<li><a href="#image"><span class="glyphicon glyphicon-picture"></span> Foto</a></li>
+					{% if first.transcription.html.value != null %}
+						<li><a href="#transcription"><span class="glyphicon glyphicon-align-left"></span> Transkripsjon</a></li>
+					{% endif %}
+					{% if first.subjects.subject.value != null %}
+						<li><a href="#subjects"><span class="glyphicon glyphicon-tags"></span> Emner</a></li>
+					{% endif %}
+					{% if first.depicted.depicts.value != null %}
+						<li><a href="#places"><span class="glyphicon glyphicon-user"></span> Personer</a></li>
+					{% endif %} 
+					{% if first.places.long.value != null %}
+						<li><a href="#places"><span class="glyphicon glyphicon-map-marker"></span> Steder</a></li>
+					{% endif %} 
+					<li><a href="#disqus_thread"><span class="glyphicon glyphicon-bullhorn"></span> Kommentarer</a></li>
+				</ul>
+				
+				<div class="feedback-error alert alert-warning">
+					<p><a href="mailto:billed@uib.no"><span class="glyphicon glyphicon-exclamation-sign"></span> Feil!? Gi oss beskjed!</a></p>
+				</div>
+				
+				<div class="browse-sidebar">
+					<h4>Bla i:</h4>
+					<ul class="nav">
+						{% include "../../includes/nav.inc" %}
+					</ul>
+				</div>	
+				</div> <!-- End Sidebar -->
+			</div>
+			
+			<div class="col-md-9">
+	    {% for row in models.main %}
+
+	    <h1>{{ row.title.value }}</h1>
+        {% endfor %}
+        
+	{% if models.dzi|length != 0 %}
+    <!-- Contains the OpenSeadragon viewer -->
+	<div class="container dzi-wrap"> 
+		<div class="dzi-wrap">
+            <div id="dzi1"></div>
+            <div class="hidden-md hidden-lg hidden-xs hidden-sm" id="dzi2"></div>
+			<!--<div class="row dzi-control">
+				<ul class="pager">
+					<li><a class="btn" onclick="Ubbdst.prev('#pagenum');">forrige</a></li>
+					<li><input class="input form-control" size="5" type="number" id="pagenum" value="1"/></li>
+						av <span style="margin-right: 15px;" id="length"></span>
+					<li><a class="btn" onclick="Ubbdst.resetViewports();">tilbakestill zoom</a></li>
+					<li><a class="btn" onclick="Ubbdst.next('#pagenum');">neste</a></li>
+				</ul>
+			</div> -->
+		</div>
+	</div> 
+
+	<script>	
+		var json = [];
+		var current_counter =0;
+		{% for row in models.dzi %}
+			json.push({dzi:	'{{ row.dziUri.value }}'});
+		{% endfor %}
+	</script> 
+	 
+    <script type="text/javascript" src="{{lodspk.home}}files/js/openseadragon/openseadragon.js"></script>
+	<script type="text/javascript" src="{{lodspk.home}}files/js/ubbdstjfl/ubbdst.js"></script>
+
+	<script type="text/javascript">	
+		$('#length').append(json.length);
+		$('#pagenum').on('change', function() 
+			{
+				pagenumber = parseInt(this.value);
+				Ubbdst.position.pageNumber(pagenumber);
+				var showCounter = Ubbdst.input_number;
+				$('#pagenum').val(showCounter.toString());
+		
+				Ubbdst.position.switchTo(json[Ubbdst.position.counter]['dzi'],json[Ubbdst.position.counter+1]['dzi']);
+			});
+		var current_counter = 0;
+    </script> 
+		
+    <script type="text/javascript"> 
+	    var viewer = OpenSeadragon({
+	        id:            "dzi1",
+            prefixUrl:     "{{lodspk.home}}files/js/openseadragon/images/",
+			tileSources:   [     
+			{% for row in models.dzi %}
+				"{{ row.dziUri.value }}", 
+			{% endfor %}
+			],
+			{% if models.dzi|length > 1 %}
+			showReferenceStrip:  true,
+			{% endif %}	
+			preserveViewport: true,
+			minZoomImageRatio: 0.6,
+	        minPixelRatio: 0.5,
+	        animationTime: 0.8,
+	        springStiffness: 8
+	    });
+
+        var viewer2 = OpenSeadragon({
+            id:            "dzi2",
+            prefixUrl:     "{{lodspk.home}}files/js/openseadragon/images/",
+            tileSources:   Ubbdst.secondpage,
+            minPixelRatio: 0.5
+        });
+    </script>	
+    {% endif %}
+{% if models.pdf|length != 0 %}
+{% for row in models.pdf %}
+<p><a href="{{row.uri.value }}">Last ned PDF</a></p>
+{% endfor %}
+{% endif %}
+<!--     <p>Signatur: <a href="{{lodspk.this.value}}">{{ first.main.identifier.value }}</a></p> -->
+    
+    {% if 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 %}
+    {% endfor %}
+    </p>
+    {% endif %}
+   
+    
+    {% for row in models.description %}
+    <p class="lead">{{ row.description.value }}</p>
+    {% endfor %}
+	
+    {% for row in models.physicalcondition %}
+    <p>{{ row.physicalCondition.value }}</p>
+    {% endfor %}
+    
+    {% for row in models.physicaldescription %}
+    <p>{{ row.physicalDescription.value }}</p>
+    {% endfor %}
+    
+    {% for row in models.internalnote %}
+    <p>{{ row.internalNote.value }}</p>
+    {% endfor %}
+    
+    {% if models.image|length != 0 %}
+    <div class="row">
+    {% for row in models.image %}
+    	<div class="col-md-4 col-lg-4">
+        	
+				<a class="thumbnail" href="{{ row.imageHigh.value }}"><img class="img-responsive" src="{{row.imageLow.value}}" alt=""></img></a>
+<!--
+      		<div class="caption">
+      		<h3>{{ row.title.value }}</h3>
+      		</div>
+-->
+	  		
+      	</div>
+    {% endfor %}
+    </div>
+    {% endif %}
+    
+	{% if 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>
+    </div>
+    {% endif %}
+  
+    
+    
+    <div id="resource-metadata" class="row">	
+    
+    {% if models.recipient|length != 0 %}
+    <div class="col-md-4 letter-info">
+    	<h4><span class="glyphicon glyphicon-envelope"></span> Brev</h4>
+    	{% for row in models.sender %}
+		    <p>Fra: <a href="{{row.uri.value}}">{{ row.label.value }}</a></p>
+	    {% endfor %}
+	    {% for row in models.recipient %}
+		    <p>Til: <a href="{{row.uri.value}}">{{ row.label.value }}</a></p>
+	    {% endfor %}
+    </div>
+    {% endif %}
+
+    {% if first.main.created.value != null || first.main.date.value != null %}
+    <div class="col-md-4">
+	    <h4><span class="glyphicon glyphicon-calendar"></span> 
+	    	Dato: <span>{% if first.main.date.value %}{{ first.main.date.value }} {% endif %}{{ first.main.created.value }}</span><br/>
+	    </h4>
+	</div>
+	{% endif %}
+	
+    {% if models.collections|length != 0  %}
+    <div class="col-md-4">
+    	<h4><span class="glyphicon glyphicon-th"></span> Del av:</h4>
+        <ul class="list-unstyled">
+        {% for row in models.collections %}
+        	<li><a href="{{ row.collection.value }}">{{row.collectionName.value}}</a></li>
+        {% endfor %}
+        </ul>
+	</div>
+    {% endif %}  
+    
+    {% if models.relatedresources|length != 0  %}
+	<div class="col-md-4">
+		<h4>Relatert:</h4>
+			<ul class="list-unstyled">
+	    		{% for row in models.relatedresources %}
+	        	<li><span class="glyphicon glyphicon-user"></span> <a href="{{ row.uri.value }}" >{{row.label.value}}</a></li>
+				{% endfor %} 
+			</ul>
+	</div>
+	{% endif %} 
+
+    </div>
+		
+	{% if models.subjects|length != 0 %}
+	<div id="subjects">
+		<ul class="subjects-inline-list">
+			{% for row in models.subjects %}
+	    	<li class="tags"><a href="{{ row.subject.value }}" ><i class="icon-tag"></i> {{ row.subjectLabel.value }}</a></li>
+			{% endfor %} 
+		</ul>
+	</div>
+	{% endif %}
+		
+	{% if models.depicted %}
+	<div class="col-md-4" id="depicted">	
+		<h4>Avbildet:</h4>
+		<ul class="list-unstyled">
+			{% for row in models.depicted %}
+    		<li><span class="glyphicon glyphicon-user"></span> <a href="{{ row.depicts.value }}" >{{row.depictsName.value}}</a></li>
+			{% endfor %}
+		</ul>
+	</div>
+	{% endif %}
+		
+		
+	{% if first.places.place.value != null %}
+		<div id="places">
+			{% if first.places.long.value != null %}
+			 	<div id="map-wrap">
+				<div id="map"></div>
+					<ul class="places-inline-list">
+						{% for row in models.places %}
+						<li><a href="{{ row.place.value }}" ><span class="glyphicon glyphicon-map-marker"></span> {{row.placeName.value}}</a></li>
+						{% endfor %} 
+					</ul>
+				</div>
+			{% endif %} 
+		</div>
+	{% endif %} 
+		
+	<script>
+		{% if first.places.long.value %}
+    	var map = L.map('map').setView([{{ first.places.lat.value }}, {{ first.places.long.value }}], 10);
+    	{% endif %} 
+
+		var defaultLayer = L.tileLayer.provider('OpenStreetMap.Mapnik').addTo(map);
+				
+		var baseLayers = [
+			'OpenStreetMap.Mapnik',
+			'MapQuestOpen.OSM',
+			'MapQuestOpen.Aerial',
+			'Stamen.Watercolor'		
+			];
+		
+		var overlayLayers = [
+			'Kartverket',
+			'Rodekart9',
+			'Rodekart4',
+			'Rodekart1'
+		];
+		
+		L.control.layers.provided(baseLayers, overlayLayers, {collapsed: true}).addTo(map);
+
+		{% for row in models.places %}
+			{% if 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 %} 
+	</script>
+	
+	    <div id="disqus_thread"></div>
+    <script type="text/javascript">
+        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+        var disqus_shortname = 'ubblod'; // required: replace example with your forum shortname
+
+        /* * * DON'T EDIT BELOW THIS LINE * * */
+        (function() {
+            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
+            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+        })();
+    </script>
+    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+    <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+	
+	    <div class="row full-metadata-div">
+    	<div class="col-lg-12">
+			<button type="button" class="btn btn-sm btn-info" data-toggle="collapse" data-target="#full-meta-view">
+				Vis all informasjon
+			</button>
+
+			<div id="full-meta-view" class="collapse">
+				<table class="table table-striped" about="{{uri}}">
+					<thead>
+						<tr><th>Subject</th><th>Predicate</th><th>Object</th></tr>
+					</thead>
+			    {% for row in models.po %}
+						<tr>
+							<td>{% if forloop.first %}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{% endif %}</td>
+							<td><a href='{{row.p.value}}'>{{row.p.curie}}</a></td>
+							<td>
+								{% if row.o.uri == 1 %}
+								<a rel='{{row.p.value}}' href='{{row.o.value}}'>{{row.o.curie}}</a>
+								{% else %}
+								<span property='{{row.p.value}}'>{{row.o.value}}</span>
+								{% endif %}
+							</td>
+						</tr>
+				{% endfor %}
+
+				{% for row in models.sp %}
+						<tr>
+							<td><a href='{{row.s.value}}'>{{row.s.curie}}</a></td>
+							<td><a rev='{{row.s.value}}' href='{{row.p.value}}'>{{row.p.curie}}</a></td>
+							<td>{% if forloop.first %}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{% endif %}</td>
+						</tr>
+				{% endfor %}
+					<thead>
+						<tr><th>Subject</th><th>Predicate</th><th>Object</th></tr>
+					</thead>
+				</table>
+			</div>
+		</div>
+    </div>
+	
+	</div>
+	</div>
+    </div>
+	{%include "../../includes/footer.inc"%}
+   </div>
+	
+  </body>
+</html>
diff --git a/components/types/bibo__Document/html.template.bak2 b/components/types/bibo__Document/html.template.bak2
new file mode 100644
index 00000000..2e2234d8
--- /dev/null
+++ b/components/types/bibo__Document/html.template.bak2
@@ -0,0 +1,325 @@
+{%include "../../includes/header.inc"%}
+<div class="container main-body">
+	<div class="row">
+		<div class="col-md-3">
+			<div class="bs-sidebar hidden-xs hidden-sm affix">
+				<ul class="nav">
+					
+					<li><a href="#image"><span class="glyphicon glyphicon-picture"></span> Foto</a></li>
+					{% if first.transcription.html.value != null %}
+					<li><a href="#transcription"><span class="glyphicon glyphicon-align-left"></span> Transkripsjon</a></li>
+					{% endif %}
+					{% if first.subjects.subject.value != null %}
+					<li><a href="#subjects"><span class="glyphicon glyphicon-tags"></span> Emner</a></li>
+					{% endif %}
+					{% if first.depicted.depicts.value != null %}
+					<li><a href="#places"><span class="glyphicon glyphicon-user"></span> Personer</a></li>
+					{% endif %} 
+					{% if first.places.long.value != null %}
+					<li><a href="#places"><span class="glyphicon glyphicon-map-marker"></span> Steder</a></li>
+					{% endif %} 
+					<li><a href="#disqus_thread"><span class="glyphicon glyphicon-bullhorn"></span> Kommentarer</a></li>
+				</ul>
+				
+				<div class="feedback-error alert alert-warning">
+					<p><a href="mailto:billed@uib.no"><span class="glyphicon glyphicon-exclamation-sign"></span> Feil!? Gi oss beskjed!</a></p>
+				</div>
+				
+				<div class="browse-sidebar">
+					<h4>Bla i:</h4>
+					<ul class="nav">
+						{% include "../../includes/nav.inc" %}
+					</ul>
+				</div>	
+			</div> <!-- End Sidebar -->
+		</div>
+		
+		<div class="col-md-9">
+			 {% for row in models.main %}
+				
+	    <h1>{{ row.title.value }}</h1>
+        {% endfor %}
+        
+			
+			<div class="container dzi-wrap"> <!-- Contains the OpenSeadragon viewer -->
+				<div class="dzi-wrap">
+					<div id="dzi1"></div>
+					<div class="hidden-md hidden-lg hidden-xs hidden-sm" id="dzi2"></div>
+					<div class="row dzi-control">
+						<ul class="pager">
+							<li><a class="btn" onclick="Ubbdst.prev('#pagenum');">forrige</a></li>
+							<li><a class="btn" onclick="Ubbdst.toggleSecondPage();">bytt modus</a></li>
+							<li><input class="input form-control" size="5" type="number" id="pagenum" value="1"/> av <span style="margin-right: 15px;" id="length"></span></li>						
+							<li><a class="btn" onclick="Ubbdst.resetViewports();">tilbakestill zoom</a></li>
+							<li><a class="btn" onclick="Ubbdst.next('#pagenum');">neste</a></li>
+						</ul>
+					</div>
+				</div>
+			</div>
+				
+	<script>	
+		var json = [];
+		var current_counter =0;
+		{% for row in models.dzi %}
+			json.push({dzi:	'{{ row.dziUri.value }}'});
+		{% endfor %}
+	</script> 
+	
+			<script type="text/javascript" src="{{lodspk.home}}files/js/openseadragon/openseadragon.js"></script>
+			<script type="text/javascript" src="{{lodspk.home}}files/js/ubbdstjfl/ubbdst.js"></script>
+			
+			{% if models.dzi %}
+				
+			
+			 <script type="text/javascript">	
+		$('#length').append(json.length);
+		$('#pagenum').on('change', function() 
+			{
+				pagenumber = parseInt(this.value);
+				Ubbdst.position.pageNumber(pagenumber);
+				var showCounter = Ubbdst.input_number;
+				$('#pagenum').val(showCounter.toString());
+		
+				Ubbdst.position.switchTo(json[Ubbdst.position.counter]['dzi'],json[Ubbdst.position.counter+1]['dzi']);
+			});
+		var current_counter = 0;
+    </script> 
+			
+			<script type="text/javascript"> 
+				var viewer = OpenSeadragon({
+				id:            "dzi1",
+				prefixUrl:     "{{lodspk.home}}files/js/openseadragon/images/",
+				tileSources:   Ubbdst.firstpage,
+				minPixelRatio: 0.5
+				});			
+				
+			</script>	
+			{% endif %}
+			    <p>Signatur: <a href="{{lodspk.this.value}}">{{ first.main.identifier.value }}</a></p> 
+			
+			{% if 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 %}
+				{% endfor %}
+			</p>
+			{% endif %}
+			
+			
+			{% for row in models.description %}
+			<p class="lead">{{ row.description.value }}</p>
+			{% endfor %}
+			
+			{% for row in models.physicalcondition %}
+			<p>{{ row.physicalCondition.value }}</p>
+			{% endfor %}
+			
+			{% for row in models.physicaldescription %}
+			<p>{{ row.physicalDescription.value }}</p>
+			{% endfor %}
+			
+			{% for row in models.internalnote %}
+			<p>{{ row.internalNote.value }}</p>
+			{% endfor %}
+			
+			{% if models.image|length != 0 %}
+			<div class="row">
+				{% for row in models.image %}
+				<div class="col-md-4 col-lg-4">
+					
+					<a class="thumbnail" href="{{ row.imageHigh.value }}"><img class="img-responsive" src="{{row.imageLow.value}}" alt=""></img></a>
+					
+					<div class="caption">
+						<h3>{{ row.title.value }}</h3>
+					</div>
+					
+					
+				</div>
+				{% endfor %}
+			</div>
+			{% endif %}
+			
+			{% if 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>
+			</div>
+			{% endif %}
+			
+			<!--debugger denne-->
+			<div id="resource-metadata" class="row">	
+				
+				{% if models.recipient|length != 0 %}
+				<div class="col-md-4 letter-info">
+					<h4><span class="glyphicon glyphicon-envelope"></span> Brev</h4>
+					{% for row in models.sender %}
+					<p>Fra: <a href="{{row.uri.value}}">{{ row.label.value }}</a></p>
+					{% endfor %}
+					{% for row in models.recipient %}
+					<p>Til: <a href="{{row.uri.value}}">{{ row.label.value }}</a></p>
+					{% endfor %}
+				</div>
+				{% endif %}	
+				
+				{% if models.main|length != 0 %}
+				<div class="col-md-4">
+					<h4><span class="glyphicon glyphicon-calendar"></span> 
+						Dato: <span>{{ first.main.created.value }}</span><br/>
+					</h4>
+				</div>
+				{% endif %}
+				
+				{% if models.collections|length != 0  %}
+				<div class="col-md-4">
+					<h4><span class="glyphicon glyphicon-th"></span> Del av:</h4>
+					<ul class="list-unstyled">
+						{% for row in models.collections %}
+						<li>
+							<span class="glyphicon glyphicon-th-large"></span>
+							<a href="{{ row.collection.value }}">{{row.collectionName.value}}
+							</a>
+						</li>
+						{% endfor %}
+					</ul>
+				</div>
+				{% endif %}  
+				
+				
+				{% if models.relatedresources|length != 0  %}
+				<div class="col-md-4">
+					<h4>Relatert:</h4>
+					<ul class="list-unstyled">
+						{% for row in models.relatedresources %}
+						<li><span class="glyphicon glyphicon-user"></span> <a href="{{ row.uri.value }}" >{{row.label.value}}</a></li>
+						{% endfor %} 
+					</ul>
+				</div>
+				{% endif %} 
+			</div>
+		</div>
+		
+		{% if models.subjects|length != 0 %}
+		<div id="subjects">
+			<ul class="subjects-inline-list">
+				{% for row in models.subjects %}
+				<li class="tags"><a href="{{ row.subject.value }}" ><i class="icon-tag"></i> {{ row.subjectLabel.value }}</a></li>
+				{% endfor %} 
+			</ul>
+		</div>
+		{% endif %}
+		
+		{% if models.depicted %}
+		<div class="col-md-4" id="depicted">	
+			<h4>Avbildet:</h4>
+			<ul class="list-unstyled">
+				{% for row in models.depicted %}
+				<li><span class="glyphicon glyphicon-user"></span> <a href="{{ row.depicts.value }}" >{{row.depictsName.value}}</a></li>
+				{% endfor %}
+			</ul>
+		</div>
+		{% endif %}
+		
+		{% if first.places.place.value != null %}
+		<div id="places">
+			{% if first.places.long.value != null %}
+			<div id="map-wrap">
+				<div id="map"></div>
+				<ul class="places-inline-list">
+					{% for row in models.places %}
+					<li><a href="{{ row.place.value }}" ><span class="glyphicon glyphicon-map-marker"></span> {{row.placeName.value}}</a></li>
+					{% endfor %} 
+				</ul>
+			</div>
+			{% endif %} 
+		</div>
+		{% endif %} 
+			<script>
+				{% if first.places.long.value %}
+				var map = L.map('map').setView([{{ first.places.lat.value }}, {{ first.places.long.value }}], 10);
+				{% endif %} 
+				
+				var defaultLayer = L.tileLayer.provider('OpenStreetMap.Mapnik').addTo(map);
+				
+				var baseLayers = [
+				'OpenStreetMap.Mapnik',
+				'MapQuestOpen.OSM',
+				'MapQuestOpen.Aerial',
+				'Stamen.Watercolor'		
+				];
+				
+				var overlayLayers = [
+				'Kartverket',
+				'Rodekart9',
+				'Rodekart4',
+				'Rodekart1'
+				];
+				
+				L.control.layers.provided(baseLayers, overlayLayers, {collapsed: true}).addTo(map);
+				
+				{% for row in models.places %}
+				{% if 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 %} 
+			</script>
+			
+			<div id="disqus_thread"></div>
+			<script type="text/javascript">
+				/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+				var disqus_shortname = 'ubblod'; // required: replace example with your forum shortname
+				
+				/* * * DON'T EDIT BELOW THIS LINE * * */
+				(function() {
+				var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+				dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
+				(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+				})();
+			</script>
+			<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+			<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+			
+		<div class="row full-metadata-div">
+			<div class="col-lg-12">
+				<button type="button" class="btn btn-sm btn-info" data-toggle="collapse" data-target="#full-meta-view">
+					Vis all informasjon
+				</button>
+				
+				<div id="full-meta-view" class="collapse">
+					<table class="table table-striped" about="{{uri}}">
+						<thead>
+							<tr><th>Subject</th><th>Predicate</th><th>Object</th></tr>
+						</thead>
+						{% for row in models.po %}
+						<tr>
+							<td>{% if forloop.first %}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{% endif %}</td>
+							<td><a href='{{row.p.value}}'>{{row.p.curie}}</a></td>
+							<td>
+								{% if row.o.uri == 1 %}
+								<a rel='{{row.p.value}}' href='{{row.o.value}}'>{{row.o.curie}}</a>
+								{% else %}
+								<span property='{{row.p.value}}'>{{row.o.value}}</span>
+								{% endif %}
+							</td>
+						</tr>
+						{% endfor %}
+						
+						{% for row in models.sp %}
+						<tr>
+							<td><a href='{{row.s.value}}'>{{row.s.curie}}</a></td>
+							<td><a rev='{{row.s.value}}' href='{{row.p.value}}'>{{row.p.curie}}</a></td>
+							<td>{% if forloop.first %}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{% endif %}</td>
+						</tr>
+						{% endfor %}
+						<thead>
+							<tr><th>Subject</th><th>Predicate</th><th>Object</th></tr>
+						</thead>
+					</table>
+				</div>
+			</div>
+		</div>
+		
+    </div>
+    </div>
+    	{%include "../../includes/footer.inc"%}
+  </body>
+</html>
diff --git a/components/types/ubbont__Document/queries/collections.query b/components/types/bibo__Document/queries/collections.query
similarity index 100%
rename from components/types/ubbont__Document/queries/collections.query
rename to components/types/bibo__Document/queries/collections.query
diff --git a/components/types/ubbont__Document/queries/description.query b/components/types/bibo__Document/queries/description.query
similarity index 100%
rename from components/types/ubbont__Document/queries/description.query
rename to components/types/bibo__Document/queries/description.query
diff --git a/components/types/ubbont__Document/queries/dzi.query b/components/types/bibo__Document/queries/dzi.query
similarity index 63%
rename from components/types/ubbont__Document/queries/dzi.query
rename to components/types/bibo__Document/queries/dzi.query
index 98fd54cc..0dc00bd6 100755
--- a/components/types/ubbont__Document/queries/dzi.query
+++ b/components/types/bibo__Document/queries/dzi.query
@@ -3,8 +3,7 @@ SELECT DISTINCT ?dziUri WHERE {
     <{{ uri }}> ubbont:hasPage ?hasPage .
     ?hasPage ubbont:hasRepresentation ?hasRepresentation .
     ?hasRepresentation ubbont:hasURI ?dziUri .
-    ?dziUri <http://www.semanticdesktop.org/ontologies/nie/#mimeType> ?mimeType
-    FILTER (?mimeType = "jpeg/dzi")
+    FILTER (regex(STR(?dziUri), "dzi","i"))	
 }
 ORDER BY ?dziUri
 
diff --git a/components/types/ubbont__Document/queries/image.query b/components/types/bibo__Document/queries/image.query
similarity index 100%
rename from components/types/ubbont__Document/queries/image.query
rename to components/types/bibo__Document/queries/image.query
diff --git a/components/types/ubbont__Document/queries/internalnote.query b/components/types/bibo__Document/queries/internalnote.query
similarity index 100%
rename from components/types/ubbont__Document/queries/internalnote.query
rename to components/types/bibo__Document/queries/internalnote.query
diff --git a/components/types/ubbont__Document/queries/main.query b/components/types/bibo__Document/queries/main.query
similarity index 65%
rename from components/types/ubbont__Document/queries/main.query
rename to components/types/bibo__Document/queries/main.query
index f1562552..f799c8a2 100755
--- a/components/types/ubbont__Document/queries/main.query
+++ b/components/types/bibo__Document/queries/main.query
@@ -1,8 +1,9 @@
-SELECT DISTINCT ?title ?created ?available ?identifier WHERE {
+SELECT DISTINCT ?title ?created ?date ?available ?identifier WHERE {
 
     <{{ uri }}> rdfs:label|dct:title ?title .
     OPTIONAL { <{{ uri }}> dct:identifier ?identifier . }
     OPTIONAL { <{{ uri }}> dct:created ?created .}
+    OPTIONAL { <{{ uri }}> dct:date ?date .}
 	OPTIONAL { <{{ uri }}> dct:available ?available .}
 
 }
diff --git a/components/types/ubbont__Document/queries/maker.query b/components/types/bibo__Document/queries/maker.query
similarity index 100%
rename from components/types/ubbont__Document/queries/maker.query
rename to components/types/bibo__Document/queries/maker.query
diff --git a/components/types/bibo__Document/queries/pdf.query b/components/types/bibo__Document/queries/pdf.query
new file mode 100755
index 00000000..cd75a475
--- /dev/null
+++ b/components/types/bibo__Document/queries/pdf.query
@@ -0,0 +1,8 @@
+SELECT DISTINCT ?uri WHERE {
+
+    <{{ uri }}> ubbont:hasRepresentation ?hasRepresentation . 
+    ?hasRepresentation ubbont:hasURI ?uri .
+    FILTER (regex(STR(?uri), "pdf$","i"))	
+}
+ORDER BY ?uri
+
diff --git a/components/types/ubbont__Document/queries/physicalcondition.query b/components/types/bibo__Document/queries/physicalcondition.query
similarity index 100%
rename from components/types/ubbont__Document/queries/physicalcondition.query
rename to components/types/bibo__Document/queries/physicalcondition.query
diff --git a/components/types/ubbont__Document/queries/physicaldescription.query b/components/types/bibo__Document/queries/physicaldescription.query
similarity index 100%
rename from components/types/ubbont__Document/queries/physicaldescription.query
rename to components/types/bibo__Document/queries/physicaldescription.query
diff --git a/components/types/ubbont__Document/queries/places.query b/components/types/bibo__Document/queries/places.query
similarity index 100%
rename from components/types/ubbont__Document/queries/places.query
rename to components/types/bibo__Document/queries/places.query
diff --git a/components/types/bibo__Document/queries/po.query b/components/types/bibo__Document/queries/po.query
new file mode 100755
index 00000000..de3f136a
--- /dev/null
+++ b/components/types/bibo__Document/queries/po.query
@@ -0,0 +1,4 @@
+SELECT ?p ?o  WHERE {
+	 <{{uri}}> ?p ?o .
+}
+LIMIT 100
\ No newline at end of file
diff --git a/components/types/bibo__Document/queries/recipient.query b/components/types/bibo__Document/queries/recipient.query
new file mode 100755
index 00000000..c4b3f464
--- /dev/null
+++ b/components/types/bibo__Document/queries/recipient.query
@@ -0,0 +1,8 @@
+SELECT DISTINCT ?uri ?label WHERE {
+
+    <{{ uri }}> bibo:reciever ?uri .
+    OPTIONAL { ?uri foaf:name ?label . }
+    OPTIONAL { ?uri ubbont:invertedName ?label . }
+
+}
+
diff --git a/components/types/ubbont__Document/queries/relatedresources.query b/components/types/bibo__Document/queries/relatedresources.query
similarity index 100%
rename from components/types/ubbont__Document/queries/relatedresources.query
rename to components/types/bibo__Document/queries/relatedresources.query
diff --git a/components/types/bibo__Document/queries/sender.query b/components/types/bibo__Document/queries/sender.query
new file mode 100755
index 00000000..ec462704
--- /dev/null
+++ b/components/types/bibo__Document/queries/sender.query
@@ -0,0 +1,8 @@
+SELECT DISTINCT ?uri ?label WHERE {
+
+    <{{ uri }}> ubbont:sender ?uri .
+    OPTIONAL { ?uri foaf:name ?label . }
+    OPTIONAL { ?uri ubbont:invertedName ?label . }
+
+}
+
diff --git a/components/types/bibo__Document/queries/sp.query b/components/types/bibo__Document/queries/sp.query
new file mode 100755
index 00000000..ce7b67f5
--- /dev/null
+++ b/components/types/bibo__Document/queries/sp.query
@@ -0,0 +1,4 @@
+SELECT ?s ?p  WHERE {  
+       ?s ?p <{{uri}}> .
+}
+LIMIT 100
\ No newline at end of file
diff --git a/components/types/bibo__Document/queries/subjects.query b/components/types/bibo__Document/queries/subjects.query
new file mode 100755
index 00000000..4b25f5b2
--- /dev/null
+++ b/components/types/bibo__Document/queries/subjects.query
@@ -0,0 +1,8 @@
+SELECT DISTINCT ?subject ?subjectLabel WHERE {
+
+    <{{ uri }}> dct:subject ?subject . 
+    ?subject skos:prefLabel ?subjectLabel ; a skos:Concept .
+	OPTIONAL { ?subject rdfs:label ?subjectLabel ; a skos:Concept .}
+    
+}
+
diff --git a/components/types/bibo__Document/ttl.template b/components/types/bibo__Document/ttl.template
new file mode 100644
index 00000000..a564fe0d
--- /dev/null
+++ b/components/types/bibo__Document/ttl.template
@@ -0,0 +1 @@
+test!
\ No newline at end of file
diff --git a/components/types/bibo__Letter/html.template b/components/types/bibo__Letter/html.template
index 756902c9..57c21473 100755
--- a/components/types/bibo__Letter/html.template
+++ b/components/types/bibo__Letter/html.template
@@ -38,6 +38,76 @@
 
 	    <h1>{{ row.title.value }}</h1>
         {% endfor %}
+    
+    {% if models.dzi|length != 0 %}
+
+    <!-- Contains the OpenSeadragon viewer -->
+	<div class="container dzi-wrap"> 
+		<div class="dzi-wrap">
+            <div id="dzi1"></div>
+            <div class="hidden-md hidden-lg hidden-xs hidden-sm" id="dzi2"></div>
+			<!--<div class="row dzi-control">
+				<ul class="pager">
+					<li><a class="btn" onclick="Ubbdst.prev('#pagenum');">forrige</a></li>
+					<li><input class="input form-control" size="5" type="number" id="pagenum" value="1"/></li>
+						av <span style="margin-right: 15px;" id="length"></span>
+					<li><a class="btn" onclick="Ubbdst.resetViewports();">tilbakestill zoom</a></li>
+					<li><a class="btn" onclick="Ubbdst.next('#pagenum');">neste</a></li>
+				</ul>
+			</div> -->
+		</div>
+	</div> 
+
+	<script>	
+		var json = [];
+		var current_counter =0;
+		{% for row in models.dzi %}
+			json.push({dzi:	'{{ row.dziUri.value }}'});
+		{% endfor %}
+	</script> 
+	 
+    <script type="text/javascript" src="{{lodspk.home}}files/js/openseadragon/openseadragon.js"></script>
+	<script type="text/javascript" src="{{lodspk.home}}files/js/ubbdstjfl/ubbdst.js"></script>
+
+
+	<script type="text/javascript">	
+		$('#length').append(json.length);
+		$('#pagenum').on('change', function() 
+			{
+				pagenumber = parseInt(this.value);
+				Ubbdst.position.pageNumber(pagenumber);
+				var showCounter = Ubbdst.input_number;
+				$('#pagenum').val(showCounter.toString());
+		
+				Ubbdst.position.switchTo(json[Ubbdst.position.counter]['dzi'],json[Ubbdst.position.counter+1]['dzi']);
+			});
+		var current_counter = 0;
+    </script> 
+		
+    <script type="text/javascript"> 
+	    var viewer = OpenSeadragon({
+	        id:            "dzi1",
+            prefixUrl:     "{{lodspk.home}}files/js/openseadragon/images/",
+			tileSources:   [     
+			{% for row in models.dzi %}
+				"{{ row.dziUri.value }}", 
+			{% endfor %}
+			],
+			{% if models.dzi|length > 1 %}
+			showReferenceStrip:  true,  
+			{% endif %}	
+	        minPixelRatio: 0.5
+	    });
+
+        var viewer2 = OpenSeadragon({
+            id:            "dzi2",
+            prefixUrl:     "{{lodspk.home}}files/js/openseadragon/images/",
+            tileSources:   Ubbdst.secondpage,
+            minPixelRatio: 0.5
+        });
+    </script>	
+    {% endif %}
+
 
 <!--     <p>Signatur: <a href="{{lodspk.this.value}}">{{ first.main.identifier.value }}</a></p> -->
     
@@ -106,12 +176,11 @@
     </div>
     {% endif %}
 
-    {% if first.main.created.value|length != 0 %}
+    {% if first.main.created.value != null || first.main.date.value != null %}
     <div class="col-md-4">
-
-    <h4><span class="glyphicon glyphicon-calendar"></span> 
-    	Dato: <span>{{ first.main.created.value }}</span><br>
-    </h4>
+	    <h4><span class="glyphicon glyphicon-calendar"></span> 
+	    	Dato: <span>{% if first.main.date.value %}{{ first.main.date.value }} {% endif %}{{ first.main.created.value }}</span><br/>
+	    </h4>
 	</div>
 	{% endif %}
 	
@@ -120,7 +189,7 @@
     	<h4><span class="glyphicon glyphicon-th"></span> Del av:</h4>
 	        <ul class="list-unstyled">
 	        {% for row in models.collections %}
-	        	<li><span class="glyphicon glyphicon-th-large"></span> <a href="{{ row.collection.value }}" />{{row.collectionName.value}}</a></li>
+	        	<li><a href="{{ row.collection.value }}" />{{row.collectionName.value}}</a></li>
 	        {% endfor %}
 	        </ul>
 	</div>
diff --git a/components/types/bibo__Letter/queries/dzi.query b/components/types/bibo__Letter/queries/dzi.query
index 98fd54cc..0dc00bd6 100755
--- a/components/types/bibo__Letter/queries/dzi.query
+++ b/components/types/bibo__Letter/queries/dzi.query
@@ -3,8 +3,7 @@ SELECT DISTINCT ?dziUri WHERE {
     <{{ uri }}> ubbont:hasPage ?hasPage .
     ?hasPage ubbont:hasRepresentation ?hasRepresentation .
     ?hasRepresentation ubbont:hasURI ?dziUri .
-    ?dziUri <http://www.semanticdesktop.org/ontologies/nie/#mimeType> ?mimeType
-    FILTER (?mimeType = "jpeg/dzi")
+    FILTER (regex(STR(?dziUri), "dzi","i"))	
 }
 ORDER BY ?dziUri
 
diff --git a/components/types/rdfs__Resource/html.template b/components/types/rdfs__Resource/html.template
index 7e8bf061..57cd4343 100644
--- a/components/types/rdfs__Resource/html.template
+++ b/components/types/rdfs__Resource/html.template
@@ -119,7 +119,7 @@
     	<h4><span class="glyphicon glyphicon-th"></span> Del av:</h4>
         <ul class="list-unstyled">
         {% for row in models.collections %}
-        	<li><span class="glyphicon glyphicon-th-large"></span> <a href="{{ row.collection.value }}" />{{row.collectionName.value}}</a></li>
+        	<li><a href="{{ row.collection.value }}" />{{row.collectionName.value}}</a></li>
         {% endfor %}
         </ul>
 	</div>
diff --git a/components/types/ubbont__Document/html.template b/components/types/ubbont__Document/html.template
deleted file mode 100755
index 561bdb63..00000000
--- a/components/types/ubbont__Document/html.template
+++ /dev/null
@@ -1,257 +0,0 @@
-{%include "../../includes/header.inc"%}
-    <div class="container main-body">
-    	<div class="row">
-			<div class="col-md-3">
-			<div class="bs-sidebar hidden-xs hidden-sm affix">
-				<ul class="nav">
-					<li><a href="#image"><span class="glyphicon glyphicon-picture"></span> Foto</a></li>
-					{% if first.transcription.html.value != null %}
-						<li><a href="#transcription"><span class="glyphicon glyphicon-align-left"></span> Transkripsjon</a></li>
-					{% endif %}
-					{% if first.subjects.subject.value != null %}
-						<li><a href="#subjects"><span class="glyphicon glyphicon-tags"></span> Emner</a></li>
-					{% endif %}
-					{% if first.depicted.depicts.value != null %}
-						<li><a href="#places"><span class="glyphicon glyphicon-user"></span> Personer</a></li>
-					{% endif %} 
-					{% if first.places.long.value != null %}
-						<li><a href="#places"><span class="glyphicon glyphicon-map-marker"></span> Steder</a></li>
-					{% endif %} 
-					<li><a href="#disqus_thread"><span class="glyphicon glyphicon-bullhorn"></span> Kommentarer</a></li>
-				</ul>
-				
-				<div class="feedback-error alert alert-warning">
-					<p><a href="mailto:billed@uib.no"><span class="glyphicon glyphicon-exclamation-sign"></span> Feil!? Gi oss beskjed!</a></p>
-				</div>
-				
-				<div class="browse-sidebar">
-					<h4>Bla i:</h4>
-					<ul class="nav">
-						{%include "../../includes/nav.inc"%}
-					</ul>
-				</div>	
-				</div> <!-- End Sidebar -->
-			</div>
-			
-			<div class="col-md-9">
-	        {% for row in models.main %}
-
-	    <h1>{{ row.title.value }}</h1>
-        {% endfor %}
-
-<!--     <p>Signatur: <a href="{{lodspk.this.value}}">{{ first.main.identifier.value }}</a></p> -->
-    
-    {% if 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%}
-    {% endfor %}
-    </p>
-    {% endif %}
-    
-    {% for row in models.description %}
-    <p class="lead">{{ row.description.value }}</p>
-    {%endfor%}
-	
-    {% for row in models.physicalcondition %}
-    <p>{{ row.physicalCondition.value }}</p>
-    {%endfor%}
-    
-    {% for row in models.physicaldescription %}
-    <p>{{ row.physicalDescription.value }}</p>
-    {%endfor%}
-    
-    {% for row in models.internalnote %}
-    <p>{{ row.internalNote.value }}</p>
-    {%endfor%}
-    
-    {% if models.image|length != 0 %}
-    <div class="row">
-    {% for row in models.image %}
-    	<div class="col-md-4 col-lg-4">
-        	
-				<a class="thumbnail" href="{{ row.imageHigh.value }}"><img class="img-responsive" src="{{row.imageLow.value}}" alt=""></a>
-<!--
-      		<div class="caption">
-      		<h3>{{ row.title.value }}</h3>
-      		</div>
--->
-	  		
-      	</div>
-    {% endfor %}
-    </div>
-    {% endif %}
-    
-	{% if 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>
-    </div>
-    {% endif %}
-  
-    
-    
-    <div id="resource-metadata" class="row">	
-
-    {% if first.main.created.value|length != 0 %}
-    <div class="col-md-4">
-
-    <h4><span class="glyphicon glyphicon-calendar"></span> 
-    		Dato: <span>{{ first.main.created.value }}</span><br>
-    </h4>
-	</div>
-	{% endif %}
-	
-     {% if models.collections|length != 0  %}
-    <div class="col-md-4">
-    	<h4><span class="glyphicon glyphicon-th"></span> Del av:</h4>
-	        <ul class="list-unstyled">
-	        {% for row in models.collections %}
-	        	<li><span class="glyphicon glyphicon-th-large"></span> <a href="{{ row.collection.value }}" />{{row.collectionName.value}}</a></li>
-	        {% endfor %}
-	        </ul>
-	</div>
-    {% endif %}  
-    
-    {% if models.relatedresources|length != 0  %}
-	<div class="col-md-4">
-	<h4>Relatert:</h4>
-	<ul class="list-unstyled">
-    	{% for row in models.relatedresources %}
-        	<li><span class="glyphicon glyphicon-user"></span> <a href="{{ row.uri.value }}" />{{row.label.value}}</a></li>
-		{% endfor %} 
-	</ul>
-	</div>
-	{% endif %} 
-
-
-    </div>
-		
-		{% if first.subjects.subject.value != null %}
-		<div id="subjects">
-		<ul class="subjects-inline-list">
-		{% for row in models.subjects %}
-        	<li class="tags"><a href="{{ row.subject.value }}" /><i class="icon-tag"></i> {{row.subjectLabel.value}}</a></li>
-		{% endfor %} 
-		</ul>
-		</div>
-		{%endif%}
-		
-		
-		{% for row in models.depicted %}
-        	<div><a href="{{ row.depicts.value }}" /><span class="btn">{{row.depictsName.value}}</span></a></div>
-		{% endfor %} 
-		
-		
-		{% if first.places.place.value != null %}
-    		<div id="places">
-    	 {% if first.places.long.value != null %}
-    	 	<div id="map-wrap">
-    		<div id="map"></div>
-    		<ul class="places-inline-list">
-		{% for row in models.places %}
-        	<li><a href="{{ row.place.value }}" /><span class="glyphicon glyphicon-map-marker"></span> {{row.placeName.value}}</a></li>
-		{% endfor %} 
-		</ul>
-    		</div>
-    	{% endif %} 
-		
-
-		{% if first.places.place.value != null %}
-    		</div>
-    	{% endif %} 
-    	{% endif %} 
-		
-		<script>
-			{% if first.places.long.value %}
-	    	var map = L.map('map').setView([{{ first.places.lat.value }}, {{ first.places.long.value }}], 10);
-	    	{% endif %} 
-	
-			var defaultLayer = L.tileLayer.provider('OpenStreetMap.Mapnik').addTo(map);
-					
-			var baseLayers = [
-				'OpenStreetMap.Mapnik',
-				'MapQuestOpen.OSM',
-				'MapQuestOpen.Aerial',
-				'Stamen.Watercolor'		
-				];
-			
-			var overlayLayers = [
-				'Kartverket',
-				'Rodekart9',
-				'Rodekart4',
-				'Rodekart1'
-			];
-			
-			L.control.layers.provided(baseLayers, overlayLayers, {collapsed: true}).addTo(map);
-	
-			{% for row in models.places %}
-				{% if 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 %} 
-	</script>
-	
-	    <div id="disqus_thread"></div>
-    <script type="text/javascript">
-        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
-        var disqus_shortname = 'ubblod'; // required: replace example with your forum shortname
-
-        /* * * DON'T EDIT BELOW THIS LINE * * */
-        (function() {
-            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
-            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
-            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
-        })();
-    </script>
-    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
-    <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
-	
-	    <div class="row full-metadata-div">
-    	<div class="col-lg-12">
-			<button type="button" class="btn btn-sm btn-info" data-toggle="collapse" data-target="#full-meta-view">
-				Vis all informasjon
-			</button>
-
-			<div id="full-meta-view" class="collapse">
-				<table class="table table-striped" about="{{uri}}">
-					<thead>
-						<tr><th>Subject</th><th>Predicate</th><th>Object</th></tr>
-					</thead>
-			    {% for row in models.po %}
-						<tr>
-							<td>{%if forloop.first%}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{%endif%}</td>
-							<td><a href='{{row.p.value}}'>{{row.p.curie}}</a></td>
-							<td>
-								{%if row.o.uri == 1%}
-								<a rel='{{row.p.value}}' href='{{row.o.value}}'>{{row.o.curie}}</a>
-								{%else%}
-								<span property='{{row.p.value}}'>{{row.o.value}}</span>
-								{%endif%}
-							</td>
-						</tr>
-				{% endfor %}
-
-				{% for row in models.sp %}
-						<tr>
-							<td><a href='{{row.s.value}}'>{{row.s.curie}}</a></td>
-							<td><a rev='{{row.s.value}}' href='{{row.p.value}}'>{{row.p.curie}}</a></td>
-							<td>{%if forloop.first%}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{%endif%}</td>
-						</tr>
-				{% endfor %}
-					<thead>
-						<tr><th>Subject</th><th>Predicate</th><th>Object</th></tr>
-					</thead>
-				</table>
-			</div>
-		</div>
-    </div>
-	
-	</div>
-	</div>
-    </div>
-    </div>
-    	{%include "../../includes/footer.inc"%}
-    
-  </body>
-</html>
diff --git a/components/types/ubbont__Document/queries/subjects.query b/components/types/ubbont__Document/queries/subjects.query
deleted file mode 100755
index 816a2c69..00000000
--- a/components/types/ubbont__Document/queries/subjects.query
+++ /dev/null
@@ -1,8 +0,0 @@
-SELECT DISTINCT ?subject ?subjectLabel WHERE {
-
-    OPTIONAL { <{{ uri|deurifier }}> dct:subject ?subject . 
-    	OPTIONAL { ?subject skos:prefLabel ?subjectLabel ; a skos:Concept .}
-		OPTIONAL { ?subject rdfs:label ?subjectLabel ; a skos:Concept .}}
-    
-}
-
diff --git a/components/types/ubbont__Document/queries/transcription.query b/components/types/ubbont__Document/queries/transcription.query
deleted file mode 100755
index 969fd069..00000000
--- a/components/types/ubbont__Document/queries/transcription.query
+++ /dev/null
@@ -1,17 +0,0 @@
-SELECT DISTINCT ?html ?xml WHERE 
-{
-	{ SELECT DISTINCT ?html WHERE {
-	    <{{ uri }}> ubbont:hasTranscription ?transcription .
-	    ?transcription  ubbont:hasRepresentation ?hasRepresentation .
-	    ?hasRepresentation ubbont:hasURI ?html .
-		FILTER(regex(?html, "html", "i"))		
-	}
-}
-	{ SELECT DISTINCT ?xml WHERE {
-	    <{{ uri }}> ubbont:hasTranscription ?transcription .
-	    ?transcription  ubbont:hasRepresentation ?hasRepresentation .
-	    ?hasRepresentation ubbont:hasURI ?xml .
-		FILTER(regex(?xml, "xml", "i"))	
-	}
-}
-}
\ No newline at end of file
diff --git a/components/types/xfoaf__Person/html.template b/components/types/xfoaf__Person/html.template
deleted file mode 100755
index 25324cc6..00000000
--- a/components/types/xfoaf__Person/html.template
+++ /dev/null
@@ -1,41 +0,0 @@
-{%include "../../includes/header.inc"%}
-    <div class="container-fluid">
-    <h1>Default view</h1>
-
-    <table class="table table-striped" about="{{uri}}">
-    <thead>
-      <tr><th>Subject</th><th>Predicate</th><th>Object</th></tr>
-    </thead>
-    {% for row in models.po %}
-     <tr>
-<td>{%if forloop.first%}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{%endif%}</td>
-     <td><a href='{{row.p.value}}'>{{row.p.curie}}</a></td>
-     
-        <td>
-        {%if row.o.uri == 1%}
-        <a rel='{{row.p.value}}' href='{{row.o.value}}'>{{row.o.value}}</a>
-        {%else%}
-        <span property='{{row.p.value}}'>{{row.o.value}}</span>
-        {%endif%}
-        </td>
-
-        </tr>
-    {% endfor %}
-
-    {% for row in models.sp %}
-      <tr>
-        <td><a href='{{row.s.value}}'>{{row.s.curie}}</a></td>
-
-        <td><a rev='{{row.s.value}}' href='{{row.p.value}}'>{{row.p.curie}}</a></td>
-<td>{%if forloop.first%}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{%endif%}</td>
-        </tr>
-    {% endfor %}
-    <thead>
-      <tr><th>Subject</th><th>Predicate</th><th>Object</th></tr>
-    </thead>
-
-    </table>
-    </div>    
-    
-  </body>
-</html>
diff --git a/components/types/xfoaf__Person/queries/po.query b/components/types/xfoaf__Person/queries/po.query
deleted file mode 100755
index fd5504f8..00000000
--- a/components/types/xfoaf__Person/queries/po.query
+++ /dev/null
@@ -1,9 +0,0 @@
-SELECT ?p ?o  WHERE {
-  {
-    GRAPH ?g{
-                <{{uri|deurifier}}> ?p ?o.
-    }
-  }UNION{     
-                <{{uri|deurifier}}}> ?p ?o .
-  }
-}LIMIT {{lodspk.maxResults}}
diff --git a/components/types/xfoaf__Person/queries/sp.query b/components/types/xfoaf__Person/queries/sp.query
deleted file mode 100755
index db705ad3..00000000
--- a/components/types/xfoaf__Person/queries/sp.query
+++ /dev/null
@@ -1,9 +0,0 @@
-SELECT ?s ?p  WHERE {
-  {
-    GRAPH ?g{
-                ?s ?p <{{uri}}> .
-    }
-  }UNION{     
-                ?s ?p <{{uri}}> .
-  }
-}LIMIT {{lodspk.maxResults}}
-- 
GitLab