diff --git a/.htaccess b/.htaccess index e7d21d5ce629bcee886fcb8cae3944135cb5cc88..473ef9c261d953a6136f295599dcc250e6f40e1d 100644 --- a/.htaccess +++ b/.htaccess @@ -7,6 +7,7 @@ RewriteCond %{SCRIPT_FILENAME} !.*/index.php$ RewriteRule ^(.*)$ index.php?q=$1 [L] AddType application/xml .dzi AddType text/plain .log +AddType application/javascript .jsonp ## EXPIRES CACHING ## <IfModule mod_expires.c> diff --git a/classes/Utils.php b/classes/Utils.php index e4129fe81d7824742e54b06866eb15e8452a7d95..28c0be876b7116451883dfde845779a29e88f791 100755 --- a/classes/Utils.php +++ b/classes/Utils.php @@ -216,6 +216,9 @@ class Utils{ case 'json': $ser = ARC2::getRDFJSONSerializer(); break; + case 'jsonp': + $ser = ARC2::getRDFJSONSerializer(); + break; case 'rdf': $ser = ARC2::getRDFXMLSerializer(); break; diff --git a/classes/modules/staticModule.php b/classes/modules/staticModule.php index 17f58f2afc9683faf8a275470417cf780a3312a0..69a5501d7118650a47f85f97812d28e10905ba1b 100755 --- a/classes/modules/staticModule.php +++ b/classes/modules/staticModule.php @@ -61,7 +61,8 @@ class StaticModule extends abstractModule{ 'css' => 'text/css', 'js' => 'application/javascript', 'json' => 'application/json', - 'nt' => 'text/plain', + 'jsonp'=> 'application/javascript', + 'nt' => 'text/plain', 'ttl' => 'text/turtle', 'png' => 'image/png', 'jpg' => 'image/jpeg', diff --git a/components/includes/footer.inc b/components/includes/footer.inc index a050fb3c216a5f32d9b34b98dbe93279265b8bb0..4c6fa0043e59cce39d111f1f2e6caa72e5790000 100755 --- a/components/includes/footer.inc +++ b/components/includes/footer.inc @@ -89,6 +89,7 @@ </div> </div> + </div> </footer> <script type="text/javascript"> @@ -96,7 +97,7 @@ $('.bs-sidebar').affix({ offset: { top: 0, bottom: function () { - return (this.bottom = $('.footer').outerHeight(false)) + return (this.bottom = $('.footer').outerHeight(false)+35) } } }) diff --git a/components/includes/header.inc b/components/includes/header.inc index 3fbec40a376f15ffd159648c38fb663f27ff4d1a..643630a0830ebd186e1647c2e301312b424920fc 100755 --- a/components/includes/header.inc +++ b/components/includes/header.inc @@ -3,7 +3,8 @@ <head> <meta charset="utf-8"> - <title>{{lodspk.title}}</title> + <title>{{lodspk.title}}</title> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <link rel="shortcut icon" type="image/x-icon" href="{{lodspk.home}}/img/favicon.ico"> <!-- Latest compiled and minified CSS --> @@ -26,18 +27,22 @@ <meta name="author" content=""> <!-- FACEBOOK OPEN GRAPH --> - <meta property=â€og:title†content=â€{{first.main.label.value}}â€/> - <meta property=â€og:type†content=â€articleâ€/> - <meta property=â€og:description†content=â€â€œ/> - <meta property=â€og:image†content=â€{{ first.main.img.value }}â€/> - <meta property=â€og:url†content=â€{{ uri }}â€/> - <meta property=â€og:site_name†content=â€Marcusâ€/> + <meta property="og:title" content="{{first.main.label.value}}"/> + <meta property="og:type" content="article"/> + {% for row in models.description %} + <meta property="og:description" content="{{ row.description.value }}"/> + {% endfor %} + <meta property="og:image" content="{{ first.main.img.value }}"/> + <meta property="og:url" content="{{lodspk.local.curie}}"/> + <meta property="og:site_name" content="Marcus"/> <!-- TWITTER CARD --> - <meta name=â€twitter:card†content=â€photoâ€> - <meta name=â€twitter:url†content=â€{{ uri }}“> - <meta name=â€twitter:description†content=â€â€œ> - <meta name=â€twitter:image†content=â€{{ first.main.img.value }}â€> + <meta name="twitter:card" content="photo"> + <meta name="twitter:url" content="{{lodspk.local.curie}}"> + {% for row in models.description %} + <meta name="twitter:description" content="{{ row.description.value }}"> + {% endfor %} + <meta name="twitter:image" content="{{ first.main.img.value }}"> <script src="//code.jquery.com/jquery.js"></script> <!-- <script type="text/javascript" src="{{lodspk.home}}js/jquery.js"></script> --> @@ -51,9 +56,6 @@ <link rel="alternate" type="text/turtle" title="Turtle Version" href="{{lodspk.local.value}}.ttl" /> <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> - - </style> <script type="text/javascript" src="{{lodspk.home}}js/bootstrap-typeahead.js"></script> <script type="text/javascript"> @@ -72,7 +74,7 @@ window.location = obj.uri; } }); - $("input").on('keyup', function(){$("form").attr("action", 'http://marcus.uib.no/search/'+$(this).val())}); + $(".header-search").on('keyup', function(){$("form").attr("action", 'http://marcus.uib.no/search/'+$(this).val())}); }); </script> @@ -98,26 +100,7 @@ </button> <a class="navbar-brand" href="{{lodspk.home}}">{{lodspk.title}}</a> <a class="nav-subtitle hidden-xs hidden-sm" href="{{lodspk.home}}"><small>Spesialsamlingene ved <br>Universitetet i Bergen</small></a> - </div> - - - <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" 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> - - <div id="popover-beta-head" style="display: none;"> + <div id="popover-beta-head" style="display: none;"> <strong>Marcus - Beta</strong> </div> <div id="popover-beta-content" style="display: none;"> @@ -136,6 +119,26 @@ } }); </script> + </div> + + + <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="#"> Manuskript- og librarsamlingen <span class="caret"></span></a> + <ul class="dropdown-menu" aria-labelledby="browse1" role="meny"> + {%include "../../includes/nav.inc"%} + </ul> + </li> + <li><a href="http://marcus.app.uib.no/">Billedsamlingen</a></li> + </ul> + + <form class="navbar-form navbar-right" role="search" action=""> + <div class="form-group"> + <input class="header-search" type="text" data-provide="typeahead" class="typeahead form-control search-query" placeholder="Søk"/> + </div> + </form> <!-- <ul class="nav navbar-nav navbar-right"> diff --git a/components/includes/persons/for_row.inc b/components/includes/persons/for_row.inc index b0f60c2c4bf01e7014cdfe3d446d35167392f8d4..2fed814a50ef2cb349b5bf6e1f5fbc287479a9b1 100755 --- a/components/includes/persons/for_row.inc +++ b/components/includes/persons/for_row.inc @@ -1,5 +1 @@ -<li><a href="{{ row.x.value }}"><span class="glyphicon glyphicon-user"></span> {{row.name.value}}</a><br /> - {% if row.imgUriUri.value %} - <a href="{{ row.imgUriUri.value }}"><img class="col-md-10 thumbnail" data-src="holder.js/300x200" src="{{row.depictionImage.value}}" alt=""></a> - {% endif %} - </li> +<li><a href="{{ row.uri.value }}"><span class="glyphicon glyphicon-user"></span> {{row.label.value}}</a></li> diff --git a/components/includes/search.inc b/components/includes/search.inc index 616b36b30d4bad7673a43220cb53dc3a3209891d..def5a66fa5ef56faea285577f5a9a459523c2eaf 100755 --- a/components/includes/search.inc +++ b/components/includes/search.inc @@ -1,11 +1,9 @@ -<form action="{{uri}}" method="POST"> - <div class="col-lg-6"> +<form action="{{lodspk.this.local}}" method="POST"> <div class="input-group"> - <input type="text" class="form-control" name="query"> <span class="input-group-btn"> - <button class="btn btn-default" type="submit">Søk</button> + <button class="btn btn-info" type="submit"><span class="glyphicon glyphicon-search"></span></button> </span> + <input type="text" class="form-control" name="query"> </div><!-- /input-group --> -</div><!--col-lg-6--> </form> diff --git a/components/services/instance%2Fcataloguecard/queries/main.query b/components/services/instance%2Fcataloguecard/queries/main.query index 7222b6db6b6ef2dbd10b80d3312d4223870e515e..723834d3449436d7067a2ba801fca6b2bf3caa2e 100755 --- a/components/services/instance%2Fcataloguecard/queries/main.query +++ b/components/services/instance%2Fcataloguecard/queries/main.query @@ -1,6 +1,6 @@ SELECT DISTINCT ?title ?description ?identifier ?reference ?spatial WHERE { <{{ uri }}> ubbont:showWeb true ; - dct:title ?title . + rdfs:label ?title . OPTIONAL { <{{ uri }}> dct:description ?description . } OPTIONAL { <{{ uri }}> dct:identifier ?identifier . } OPTIONAL { <{{ uri }}> dct:reference ?reference . } diff --git a/components/services/instance%2Fcharter/queries/places.query b/components/services/instance%2Fcharter/queries/places.query deleted file mode 100755 index b52793baeb2a6edeabd3af0feaa4998f27169689..0000000000000000000000000000000000000000 --- a/components/services/instance%2Fcharter/queries/places.query +++ /dev/null @@ -1,6 +0,0 @@ -SELECT DISTINCT ?place ?placeName ?lat ?long WHERE { - - 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/html.template b/components/services/instance%2FcharterX/html.template similarity index 97% rename from components/services/instance%2Fcharter/html.template rename to components/services/instance%2FcharterX/html.template index 7d713ffaefbd8756949b9d45cd111395b07f6d0f..10e14275e6406359a1bef38581b391d6e56117d7 100755 --- a/components/services/instance%2Fcharter/html.template +++ b/components/services/instance%2FcharterX/html.template @@ -160,7 +160,7 @@ <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> + <li><a href="{{ row.uri.value }}" /><span class="glyphicon glyphicon-map-marker"></span> {{row.label.value}}</a></li> {% endfor %} </ul> @@ -188,7 +188,7 @@ {% 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(); + L.marker([{{ row.lat.value }}, {{ row.long.value }}]).addTo(map).bindPopup("<b><a href=\"{{ row.uri.value }}\">{{row.label.value}}</a></b>").openPopup(); {% endif %} {% endfor %} </script> diff --git a/components/services/instance%2Fcharter/queries/collections.query b/components/services/instance%2FcharterX/queries/collections.query similarity index 100% rename from components/services/instance%2Fcharter/queries/collections.query rename to components/services/instance%2FcharterX/queries/collections.query diff --git a/components/services/instance%2Fcharter/queries/description.query b/components/services/instance%2FcharterX/queries/description.query similarity index 100% rename from components/services/instance%2Fcharter/queries/description.query rename to components/services/instance%2FcharterX/queries/description.query diff --git a/components/services/instance%2Fcharter/queries/dzi.query b/components/services/instance%2FcharterX/queries/dzi.query similarity index 100% rename from components/services/instance%2Fcharter/queries/dzi.query rename to components/services/instance%2FcharterX/queries/dzi.query diff --git a/components/services/instance%2Fcharter/queries/image.query b/components/services/instance%2FcharterX/queries/image.query similarity index 100% rename from components/services/instance%2Fcharter/queries/image.query rename to components/services/instance%2FcharterX/queries/image.query diff --git a/components/services/instance%2Fcharter/queries/internalnote.query b/components/services/instance%2FcharterX/queries/internalnote.query similarity index 100% rename from components/services/instance%2Fcharter/queries/internalnote.query rename to components/services/instance%2FcharterX/queries/internalnote.query diff --git a/components/services/instance%2Fcharter/queries/main.query b/components/services/instance%2FcharterX/queries/main.query similarity index 95% rename from components/services/instance%2Fcharter/queries/main.query rename to components/services/instance%2FcharterX/queries/main.query index d41d2b4f69e599ed157f13513d34261b936896ca..ec4dbd30d2b5a4fc05744c1645e2fc13574fab24 100755 --- a/components/services/instance%2Fcharter/queries/main.query +++ b/components/services/instance%2FcharterX/queries/main.query @@ -1,4 +1,4 @@ -SELECT DISTINCT ?title ?created ?available ?identifier ?hasLong WHERE { +SELECT DISTINCT ?title ?created ?available ?identifier ?hasLong ?hasLong WHERE { <{{ uri }}> rdfs:label|dct:title ?title . OPTIONAL { <{{ uri }}> dct:identifier ?identifier . } diff --git a/components/services/instance%2Fcharter/queries/maker.query b/components/services/instance%2FcharterX/queries/maker.query similarity index 100% rename from components/services/instance%2Fcharter/queries/maker.query rename to components/services/instance%2FcharterX/queries/maker.query diff --git a/components/services/instance%2Fcharter/queries/physicalcondition.query b/components/services/instance%2FcharterX/queries/physicalcondition.query similarity index 100% rename from components/services/instance%2Fcharter/queries/physicalcondition.query rename to components/services/instance%2FcharterX/queries/physicalcondition.query diff --git a/components/services/instance%2Fcharter/queries/physicaldescription.query b/components/services/instance%2FcharterX/queries/physicaldescription.query similarity index 100% rename from components/services/instance%2Fcharter/queries/physicaldescription.query rename to components/services/instance%2FcharterX/queries/physicaldescription.query diff --git a/components/services/instance%2FcharterX/queries/places.query b/components/services/instance%2FcharterX/queries/places.query new file mode 100755 index 0000000000000000000000000000000000000000..344b78eb9bd73913ab68ef9afaaca5e0bc87fb35 --- /dev/null +++ b/components/services/instance%2FcharterX/queries/places.query @@ -0,0 +1,5 @@ +SELECT DISTINCT ?uri ?label ?lat ?long WHERE { + OPTIONAL { <{{ uri|deurifier }}> dct:spatial ?uri . ?uri skos:prefLabel ?label . + OPTIONAL { ?uri geo:lat ?lat ; geo:long ?long .}} +} + diff --git a/components/services/instance%2Fcharter/queries/po.query b/components/services/instance%2FcharterX/queries/po.query similarity index 100% rename from components/services/instance%2Fcharter/queries/po.query rename to components/services/instance%2FcharterX/queries/po.query diff --git a/components/services/instance%2Fcharter/queries/relatedresources.query b/components/services/instance%2FcharterX/queries/relatedresources.query similarity index 100% rename from components/services/instance%2Fcharter/queries/relatedresources.query rename to components/services/instance%2FcharterX/queries/relatedresources.query diff --git a/components/services/instance%2Fcharter/queries/sp.query b/components/services/instance%2FcharterX/queries/sp.query similarity index 100% rename from components/services/instance%2Fcharter/queries/sp.query rename to components/services/instance%2FcharterX/queries/sp.query diff --git a/components/services/instance%2Fcharter/queries/subjects.query b/components/services/instance%2FcharterX/queries/subjects.query similarity index 100% rename from components/services/instance%2Fcharter/queries/subjects.query rename to components/services/instance%2FcharterX/queries/subjects.query diff --git a/components/services/instance%2Fcharter/queries/transcription.query b/components/services/instance%2FcharterX/queries/transcription.query similarity index 100% rename from components/services/instance%2Fcharter/queries/transcription.query rename to components/services/instance%2FcharterX/queries/transcription.query diff --git a/components/services/instance%2Fcollection%2Fbrosing-topologiske-katalogkort/html.template b/components/services/instance%2Fcollection%2Fbrosing-topologiske-katalogkort/html.template index f8eace588ea84d7ef6550ef320748c5ca896f0bf..578a64001c0afb5222fd2f56ae0afa40f5bfd797 100755 --- a/components/services/instance%2Fcollection%2Fbrosing-topologiske-katalogkort/html.template +++ b/components/services/instance%2Fcollection%2Fbrosing-topologiske-katalogkort/html.template @@ -20,7 +20,7 @@ <h1>{{first.main.label.value}} <span class="badge">{{ first.count.total.value }}</span></h1> {% for row in models.main %} - <p>{{ row.description.value }}</p> + <p class="lead">{{ row.description.value }}</p> {% endfor %} {% if first.haspart.part.value != null %} diff --git a/components/services/instance%2Fcollection%2Fbrosing-topologiske-katalogkort/queries/haspart.query b/components/services/instance%2Fcollection%2Fbrosing-topologiske-katalogkort/queries/haspart.query index 9589af8902132bc881ac5b23e1c03c5ea5152e35..aa41e4d367aef33633f5e503596d19a3f9caad8b 100755 --- a/components/services/instance%2Fcollection%2Fbrosing-topologiske-katalogkort/queries/haspart.query +++ b/components/services/instance%2Fcollection%2Fbrosing-topologiske-katalogkort/queries/haspart.query @@ -2,7 +2,7 @@ SELECT * WHERE { { SELECT DISTINCT ?part ?title ?description WHERE { <http://data.ub.uib.no/instance/collection/brosing-topologiske-katalogkort> dct:hasPart ?part . - OPTIONAL { ?part dct:title ?title . } + OPTIONAL { ?part rdfs:label ?title . } OPTIONAL { ?part dct:description ?description . } } ORDER BY ?part diff --git a/components/services/instance%2Fcollection/html.template b/components/services/instance%2Fcollection/html.template index dd8f1ef7a98d3bbff25abbb3f42c3977ff86cf87..73e2280b4a9bd319b94684d1b46d2123c9deb59b 100755 --- a/components/services/instance%2Fcollection/html.template +++ b/components/services/instance%2Fcollection/html.template @@ -1,25 +1,68 @@ {%include "../../includes/header.inc"%} <div class="container main-body"> <div class="row"> - <div class="col-md-3 hidden-xs hidden-sm"> - - <div id="bs-sidebar affix"> + <div class="col-md-3"> + <div class="bs-sidebar hidden-xs hidden-sm affix"> {% if first.main.logo != null %} - <img class="img-circle img-border img-responsive" src="{{first.main.logo.value}}"> + <img class="collection-logo img-circle img-border img-responsive" src="{{first.main.logo.value}}"> {% endif %} - <div class="browse-sidebar"> - <h4>Bla i:</h4> - <ul class="nav"> - {%include "../../includes/nav.inc"%} - </ul> - </div> - </div> <!-- End Sidebar --> + + <form action="{{lodspk.this.local}}" method="POST"> + <div class="input-group"> + <span class="input-group-btn"> + <button class="btn btn-info" type="submit"><span class="glyphicon glyphicon-search"></span></button> + </span> + <input type="text" class="form-control" name="query" placeholder="Søk i samlingen"> + </div><!-- /input-group --> + </form> + + <div class="browse-sidebar"> + <h4>Bla i <span class="marcus-logo">Marcus</span></h4> + <ul class="list-unstyled"> + {% include "../../includes/nav.inc" %} + </ul> </div> + + </div> <!-- End Sidebar --> + </div> <div class="col-md-9"> <h1>{{first.main.label.value}} <span class="badge">{{ first.count.total.value }}</span></h1> <p class="lead">{{ first.main.description.value }}</p> + +<!-- + <div id="timeline-embed"></div> + <script type="text/javascript"> + var timeline_config = { + width: '100%', + height: '450', + source: 'timeline.json', + embed_id: 'timeline-embed', //OPTIONAL USE A DIFFERENT DIV ID FOR EMBED + start_at_end: false, //OPTIONAL START AT LATEST DATE + start_at_slide: '1', //OPTIONAL START AT SPECIFIC SLIDE + start_zoom_adjust: '2', //OPTIONAL TWEAK THE DEFAULT ZOOM LEVEL + hash_bookmark: true, //OPTIONAL LOCATION BAR HASHES + debug: true, //OPTIONAL DEBUG TO CONSOLE + maptype: 'sterrain', //OPTIONAL MAP STYLE + lang: 'no', //OPTIONAL LANGUAGE + js: '{{lodspk.home}}js/TimelineJS/compiled/js/timeline-min.js', //OPTIONAL PATH TO JS + css: '{{lodspk.home}}js/TimelineJS/compiled/css/timeline.css' //OPTIONAL PATH TO CSS + } + </script> + <script type="text/javascript" src="{{lodspk.home}}js/TimelineJS/compiled/js/storyjs-embed.js"></script> +--> + + <h2>{% if lodspk.query %} / <small>"{{lodspk.query}}"</small> {%else%}/ <small>{{first.count.total.value}}</small>{%endif%}</h2> + {% if lodspk.query %} + <ul class="list-unstyled"> + {% for row in models.search %} + <li><a href="{{ row.doc.value }}"><span class="glyphicon glyphicon-book"></span> {{row.label.value}}</a></li> + {% endfor %} + </ul> + {% else %} + + {% if first.photographlist.imgUri != null %} {% for row in models.photographlist %} @@ -45,8 +88,9 @@ </ul> {% endif %} - - {% if first.count.total.value > 100 %} + {% endif %} + + {% if !lodspk.query && first.count.total.value > 100 %} <script> if ("{{lodspk.args.arg1}}".length < 1) {page = 0;} @@ -74,9 +118,7 @@ $("#next").attr("href",next_uri); }; document.write('</ul>'); - </script> - {% endif %} </div></div></div> diff --git a/components/services/instance%2Fcollection/queries/search.query b/components/services/instance%2Fcollection/queries/search.query new file mode 100644 index 0000000000000000000000000000000000000000..cc30e62d4ea319a9bf1648aa8da02c2ab50b75f7 --- /dev/null +++ b/components/services/instance%2Fcollection/queries/search.query @@ -0,0 +1,12 @@ +SELECT DISTINCT ?uri ?doc ?label WHERE { + +{% if lodspk.query %} +?uri text:query ('{{lodspk.query}}') . +?doc dct:isPartOf <{{uri}}> . +?uri ?p ?doc . +?doc a ?class . +?class rdfs:subClassOf+ bibo:Document . +OPTIONAL { ?doc rdfs:label ?label . } +{% endif %} +} +LIMIT 100 diff --git a/components/services/instance%2Fcollection/queries/timeline.query b/components/services/instance%2Fcollection/queries/timeline.query new file mode 100644 index 0000000000000000000000000000000000000000..5463c049ecbe0a63ea9f766eacb0fb710f348dc1 --- /dev/null +++ b/components/services/instance%2Fcollection/queries/timeline.query @@ -0,0 +1,12 @@ +SELECT DISTINCT ?startDate ?media ?headline ?text ?thumbnail ?year ?month ?day WHERE { +?media a ubbont:Charter . +?media dct:isPartOf <http://data.ub.uib.no/instance/collection/diplomsamlingen> . +?media ubbont:hasPage/ubbont:hasThumbnail ?thumbnail; +dct:created ?startDate ; +rdfs:label ?headline ; +dct:description ?text . +BIND ( year(?startDate) AS ?year ) +BIND ( month(?startDate) AS ?month ) +BIND ( day(?startDate) AS ?day ) +FILTER(regex(str(?thumbnail), "_1_thumb", "i")) +} diff --git a/components/services/instance%2Fperson/queries/main.query b/components/services/instance%2Fperson/queries/main.query index e262c72f1595b00eb5489b50ba9b853edaf40376..bd9a3685e5bd335594ad33bdd600d76d383c0293 100755 --- a/components/services/instance%2Fperson/queries/main.query +++ b/components/services/instance%2Fperson/queries/main.query @@ -1,5 +1,7 @@ SELECT ?name ?sameAs ?deathDate ?birthDate WHERE { - <http://data.ub.uib.no/instance/person/{{ lodspk.args.arg0 }}> <http://xmlns.com/foaf/0.1/name> ?name . + <http://data.ub.uib.no/instance/person/{{ lodspk.args.arg0 }}> a foaf:Person . + OPTIONAL { <http://data.ub.uib.no/instance/person/{{ lodspk.args.arg0 }}> foaf:name ?name . } + OPTIONAL { <http://data.ub.uib.no/instance/person/{{ lodspk.args.arg0 }}> ubbont:invertedName ?name . } OPTIONAL { <http://data.ub.uib.no/instance/person/{{ lodspk.args.arg0 }}> <http://dbpedia.org/ontology/birthDate> ?birthDate . } OPTIONAL { <http://data.ub.uib.no/instance/person/{{ lodspk.args.arg0 }}> <http://dbpedia.org/ontology/deathDate> ?deathDate . } OPTIONAL { <http://data.ub.uib.no/instance/person/{{ lodspk.args.arg0 }}> owl:sameAs ?sameAs . } diff --git a/components/services/instance%2Fperson/queries/related.query b/components/services/instance%2Fperson/queries/related.query index e9f8fb853bcdfa3a0bec573cac3566f57708aecc..19e5dd521c95139d4872843e0a5112bc7c405d3a 100755 --- a/components/services/instance%2Fperson/queries/related.query +++ b/components/services/instance%2Fperson/queries/related.query @@ -1,7 +1,10 @@ SELECT * WHERE { { - SELECT ?label ?uri ?image ?p WHERE { - <http://data.ub.uib.no/instance/person/{{ lodspk.args.arg0 }}> ?p ?uri . + SELECT DISTINCT ?label ?uri ?image ?p WHERE { + { + <http://data.ub.uib.no/instance/person/{{ lodspk.args.arg0 }}> ?p ?uri . } + UNION + {?uri ?p <http://data.ub.uib.no/instance/person/{{ lodspk.args.arg0 }}> .} ?uri a ?class . ?class rdfs:subClassOf+ bibo:Document . OPTIONAL { ?uri ubbont:hasRepresentation/ubbont:hasURI ?image . } diff --git a/components/services/persons/html.template b/components/services/persons/html.template index 714d83f175ad594fcb57f18e0d65e00af11c2b14..dc4df99101c5aa862bbed358818c1983a5705e2f 100755 --- a/components/services/persons/html.template +++ b/components/services/persons/html.template @@ -3,48 +3,52 @@ <div class="row"> <div class="col-md-3"> <div class="bs-sidebar hidden-xs hidden-sm affix"> - - <h4>Bla i:</h4> - <ul class="nav"> - {%include "../../includes/nav.inc"%} - </ul> + + <form action="{{lodspk.this.local}}" method="POST"> + <div class="input-group"> + <span class="input-group-btn"> + <button class="btn btn-info" type="submit"><span class="glyphicon glyphicon-search"></span></button> + </span> + <input type="text" class="form-control" name="query" placeholder="Søk etter person"> + </div><!-- /input-group --> + </form> + + <h5>Hvorfor er det mange dubletter?</h5> + <p>Siden vi har konvertert innholdet til <span class="marcus-logo">Marcus</span> fra mange kilder kan det oppstÃ¥ dubletter. Det er heller ikke sÃ¥ lett Ã¥ si med sikkerhet om det er samme person som er nevnes i de eldre delene av samlingene.</p> + + <div class="browse-sidebar"> + <h4>Bla i <span class="marcus-logo">Marcus</span></h4> + <ul class="list-unstyled"> + {% include "../../includes/nav.inc" %} + </ul> + </div> </div> <!-- End Sidebar --> </div> <div class="col-md-9"> - <div class="row service-search"> - <h1>Personer {% if lodspk.query %} - <small>"{{lodspk.query}}"</small> {%endif%}</h1> - - {% include "/../../includes/search.inc" %} + <div class="service-search"> + <h1>Personer {% if lodspk.query %} / <small>"{{lodspk.query}}"</small> {%else%}/ <small>{{first.count.total.value}}</small>{%endif%}</h1> </div> - <div class="row"> <ul class="agent-list list-unstyled"> {% if lodspk.query %} {% for row in models.search %} - <li><a href="{{ row.x.value }}"><span class="glyphicon glyphicon-user"></span> {{row.name.value}}</a><br /> - {% if row.imgUriUri.value %} - <a href="{{ row.imgUriUri.value }}"><img class="col-md-10 thumbnail" data-src="holder.js/300x200" src="{{row.depictionImage.value}}" alt=""></a> - {% endif %} - </li> - {% endfor %} + <li><a href="{{ row.uri.value }}"><span class="glyphicon glyphicon-user"></span> {{row.label.value}}</a></li> + {% endfor %} {% else %} - {% for row in models.main %} - <li><a href="{{ row.x.value }}"><span class="glyphicon glyphicon-user"></span> {{row.name.value}}</a><br /> - {% if row.imgUriUri.value %} - <a href="{{ row.imgUriUri.value }}"><img class="col-md-10 thumbnail" data-src="holder.js/300x200" src="{{row.depictionImage.value}}" alt=""></a> - {% endif %} - </li> - - {% endfor %} + {% for row in models.main %} + <li><a href="{{ row.uri.value }}"><span class="glyphicon glyphicon-user"></span> {{row.label.value}}</a></li> + {% endfor %} {% endif %} </ul> - </div> + + {% if lodspk.query %} + <p><span class="glyphicon glyphicon-arrow-left"></span> <a href="{{lodspk.this.local}}">Tilbake til personlisten</a></p> + {% endif %} - - <div class="row"> - <div class="col-md-9 col-lg-9 col-md-offset-3 col-lg-offset-3"> + {% if !lodspk.query && first.count.total.value > 100 %} + <div> <script> if ("{{lodspk.args.arg0}}".length < 1) {page = 0;} @@ -55,23 +59,26 @@ var offset = 100; var nextPage = page+offset; - var prevPage = page - offset; + var prevPage = page-offset; var next_uri = '{{lodspk.home}}persons/'+ nextPage; var prev_uri = '{{lodspk.home}}persons/'+ prevPage; - </script> - <ul class="pager"> - <li><a href="" id="prev">Forrige 100</a></li> - <li><a href="" id="next">Neste 100</a></li> - </ul> - <script> - $("#next").attr("href",next_uri); - $("#prev").attr("href",prev_uri); - </script> - - - </div> - </div> <!-- End Row --> - + document.write('<ul class="pager">'); + if (prevPage == 0){ + document.write('<li><a href="http://marcus.uib.no/instance/collection/{{lodspk.args.arg0}}" id="prev">Forrige 100</a></li>'); + } + else if ("{{lodspk.args.arg1}}".length > 1 && !("{{lodspk.args.arg1}}".length === 0)){ + document.write('<li><a href="" id="prev">Forrige 100</a></li>'); + $("#prev").attr("href",prev_uri); + }; + + if ({{first.count.total.value}} > nextPage){ + document.write('<li><a href="" id="next">Neste 100</a></li>'); + $("#next").attr("href",next_uri); + }; + document.write('</ul>'); + </script> + </div> + {% endif %} </div></div></div> diff --git a/components/services/persons/queries/count.query b/components/services/persons/queries/count.query new file mode 100644 index 0000000000000000000000000000000000000000..12d5f31230c4753d7f16f481fb987bb7301dbabf --- /dev/null +++ b/components/services/persons/queries/count.query @@ -0,0 +1,3 @@ +SELECT (COUNT(?uri) AS ?total) WHERE { + ?uri a foaf:Person . +} diff --git a/components/services/persons/queries/main.query b/components/services/persons/queries/main.query index 4997878895a3729dd6325809ec295f9f27709e3d..18ced80f50eb1e00f17329393b6c71e80aeb1d0a 100755 --- a/components/services/persons/queries/main.query +++ b/components/services/persons/queries/main.query @@ -1,5 +1,8 @@ -SELECT ?x ?name WHERE { -?x a foaf:Person ; foaf:name ?name . } -GROUP BY ?x ?name - ORDER BY ?name +SELECT DISTINCT ?uri ?label WHERE { + ?uri a foaf:Person . + OPTIONAL { ?uri foaf:name ?label .} + OPTIONAL { ?uri ubbont:invertedName ?label . } +} +GROUP BY ?uri ?label +ORDER BY ?label OFFSET {{lodspk.args.arg0|default:0}} LIMIT 100 diff --git a/components/services/persons/queries/search.query b/components/services/persons/queries/search.query index 39e686bba4a471cf2ce033527af0ee3a814e6d41..2a98414394c980b471a1681a030a66ba4390b0a5 100755 --- a/components/services/persons/queries/search.query +++ b/components/services/persons/queries/search.query @@ -1,21 +1,24 @@ -SELECT DISTINCT ?x ?name WHERE { +SELECT DISTINCT ?uri ?label WHERE { {% if lodspk.query %} -{ ?x text:query ( foaf:name '{{lodspk.query}}'); -a foaf:Person ; -foaf:name ?name . +{ ?uri text:query ( foaf:name '{{lodspk.query}}'); +a foaf:Person . +OPTIONAL { ?uri foaf:name ?label . } +OPTIONAL { ?uri ubbont:invertedName ?label . } } UNION { -?x text:query ( foaf:firstName '{{lodspk.query}}'); -a foaf:Person ; -foaf:name ?name . +?uri text:query ( foaf:firstName '{{lodspk.query}}'); +a foaf:Person . +OPTIONAL { ?uri foaf:name ?label . } +OPTIONAL { ?uri ubbont:invertedName ?label . } } UNION { -?x text:query ( foaf:familyName '{{lodspk.query}}'); -a foaf:Person ; -foaf:name ?name . +?uri text:query ( foaf:familyName '{{lodspk.query}}'); +a foaf:Person . +OPTIONAL { ?uri foaf:name ?label . } +OPTIONAL { ?uri ubbont:invertedName ?label . } } {% endif %} } diff --git a/components/services/persons/queries/test.txt b/components/services/persons/queries/test.txt deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/components/services/search/html.template b/components/services/search/html.template index 88eb1bc1b4f725363fce7aeb4260ba9f50124ec7..ab073290c857dd2a177c8975301981e14e3b3e12 100755 --- a/components/services/search/html.template +++ b/components/services/search/html.template @@ -19,12 +19,16 @@ </div> <div class="col-md-9"> - <h1>Treff pÃ¥ "{{lodspk.args.arg0}}"</h1> + <h1><span class="text-muted">Du søkte pÃ¥</span> "{{lodspk.args.arg0}}"</h1> + {% if models.main|length != 0 %} <ul class="nav"> - {% for row in models.main %} - <li><a href="{{ row.resource.value }}">{{row.label.curie}}</a></li> - {% endfor %} - </ul> + {% for row in models.main %} + <li><a href="{{ row.resource.value }}">{{row.label.curie}} <span class="label label-primary">{{row.classLabel.value}}</span></a></li> + {% endfor %} + {% else %} + <h2>Ingen treff</h2> + {% endif %} + </ul> </div> </div></div> diff --git a/components/services/search/queries/main.query b/components/services/search/queries/main.query index 85b6b2988b52e9dfc2b192e61d27970641cfd3b1..01ac78fcb3a82f0f45223089af1c30c2911773ba 100755 --- a/components/services/search/queries/main.query +++ b/components/services/search/queries/main.query @@ -1,7 +1,12 @@ -SELECT DISTINCT ?resource ?label WHERE { +SELECT DISTINCT ?resource ?label ?classLabel WHERE { ?resource text:query ('{{lodspk.args.arg0}}') . - - ?resource skos:prefLabel ?label . + OPTIONAL { ?resource skos:prefLabel ?label . } + OPTIONAL { ?resource foaf:name ?label . } + OPTIONAL { ?resource ubbont:invertedName ?label . } + OPTIONAL { ?resource rdfs:label ?label . } + ?resource rdf:type ?class . + ?class rdfs:label ?classLabel . + FILTER(langMatches(lang(?classLabel), "")) } diff --git a/components/services/timeline/html.template b/components/services/timeline/html.template new file mode 100644 index 0000000000000000000000000000000000000000..ee6ef0b216c693edc6c6ae55769993f7f7ac9ddd --- /dev/null +++ b/components/services/timeline/html.template @@ -0,0 +1,37 @@ +{%include "../../includes/header.inc"%} + <div class="container main-body"> + + <div class="row"> + + + <div class="col-md-12"> + <h1>Tidslinje</h1> + <div id="timeline-embed"></div> + <script type="text/javascript"> + + var timeline_config = { + width: '100%', + height: '650', + source: 'timeline.json', + embed_id: 'timeline-embed', //OPTIONAL USE A DIFFERENT DIV ID FOR EMBED + start_at_end: false, //OPTIONAL START AT LATEST DATE + start_at_slide: '1', //OPTIONAL START AT SPECIFIC SLIDE + start_zoom_adjust: '2', //OPTIONAL TWEAK THE DEFAULT ZOOM LEVEL + hash_bookmark: true, //OPTIONAL LOCATION BAR HASHES + debug: true, //OPTIONAL DEBUG TO CONSOLE + maptype: 'sterrain', //OPTIONAL MAP STYLE + lang: 'no', //OPTIONAL LANGUAGE + js: '{{lodspk.home}}js/TimelineJS/compiled/js/timeline-min.js', //OPTIONAL PATH TO JS + css: '{{lodspk.home}}js/TimelineJS/compiled/css/timeline.css' //OPTIONAL PATH TO CSS + } + </script> + <script type="text/javascript" src="{{lodspk.home}}js/TimelineJS/compiled/js/storyjs-embed.js"></script> + + </div> + + </div> + </div> + {%include "../../includes/footer.inc"%} + + </body> +</html> diff --git a/components/services/timeline/json.template b/components/services/timeline/json.template new file mode 100644 index 0000000000000000000000000000000000000000..ea9b26b2127a6bbc1c0fb7c5fda15756e3af68b0 --- /dev/null +++ b/components/services/timeline/json.template @@ -0,0 +1,24 @@ +{ + "timeline": + { + "headline":"Diplomsamlingen - tidslinje", + "type":"default", + "text":"<p>Se vÃ¥re diplom pÃ¥ tidslinjen.</p>", + "asset": { + "media":"http://marcus.uib.no/instance/collection/diplomsamlingen" + }, + + "date": [ + {%for row in models.timeline%}{%if !forloop.first && models.timeline|length > 1%},{%endif%} + { + "startDate":"{% if row.year %}{{row.year.value}}{% else %}1654{% endif %}{% if row.month %},{{row.month.value}}{% if row.day %}{% endif %},{{row.day.value}}{% endif %}", + "headline":"{{row.headline.value}}", + "text":"<p>{{row.text.value}}</p><p><a href=\"{{row.media.value}}\">Se mer</a></p>", + "asset": { + "media":"{{row.thumbnail.value}}", + "thumbnail":"{{row.thumbnail.value}}" + } + }{%endfor%} + ] + } +} \ No newline at end of file diff --git a/components/services/timeline/queries/timeline.query b/components/services/timeline/queries/timeline.query new file mode 100644 index 0000000000000000000000000000000000000000..cef0a249e4f1c627173e91c5e2b6c3088c1acabc --- /dev/null +++ b/components/services/timeline/queries/timeline.query @@ -0,0 +1,11 @@ +SELECT DISTINCT ?startDate ?media ?headline ?text ?thumbnail ?year ?month ?day WHERE { +?media dct:isPartOf <{{uri}}> . +?media ubbont:hasPage/ubbont:hasThumbnail ?thumbnail; +dct:created ?startDate ; +rdfs:label ?headline ; +dct:description ?text . +BIND ( year(?startDate) AS ?year ) +BIND ( month(?startDate) AS ?month ) +BIND ( day(?startDate) AS ?day ) +FILTER(regex(str(?thumbnail), "_1_thumb", "i")) +} diff --git a/components/services/topics/html.template b/components/services/topics/html.template index b6073f03bf823c2ed8409303538bdeb5bc104ce2..b4580210a732515298b91b27d9c81f44e834210b 100755 --- a/components/services/topics/html.template +++ b/components/services/topics/html.template @@ -2,22 +2,49 @@ <div class="container main-body"> <div class="row"> <div class="col-md-3"> - <div class="sidebar hidden-xs hidden-sm affix"> - <h4>Bla i:</h4> - <ul class="nav"> - {%include "../../includes/nav.inc"%} - </ul> + <div class="bs-sidebar hidden-xs hidden-sm affix"> + + <form action="{{lodspk.this.local}}" method="POST"> + <div class="input-group"> + <span class="input-group-btn"> + <button class="btn btn-info" type="submit"><span class="glyphicon glyphicon-search"></span></button> + </span> + <input type="text" class="form-control" name="query" placeholder="Søk etter emne"> + </div><!-- /input-group --> + </form> + + <div class="browse-sidebar"> + <h4>Bla i <span class="marcus-logo">Marcus</span></h4> + <ul class="list-unstyled"> + {% include "../../includes/nav.inc" %} + </ul> + </div> + </div> <!-- End Sidebar --> </div> <div class="col-md-9"> - <h1>Emner</h1> - + <h1>Emner {% if lodspk.query %} / <small>"{{lodspk.query}}"</small> {%else%}/ <small>{{first.count.total.value}}</small>{%endif%}</h1> + + + {% if lodspk.query %} + <ul class="agent-list list-unstyled"> + {% for row in models.search %} + <li><a href="{{ row.uri.value }}"><span class="glyphicon glyphicon-user"></span> {{row.label.value}}</a></li> + {% endfor %} + </ul> + {% else %} <ul class="nav nav-stacked"> {% for row in models.main %} <li><a href="{{ row.uri.value }}"><span class="glyphicon glyphicon-tag"></span> {{row.label.value}}</a></li> {% endfor %} </ul> + {% endif %} + + {% if lodspk.query %} + <p><span class="glyphicon glyphicon-arrow-left"></span> <a href="{{lodspk.this.local}}">Tilbake til emnelisten</a></p> + {% endif %} + </div> </div> </div> diff --git a/components/services/topics/queries/count.query b/components/services/topics/queries/count.query new file mode 100644 index 0000000000000000000000000000000000000000..8aa7a749bad88faf538a2a8fe4c212fade15e1c0 --- /dev/null +++ b/components/services/topics/queries/count.query @@ -0,0 +1,3 @@ +SELECT (COUNT(?uri) AS ?total) WHERE { + ?uri a skos:Concept . +} diff --git a/components/services/topics/queries/search.query b/components/services/topics/queries/search.query new file mode 100644 index 0000000000000000000000000000000000000000..acf52174e84685f05a194f7372a035c394d21aff --- /dev/null +++ b/components/services/topics/queries/search.query @@ -0,0 +1,9 @@ +SELECT DISTINCT ?uri ?label WHERE { + +{% if lodspk.query %} +?uri text:query ( skos:prefLabel '{{lodspk.query}}') . +?uri a skos:Concept . +OPTIONAL { ?uri skos:prefLabel ?label . } +{% endif %} +} +LIMIT 100 diff --git a/components/static/css/basic.css b/components/static/css/basic.css index 0823afa94cc8e26c75cf791f71fe4db720fea430..c910acbe8fa3535707fa9a63ae04f99b3928fe13 100755 --- a/components/static/css/basic.css +++ b/components/static/css/basic.css @@ -49,8 +49,14 @@ } } +.bs-sidebar { margin-top: 20px;} +.bs-sidebar h3 {border-bottom: solid 1px #ddd; padding-bottom: 5px; font-size: 1.4em;} +.bs-sidebar p.maker { font-size: 1.3em; font-style: oblique; margin-bottom: 20px; } +.bs-sidebar ul span { color: black !important; padding-left: 2px; margin-right: 3px; } +.bs-sidebar ul.nav li a { padding: 10px 15px 10px 0; } +.marcus-logo { font-family: 'IM Fell Great Primer', serif; text-transform: uppercase; } -#resource-metadata { border-top: 1px solid #eee;} +#resource-metadata { } /* HEADER */ .navbar-brand { font-family: 'IM Fell Great Primer', serif; font-size: 2.6em !important; text-transform: uppercase; color: white !important; } @@ -59,14 +65,16 @@ .beta { color: white !important; padding: 5px 15px 5px 15px; margin-bottom: 0 !important; background-color: #e05435; margin-top: 10px !important; font-style: italic; font-family: georgia, serif;} /* MAP */ -.map-wrap, #map-wrap { width: 100%; margin: 15px 0 15px 0; padding: 10px; background-color: #fffffa; border: 1px solid #ccc; -moz-box-shadow: 0px 0px 10px #bbb; +.map-wrap, #map-wrap { width: 100%; background-color: #fffffa; border: 1px solid #eee; + /*-moz-box-shadow: 0px 0px 10px #bbb; -webkit-box-shadow: 0px 0px 10px #bbb; - box-shadow: 0px 0px 10px #bbb; clear: both;} + box-shadow: 0px 0px 10px #bbb; */ + clear: both;} #map {width: 100%; height: 450px;} .no-map { background-image: url(../img/no-map-bg.png); } /* DISQUS */ -#disqus_thread { margin-top: 50px; padding-top: 20px; border-top: dotted 1px #bbb;} +#disqus_thread { margin-top: 50px; padding-top: 20px; border-top: dotted 1px #bbb; clear: both;} /* CATALOGUE CARD */ @@ -95,6 +103,11 @@ column-count:2; .list-centered { text-align: center; } .list-centered li { margin: 0 10px; } +/* DEPICTED */ +#depicted { margin-bottom: 25px;} +#depicted .depicted { text-align: center; background-color: #eef9ff; padding: 20px 10px 10px 10px; } +#depicted .depicted img { width: 100px; margin-bottom: 10px; } + /* SPO view */ .full-metadata-div { margin: 15px 0 ;} @@ -105,7 +118,7 @@ figure { margin-left: 0; } figcaption { font-size: 1.1em; } .img-border { border: 1px solid #999; } img.img-resource { margin: 10px 0 20px 0; border: #bbb solid 1px; padding: 10px; background-color: #fffffa; border: 1px solid #ccc; -moz-box-shadow: 0px 0px 10px #bbb; -webkit-box-shadow: 0px 0px 10px #bbb; box-shadow: 0px 0px 10px #bbb; } - +.collection-logo { margin-bottom: 30px; } /* iphone */ @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { img.img-resource { max-width: 98%; } @@ -224,7 +237,7 @@ footer { /* DZI */ .dzi-wrap { - margin: 0; padding: 0 !important; + padding: 0 !important; } #dzi1 { height: 800px; @@ -242,6 +255,11 @@ input[id="pagenum"] { display: inline; } +p.beta { + cursor: hand; + cursor: pointer; +} + /* SimpleCart.js styles -------------------------------------------------- */ .item_Quantity {width: 40px;} diff --git a/components/static/index.html b/components/static/index.html index d0d108e01f8bec63468f61de14c6e75b751b8c39..13bdac28165244743f5e528163cc6dc7c79dc599 100755 --- a/components/static/index.html +++ b/components/static/index.html @@ -1,6 +1,7 @@ <!DOCTYPE html> <html lang="no" prefix="og: http://ogp.me/ns#"> <head> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> @@ -52,12 +53,14 @@ <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; padding-right:20px; background-position: right; } +*/ </style> <!-- <link href="{{lodspk.home}}css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css" media="screen" /> --> @@ -102,6 +105,26 @@ </button> <a class="navbar-brand" href="{{lodspk.home}}">{{lodspk.title}}</a> <a class="nav-subtitle hidden-xs hidden-sm" href="{{lodspk.home}}"><small>Spesialsamlingene ved <br>Universitetet i Bergen</small></a> + + <div id="popover-beta-head" style="display: none;"> + <strong>Marcus - Beta</strong> + </div> + <div id="popover-beta-content" style="display: none;"> + <p>Marcus har fÃ¥tt en grundig overhaling og nettsidene kan ha noen feil. Vi jobber daglig med Ã¥ gjøre sidene bedre.</p> + </div> + <p rel="popover" class="navbar-text pull-right hidden-xs hidden-sm beta">Beta</p> + <script> + $('.beta').popover({ + placement : 'bottom', + html : true, + title: function() { + return $("#popover-beta-head").html(); + }, + content: function() { + return $("#popover-beta-content").html(); + } + }); + </script> </div> @@ -109,11 +132,12 @@ <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> + <a id="browse1" class="dropdown-toggle" role="button" data-toggle="dropdown" data-target="#" href="#"> Manuskript- og librarsamlingen <span class="caret"></span></a> <ul class="dropdown-menu list-unstyled" aria-labelledby="browse1" role="meny"> {%include "../includes/nav.inc"%} </ul> </li> + <li><a href="http://marcus.app.uib.no/">Billedsamlingen</a></li> </ul> <form class="navbar-form navbar-right" role="search" action=""> @@ -129,25 +153,7 @@ } </script> - <div id="popover-beta-head" style="display: none;"> - <strong>Marcus - Beta</strong> - </div> - <div id="popover-beta-content" style="display: none;"> - <p>Marcus har fÃ¥tt en grundig overhaling og nettsidene kan ha noen feil. Vi jobber daglig med Ã¥ gjøre sidene bedre.</p> - </div> - <p rel="popover" class="navbar-text pull-right hidden-xs hidden-sm beta">Beta</p> - <script> - $('.beta').popover({ - placement : 'bottom', - html : true, - title: function() { - return $("#popover-beta-head").html(); - }, - content: function() { - return $("#popover-beta-content").html(); - } - }); - </script> + </nav><!--/.nav-collapse --> </header> @@ -270,7 +276,6 @@ <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"%} </ul> </div> diff --git a/components/static/js/TimelineJS b/components/static/js/TimelineJS new file mode 160000 index 0000000000000000000000000000000000000000..974c19d19bad13ba0003a7c9afec477cfea2548d --- /dev/null +++ b/components/static/js/TimelineJS @@ -0,0 +1 @@ +Subproject commit 974c19d19bad13ba0003a7c9afec477cfea2548d diff --git a/components/types/bibo__Document/html.template b/components/types/bibo__Document/html.template index 9ef9830e6b51815a1ccc551dd9be960d8bb4c041..4671ae8b2e9913cd16fb4e5c3db1e14cdcb84ead 100755 --- a/components/types/bibo__Document/html.template +++ b/components/types/bibo__Document/html.template @@ -1,52 +1,141 @@ {% include "../../includes/header.inc" %} - <div class="container main-body"> + <div itemscope itemtype="http://schema.org/CreativeWork" class="container main-body"> - <div class="row"> - - </div> - - <div class="row"> - <div class="col-md-3"> + <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 models.places|length != 0 %} - <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> + + <p> + {% for row in models.main %} + <strong>{{ row.classLabel.value }}</strong> + {% endfor %} + {% if first.maker.maker.value == null %}</p>{% endif %} - <div class="browse-sidebar"> - <h4>Bla i:</h4> - <ul class="nav"> - {% include "../../includes/nav.inc" %} - </ul> - </div> - </div> <!-- End Sidebar --> + {% if first.maker.maker.value != null %} + <small>skapt av</small></p> + <p class="maker"><span class="glyphicon glyphicon-pencil"></span> + {% for row in models.maker %} + <span itemprop="creator" itemscope itemtype="http://schema.org/Person"><a itemprop="url" href="{{ row.maker.value }}">{{ row.makerName.value }}</a></span> {% if !forloop.last %}, {% endif %} + {% endfor %} + </p> + {% endif %} + + {% if first.main.created.value != null || first.main.date.value != null %} + <p><strong><span class="glyphicon glyphicon-calendar"></span> + Dato: <span itemprop="dateCreated">{% if first.main.date.value %}{{ first.main.date.value }} {% endif %}{{ first.main.created.value }}</span> + </strong></p> + <hr> + {% endif %} + + {% for row in models.published %} + <p><small>Publisert i</small><br><a href="{{row.uri.value}}">{{row.label.value}}</a> {% if row.vol %} vol. {{row.vol.value}} {% endif %}{% if row.issue %} nr. {{row.issue.value}} {% endif %} {% if row.pageStart && row.pageEnd %}(s. {{row.pageStart.value}}-{{row.pageEnd.value}}){% endif %}<br>{% if row.issn %}<small>ISSN: {{row.issn.value}}{% endif %}</small></p> + {% endfor %} + + {% for row in models.publisher %} + <p><small>Utgitt av</small><br><a href="{{row.uri.value}}">{{row.label.value}}</a> {% if first.main.isbn %}<br><small>ISBN: {{first.main.isbn.value}}</small>{% endif %}</p> + {% endfor %} + + {% if models.recipient|length != 0 %} + <p><small>Mottaker</small></p> + {% for row in models.recipient %} + <p><a href="{{row.uri.value}}">{{ row.label.value }}</a></p> + {% endfor %} + {% endif %} + + <hr> + + <ul class="nav"> + <li><a href="#imageTab"><span class="glyphicon glyphicon-picture"></span> Bilde</a></li> + {% if first.transcription.html.value != null %} + <li><a href="#transcription"><span class="glyphicon glyphicon-align-left"></span> Transkripsjon</a></li> + {% endif %} + {% if models.subjects|length != 0 %} + <li><a href="#subjects"><span class="glyphicon glyphicon-tags"></span> Emner</a></li> + {% endif %} + {% if models.depicted|length != 0 %} + <li><a href="#depicted"><span class="glyphicon glyphicon-user"></span> Avbildet</a></li> + {% endif %} + {% if models.places|length != 0 %} + <li><a href="#places"><span class="glyphicon glyphicon-map-marker"></span> Steder</a></li> + {% endif %} + <li><span style="padding-right: 4px;" class="glyphicon glyphicon-bullhorn"></span><a style="display: inline-block;" href="#disqus_thread"> Kommentarer</a></li> + </ul> + + <hr> + + <ul class="list-unstyled"> + <li><small>Signatur <!--<a href="#" data-toggle="tooltip" data-placement="top" title="test"><span class="glyphicon glyphicon-question-sign"></span></a>--></small><br> + <span class="glyphicon glyphicon-bookmark"></span> <a href="{{lodspk.local.curie}}">{{ first.main.identifier.value }}</a></li> + + {% if models.pdf|length != 0 %} + {% for row in models.pdf %} + <li><small>Last ned</small><br><span class="glyphicon glyphicon-save"></span> <a href="{{row.uri.value }}">PDF</a></li> + {% endfor %} + {% endif %} + {% if models.transcription|length != 0 %} + <li><small>Last ned</small><br><span class="glyphicon glyphicon-save"></span> <a href="{{first.transcription.xml.value}}">XML</a></li> + {% endif %} + </ul> + + <hr> + + <div class="feedback-error"> + <p><span class="glyphicon glyphicon-exclamation-sign"></span> <a href="mailto:billed@uib.no?subject=Marcus - tilbakemelding pÃ¥ {{first.main.identifier.value}}&body=Tilbakemeldingen gjelder: {{lodspk.local.curie}} (la lenken være med, vi trenger den for Ã¥ svare)">Feil? Gi oss beskjed!</a></p> </div> + <div class="browse-sidebar"> + <h4>Bla i <span class="marcus-logo">Marcus</span></h4> + <ul class="list-unstyled"> + {% include "../../includes/nav.inc" %} + </ul> + </div> + </div> <!-- End Sidebar --> + </div> + <div class="col-md-9"> - {% for row in models.main %} - <h1>{{ row.title.value }} - {{ row.classLabel.value }}</h1> - {% endfor %} - + <div class="col-md-12"> + {% for row in models.main %} + <h1 itemprop="name">{{ row.label.value }}</h1> + {% if row.alternative %} + <h2><small>{{row.alternative.value}}</small></h2> + {% endif %} + {% endfor %} + + {% for row in models.description %} + <p class="lead">{{ row.description.value }}</p> + {% endfor %} + </div> + + {% if models.dzi|length != 0 && models.image|length != 0 %} + <div class="col-md-12"> + <ul id="imageTab" class="nav nav-tabs"> + <li class="active"><a href="#dzi" data-toggle="tab">Zoom</a></li> + <li><a href="#image" data-toggle="tab">Jpeg</a></li> + </ul> + <script> + $('#imageTab .nav-tabs a').click(function (e) { + e.preventDefault(); + $(this).tab('show'); + }); + + // Javascript to enable link to tab + var url = document.location.toString(); + if (url.match('#')) { + $('.nav-tabs a[href=#'+url.split('#')[1]+']').tab('show') ; + } + + // Change hash for page-reload + $('.nav-tabs a').on('shown', function (e) { + window.location.hash = e.target.hash; + }) + </script> + </div> + {% endif %} + + <div class="tab-content col-md-12"> {% if models.dzi|length != 0 %} <!-- Contains the OpenSeadragon viewer --> - <div class="container dzi-wrap"> + <div id="dzi" class="container dzi-wrap active tab-pane"> <div class="dzi-wrap"> <div id="dzi1"></div> <div class="hidden-md hidden-lg hidden-xs hidden-sm" id="dzi2"></div> @@ -60,7 +149,6 @@ </ul> </div> --> </div> - </div> <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> @@ -105,28 +193,30 @@ 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> --> + </div> + {% endif %} - {% 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 %} + {% if models.image|length != 0 %} + <div id="image" class="container {% if models.dzi|length == 0 %} +active{% endif %} tab-pane"> + {% for row in models.image %} + <div class="col-xs-12 col-sm-6 col-md-6 col-lg-4"> + <div class="thumbnail"> + <a href="{{row.imageHigh.value}}"><img src="{{row.imageLow.value}}" alt=""/></a> +<!-- + <div class="caption"> + <h3>{{ row.title.value }}</h3> + </div> +--> + </div> + </div> {% endfor %} - </p> + </div> {% endif %} - - - {% for row in models.description %} - <p class="lead">{{ row.description.value }}</p> - {% endfor %} + </div> <!-- END tab-content --> + + <div class="col-lg-12"> {% for row in models.physicalcondition %} <p>{{ row.physicalCondition.value }}</p> {% endfor %} @@ -138,163 +228,161 @@ {% 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"> + <div id="transcription" class="col-md-12 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.subjects|length != 0 %} + <div id="subjects" class="col-md-12"> + <ul class="subjects-inline-list"> + {% for row in models.subjects %} + <li class="tags"><a href="{{ row.uri.value }}" ><i class="icon-tag"></i> {{ row.label.value }}</a></li> + {% endfor %} + </ul> + </div> + {% endif %} + {% if models.recipient|length != 0 %} - <div class="col-md-4 letter-info"> - <h4><span class="glyphicon glyphicon-envelope"></span> Brev</h4> + <div id="recipient" class="col-md-4 visible-xs"> {% for row in models.sender %} - <p>Fra: <a href="{{row.uri.value}}">{{ row.label.value }}</a></p> + <p>Fra: <span itemprop="creator" itemscope itemtype="http://schema.org/Person"><a itemprop="url" href="{{row.uri.value}}">{{ row.label.value }}</a></span></p> {% endfor %} {% for row in models.recipient %} - <p>Til: <a href="{{row.uri.value}}">{{ row.label.value }}</a></p> + <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> + + {% if first.main.created.value != null || first.main.date.value != null %} + <div class="col-md-4 visible-xs visible-sm"> + <h4><span class="glyphicon glyphicon-calendar"></span> Dato: <span itemprop="dateCreated">{% if first.main.date.value %}{{ first.main.date.value }} {% endif %}{{ first.main.created.value }}</span></h4> </div> {% endif %} - + {% if models.collections|length != 0 %} - <div class="col-md-4"> + <div class="col-md-12"> <h4><span class="glyphicon glyphicon-th"></span> Del av:</h4> - <ul class="list-unstyled"> + <div class="row"> {% for row in models.collections %} - <li><a href="{{ row.collection.value }}">{{row.collectionName.value}}</a></li> + <div class="col-md-6"> + <div class="col-lg-3"> + <a href="{{row.uri.value}}"><img class="img-responsive img-border img-circle" src="{{row.logo.value}}"/></a> + </div> + <div class="col-lg-9"> + <p><strong><a href="{{row.uri.value}}">{{row.label.value}}</a></strong>{% if row.description %}<br> + <small>{{row.description.value|truncatewords:25}} <a href="{{row.uri.value}}">se mer</a></small>{%endif%}</p> + </div> + </div> {% endfor %} - </ul> + </div> </div> {% endif %} - - {% if models.relatedresources|length != 0 %} + +<!-- + {% 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> + <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 %} - - {% if models.depicted %} - <div class="col-md-4" id="depicted"> - <h4>Avbildet:</h4> - <ul class="list-unstyled"> +--> + + {% if models.depicted|length != 0 %} + <div id="depicted" class="col-md-12"> + <h4>Avbildet:</h4> {% for row in models.depicted %} - <li><span class="glyphicon glyphicon-user"></span> <a href="{{ row.depicts.value }}" >{{row.depictsName.value}}</a></li> + <div class="col-md-3 depicted"> + {% if row.img %}<img class="img-border img-circle" src="{{row.img.value}}" />{% endif %} + <p><strong><a href="{{ row.uri.value }}" >{{row.label.value}}</a></strong><br> + {% if row.birthDate.value || row.deathDate.value %} + {% if row.birthDate %}<small>({{ row.birthDate.value }}{% else %}<small>( -{% endif %} + {% if row.deathDate %}- {{ row.deathDate.value }})</small>{% else %}- )</small>{% endif %} + {% else %})</small>{% endif %}</p> + {% if row.bio %}<p>{{row.bio.value}}</p>{% endif %} + </div> {% endfor %} - </ul> - </div> + + </div> {% endif %} - - {% if first.places.place.value != null %} - <div id="places"> - {% if first.places.long.value != null %} - <div id="map-wrap"> + {% if models.places|length != 0 %} + <div id="places" class="col-md-12"> + <div class="map-wrap"> + {% if first.main.hasLong.value == "true" %} <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> + {% endif %} + + {% if first.main.hasLong.value == "false" %} + <div id="no-map"> + <div class="alert alert-warning"> + <p><strong>Oi!</strong> Her har vi ikke plassert stedene pÃ¥ kartet. Vi jobber med saken!</p> + </div> </div> - {% endif %} + {% endif %} + + <ul class="places-inline-list"> + {% for row in models.places %} + <li><a href="{{ row.uri.value }}"><span class="glyphicon glyphicon-map-marker"></span> {{row.label.value}}</a></li> + {% endfor %} + </ul> </div> + </div> {% endif %} - <script> - var map = L.map('map'); - var bounds = [{% for row in models.places %}{% if row.lat.value != null %}[{{ row.lat.value }}, {%endif%}{% if row.long.value != "" %}{{ row.long.value }}]{%if forloop.first && row.lat.value != null%}, {%endif%}{%if !forloop.last && row.lat.value != null%}, {%endif%}{%endif%}{% endfor %}]; - bounds = $.grep(bounds,function(n){ return(n) }); - - if (bounds.length > 1) { map.fitBounds(new L.LatLngBounds(bounds)); } else { map.setView(bounds[0], 11);} - - 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> + var map = L.map('map'); + var bounds = [{% for row in models.places %}{% if row.lat.value != null %}[{{ row.lat.value }}, {%endif%}{% if row.long.value != "" %}{{ row.long.value }}]{%if forloop.first && row.lat.value != null%}, {%endif%}{%if !forloop.last && row.lat.value != null%}, {%endif%}{%endif%}{% endfor %}]; + bounds = $.grep(bounds,function(n){ return(n) }); + if (bounds.length > 1) { map.fitBounds(new L.LatLngBounds(bounds)); } else { map.setView(bounds[0], 11);} + 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.uri.value }}\">{{row.label.value}}</a></b>").openPopup(); + {% endif %}{% endfor %} </script> - <div id="disqus_thread"></div> + <div id="disqus_thread" class="col-md-12"></div> <script type="text/javascript"> /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ - var disqus_shortname = 'ubblod'; // required: replace example with your forum shortname - + var disqus_shortname = 'ubblod'; /* * * 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); })(); + /* * * DON'T EDIT BELOW THIS LINE * * */ + (function () { + var s = document.createElement('script'); s.async = true; + s.type = 'text/javascript'; + s.src = '//' + disqus_shortname + '.disqus.com/count.js'; + (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); + }()); </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"> + <div class="col-lg-12"> + <p>Ved sitering pÃ¥ Wikipedia bruk denne malen:</p> + <pre><ref>{{cite web |url={{lodspk.local.curie}} |title={{first.main.label.value}} |author=Avdeling for spesialsamlinger |accessdate={{lodspk.currentDate}} |publisher=University of Bergen Library}}</ref></pre> + </div> + + <div class="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> @@ -303,21 +391,15 @@ {% 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> + <td><a href='{{row.p.mirroredUri}}'>{{row.p.localname}}</a></td> + <td>{% if row.o.uri == 1 %}<a rel='{{row.p.mirroredUri}}' 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><a rev='{{row.s.value}}' href='{{row.p.mirroredUri}}'>{{row.p.localname}}</a></td> <td>{% if forloop.first %}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{% endif %}</td> </tr> {% endfor %} @@ -327,13 +409,12 @@ </table> </div> </div> - </div> + </div> <!-- END full-metadata-div --> </div> </div> </div> {%include "../../includes/footer.inc"%} </div> - </body> </html> diff --git a/components/types/bibo__Document/queries/collections.query b/components/types/bibo__Document/queries/collections.query index 66d0bdceed499cd86f636a07d0e4101b36fc3643..11599dc24f52c266a32301e99769ab21c18df90f 100755 --- a/components/types/bibo__Document/queries/collections.query +++ b/components/types/bibo__Document/queries/collections.query @@ -1,7 +1,8 @@ -SELECT DISTINCT ?collection ?collectionName WHERE { - <{{ uri }}> dct:isPartOf ?collection . - OPTIONAL { ?collection dct:title ?collectionName . } - OPTIONAL { ?collection rdfs:label ?collectionName .} - -} - +SELECT DISTINCT ?uri ?label ?description ?logo WHERE { + <{{ uri }}> dct:isPartOf ?uri . + ?uri a bibo:Collection . + OPTIONAL { ?uri dct:title ?label . } + OPTIONAL { ?uri rdfs:label ?label .} + OPTIONAL { ?uri dct:description ?description .} + OPTIONAL { ?uri foaf:logo ?logo .} +} \ No newline at end of file diff --git a/components/types/bibo__Document/queries/depicted.query b/components/types/bibo__Document/queries/depicted.query new file mode 100644 index 0000000000000000000000000000000000000000..e32ea956fa95111c92317f9d8890d7f8b6128ce1 --- /dev/null +++ b/components/types/bibo__Document/queries/depicted.query @@ -0,0 +1,9 @@ +SELECT DISTINCT ?uri ?label ?img ?bio ?birthDate ?deathDate WHERE { + <{{ uri }}> foaf:depicts ?uri . + ?uri foaf:name ?label . + OPTIONAL { ?uri foaf:img ?img . } + OPTIONAL { ?uri bio:biography ?bio . } + OPTIONAL { ?uri dbo:birthDate ?birthDate . } + OPTIONAL { ?uri dbo:deathDate ?deathDate . } +} + diff --git a/components/types/bibo__Document/queries/image.query b/components/types/bibo__Document/queries/image.query index 86e86c1d9b3270f82695681a0aa7ef4b43e729ca..342543db1a88a309534250d3ab7b5f825c37a0a2 100755 --- a/components/types/bibo__Document/queries/image.query +++ b/components/types/bibo__Document/queries/image.query @@ -4,14 +4,14 @@ SELECT DISTINCT ?hasPage ?imageLow ?imageHigh WHERE <{{ uri }}> ubbont:hasPage ?hasPage . ?hasPage ubbont:hasRepresentation ?hasRepresentation . ?hasRepresentation ubbont:hasURI ?imageLow . - FILTER(regex(?imageLow, "low", "i")) + FILTER(regex(str(?imageLow), "low", "i")) } } { SELECT DISTINCT ?imageHigh ?hasPage WHERE { <{{ uri }}> ubbont:hasPage ?hasPage . ?hasPage ubbont:hasRepresentation ?hasRepresentation . ?hasRepresentation ubbont:hasURI ?imageHigh . - FILTER(regex(?imageHigh, "high", "i")) + FILTER(regex(str(?imageHigh), "high", "i")) } } } diff --git a/components/types/bibo__Document/queries/main.query b/components/types/bibo__Document/queries/main.query index 834211aa7188c22efd09ec9d4233d10aff5797f3..80545ff00cf3870abfe982d5f61313d7bf663baf 100755 --- a/components/types/bibo__Document/queries/main.query +++ b/components/types/bibo__Document/queries/main.query @@ -1,13 +1,15 @@ -SELECT DISTINCT ?title ?created ?date ?available ?identifier ?classLabel WHERE { +SELECT DISTINCT ?label ?alternative ?created ?date ?available ?identifier ?classLabel ?isbn ?hasLong WHERE { <{{ uri }}> rdf:type ?class . ?class rdfs:label ?classLabel . FILTER(langMatches(lang(?classLabel), "")) - OPTIONAL { <{{ uri }}> rdfs:label ?title . } - OPTIONAL { <{{ uri }}> dct:title ?title . } + OPTIONAL { <{{ uri }}> rdfs:label ?label . } + OPTIONAL { <{{ uri }}> dct:title ?label . } + OPTIONAL { <{{ uri }}> dct:alternative ?alternative . } OPTIONAL { <{{ uri }}> dct:identifier ?identifier . } OPTIONAL { <{{ uri }}> dct:created ?created .} OPTIONAL { <{{ uri }}> dct:date ?date .} OPTIONAL { <{{ uri }}> dct:available ?available .} - + OPTIONAL { <{{ uri }}> bibo:isbn ?isbn . } + BIND ( EXISTS { <{{ uri }}> dct:spatial ?place . ?place geo:long ?long } AS ?hasLong ) } diff --git a/components/types/bibo__Document/queries/maker.query b/components/types/bibo__Document/queries/maker.query index 37bc6c29370027135b11332e88cd8cd3494260a5..143e0f1b7db92789120c034ce4640215bb6bb789 100755 --- a/components/types/bibo__Document/queries/maker.query +++ b/components/types/bibo__Document/queries/maker.query @@ -1,6 +1,7 @@ SELECT DISTINCT ?maker ?makerName WHERE { - OPTIONAL { <{{ uri|deurifier }}> foaf:maker ?maker . ?maker foaf:name ?makerName .} - + <{{ uri|deurifier }}> foaf:maker ?maker . + OPTIONAL { ?maker foaf:name ?makerName . } + OPTIONAL { ?maker ubbont:invertedName ?makerName . } } diff --git a/components/types/bibo__Document/queries/places.query b/components/types/bibo__Document/queries/places.query index 0398c7be8c8eb24a7580cf1f40156860f470ab9f..344b78eb9bd73913ab68ef9afaaca5e0bc87fb35 100755 --- a/components/types/bibo__Document/queries/places.query +++ b/components/types/bibo__Document/queries/places.query @@ -1,7 +1,5 @@ -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 .}} - - +SELECT DISTINCT ?uri ?label ?lat ?long WHERE { + OPTIONAL { <{{ uri|deurifier }}> dct:spatial ?uri . ?uri skos:prefLabel ?label . + OPTIONAL { ?uri geo:lat ?lat ; geo:long ?long .}} } diff --git a/components/types/bibo__Document/queries/published.query b/components/types/bibo__Document/queries/published.query new file mode 100644 index 0000000000000000000000000000000000000000..58b58419f5f76d88326683e0642deaad6d4cefe3 --- /dev/null +++ b/components/types/bibo__Document/queries/published.query @@ -0,0 +1,13 @@ +SELECT DISTINCT ?uri ?label ?issn ?pages ?vol ?issue ?pageStart ?pageEnd WHERE { + <{{ uri }}> dct:isPartOf ?uri . + ?uri a bibo:Journal . + OPTIONAL { ?uri dct:title ?label . } + OPTIONAL { ?uri rdfs:label ?label .} + OPTIONAL { <{{ uri }}> bibo:issn ?issn . } + OPTIONAL { <{{ uri }}> bibo:pages ?pages . } + OPTIONAL { <{{ uri }}> bibo:volume ?vol . } + OPTIONAL { <{{ uri }}> bibo:issue ?issue . } + OPTIONAL { <{{ uri }}> bibo:pageStart ?pageStart . } + OPTIONAL { <{{ uri }}> bibo:pageEnd ?pageEnd . } +} + diff --git a/components/types/bibo__Document/queries/publisher.query b/components/types/bibo__Document/queries/publisher.query new file mode 100644 index 0000000000000000000000000000000000000000..7a4231450818fd48b038309b3157a059633ad550 --- /dev/null +++ b/components/types/bibo__Document/queries/publisher.query @@ -0,0 +1,8 @@ +SELECT DISTINCT ?uri ?label ?description ?logo WHERE { + <{{ uri }}> dct:publisher ?uri . + OPTIONAL { ?uri dct:title ?label . } + OPTIONAL { ?uri rdfs:label ?label .} + OPTIONAL { ?uri dct:description ?description .} + OPTIONAL { ?uri foaf:logo ?logo .} +} + diff --git a/components/types/bibo__Document/queries/subjects.query b/components/types/bibo__Document/queries/subjects.query index 4b25f5b213f06e64abb1e81b3c5ec17664ada0b3..b27db1bf9d395f3c7af681f2051d50fc88ca8be6 100755 --- a/components/types/bibo__Document/queries/subjects.query +++ b/components/types/bibo__Document/queries/subjects.query @@ -1,8 +1,8 @@ -SELECT DISTINCT ?subject ?subjectLabel WHERE { +SELECT DISTINCT ?uri ?label WHERE { - <{{ uri }}> dct:subject ?subject . - ?subject skos:prefLabel ?subjectLabel ; a skos:Concept . - OPTIONAL { ?subject rdfs:label ?subjectLabel ; a skos:Concept .} + <{{ uri }}> dct:subject ?uri . + ?uri skos:prefLabel ?label ; a skos:Concept . + OPTIONAL { ?uri rdfs:label ?label ; a skos:Concept .} } diff --git a/components/types/bibo__Document/queries/transcription.query b/components/types/bibo__Document/queries/transcription.query new file mode 100644 index 0000000000000000000000000000000000000000..28c9363e8174e101add6519ae81ae510a35ae6d2 --- /dev/null +++ b/components/types/bibo__Document/queries/transcription.query @@ -0,0 +1,17 @@ +SELECT DISTINCT ?html ?xml WHERE +{ + { SELECT DISTINCT ?html WHERE { + <{{ uri }}> ubbont:hasTranscription ?transcription . + ?transcription ubbont:hasRepresentation ?hasRepresentation . + ?hasRepresentation ubbont:hasURI ?html . + FILTER(regex(str(?html), "html", "i")) + } +} + { SELECT DISTINCT ?xml WHERE { + <{{ uri }}> ubbont:hasTranscription ?transcription . + ?transcription ubbont:hasRepresentation ?hasRepresentation . + ?hasRepresentation ubbont:hasURI ?xml . + FILTER(regex(str(?xml), "xml", "i")) + } +} +} \ No newline at end of file