diff --git a/components/types/bibo__Document/html.template b/components/types/bibo__Document/html.template index b8873fc228687ed45b6824d255a17d95d804000c..1b24721d02c8b4a9c6f28a303b08af8c80372713 100755 --- a/components/types/bibo__Document/html.template +++ b/components/types/bibo__Document/html.template @@ -201,8 +201,15 @@ <button type="button" class="btn btn-xs btn-link"><i class="fa fa-exclamation-triangle m-button-black"></i> <a href="mailto:mslib@uib.no?subject=Marcus - tilbakemelding på {{first.main.identifier.value}}&body=Tilbakemeldingen gjelder: {{first.main.identifier.value}} ({{lodspk.local.curie}}). La lenken være med, vi trenger den for å svare.">Feil? Gi oss beskjed!</a></button> <!-- ALL DATA --> <button type="button" class="btn btn-xs btn-link all-data" data-toggle="modal" data-target="#full-meta-view"><i class="fa fa-heart m-button-red pulse animated"></i> Vis data</button> + + {% if models.owner|length != 0 %} + <p style="margin-left: 6px;"><small> + <i class="fa fa-archive"></i> Eies av {%for row in models.owner%}{%if !forloop.last%}, {%endif%}<a href="{{row.uri.value}}">{{row.label.value}}</a>{%endfor%}</button> + </small></p> + {%endif%} - </div> + + </div> <div class="col-md-8 col-md-pull-4"> {% for row in models.description %} diff --git a/components/types/bibo__Document/queries/owner.query b/components/types/bibo__Document/queries/owner.query new file mode 100644 index 0000000000000000000000000000000000000000..ed584cc08fd718284f5cb8de55f9cf19951f264e --- /dev/null +++ b/components/types/bibo__Document/queries/owner.query @@ -0,0 +1,12 @@ +SELECT DISTINCT ?uri ?title ?label ?alternative ?available ?identifier ?img WHERE { + <{{ uri }}> bibo:owner ?uri . + OPTIONAL { ?uri dct:title ?title . } + OPTIONAL { ?uri rdfs:label ?label . } + OPTIONAL { ?uri foaf:name ?label . } + OPTIONAL { ?uri skos:prefLabel ?label . } + OPTIONAL { ?uri dct:alternative ?alternative . } + OPTIONAL { ?uri dct:identifier ?identifier . } + OPTIONAL { <{{ uri }}> foaf:logo ?img . } + OPTIONAL { <{{ uri }}> ubbont:hasThumbnail ?img . } +} + diff --git a/components/types/ubbont__Photograph/html.template b/components/types/ubbont__Photograph/html.template index 014753bcadf40f8def5162ab783d594805bb4bb1..061c8c4da6058141c063703069fa8b6bfd569d75 100755 --- a/components/types/ubbont__Photograph/html.template +++ b/components/types/ubbont__Photograph/html.template @@ -233,7 +233,14 @@ </button> <!-- ALL DATA --> - <button type="button" class="btn btn-xs btn-link all-data" data-toggle="modal" data-target="#full-meta-view"><i class="fa fa-heart m-button-red pulse animated"></i> Vis data</button> + <button type="button" class="btn btn-xs btn-link all-data" data-toggle="modal" data-target="#full-meta-view"><i class="fa fa-heart m-button-red pulse animated"></i> Vis data</button> + + {% if models.owner|length != 0 %} + <p style="margin-left: 6px;"><small> + <i class="fa fa-archive"></i> Eies av {%for row in models.owner%}{%if !forloop.last%}, {%endif%}<a href="{{row.uri.value}}">{{row.label.value}}</a>{%endfor%}</button> + </small></p> + {%endif%} + </div> <div class="col-md-8 col-md-pull-4"> diff --git a/components/types/ubbont__Photograph/queries/owner.query b/components/types/ubbont__Photograph/queries/owner.query new file mode 100644 index 0000000000000000000000000000000000000000..ed584cc08fd718284f5cb8de55f9cf19951f264e --- /dev/null +++ b/components/types/ubbont__Photograph/queries/owner.query @@ -0,0 +1,12 @@ +SELECT DISTINCT ?uri ?title ?label ?alternative ?available ?identifier ?img WHERE { + <{{ uri }}> bibo:owner ?uri . + OPTIONAL { ?uri dct:title ?title . } + OPTIONAL { ?uri rdfs:label ?label . } + OPTIONAL { ?uri foaf:name ?label . } + OPTIONAL { ?uri skos:prefLabel ?label . } + OPTIONAL { ?uri dct:alternative ?alternative . } + OPTIONAL { ?uri dct:identifier ?identifier . } + OPTIONAL { <{{ uri }}> foaf:logo ?img . } + OPTIONAL { <{{ uri }}> ubbont:hasThumbnail ?img . } +} +