Skip to content

Commit 3e710bf

Browse files
authored
Merge pull request #545 from rentonsa/LUC023A-117
Luc023 a 117
2 parents 0056491 + c54b63a commit 3e710bf

File tree

10 files changed

+112
-37
lines changed

10 files changed

+112
-37
lines changed

config/art.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
'Link' => 'dc.identifier.uri',
5555
'Tags' => 'dc.subject.crowdsourced.en',
5656
'ImageUri' => 'dc.identifier.imageUri.en',
57-
'Permalink' => 'dc.contributor.authorpermalink.en'
57+
'Permalink' => 'dc.contributor.authorpermalink.en',
58+
'SketchFabURI' => 'dc.identifier.sketchuri.en'
5859
);
5960

6061
$config['skylight_schema_links'] = array(

config/geddes.php

+22-14
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@
2727
$config['skylight_sitemap_type'] = 'external';
2828

2929
$config['skylight_fields'] = array('Title' => 'dc.title.en',
30-
'Author' => 'dc.creator.en',
30+
'Creator' => 'dc.creator.en',
3131
'Description' => 'dc.description.en',
32-
'Extent' => 'dc.format.extent.en',
33-
'Related Work' => 'dc.relation.en',
32+
'Extent and Media' => 'dc.format.en',
3433
'Places' => 'dc.coverage.spatial.en',
3534
'Identifier' => 'dc.identifier.en',
3635
'Publisher' => 'dc.publisher.en',
@@ -40,16 +39,24 @@
4039
'Rights' => 'dc.rights.en',
4140
'Source' => 'dc.source.en',
4241
'Parent' => 'dc.relation.ispartof.en',
43-
'ImageUri' => 'dc.identifier.imageUri.en'
42+
'ImageUri' => 'dc.identifier.imageUri.en',
43+
'Language' => 'dc.language.en'
4444

4545
);
4646

4747
$config['skylight_schema_links'] = array(
48-
'Title'=>'name'
48+
'Title'=> 'name',
49+
'Creator'=> 'creator',
50+
'Description'=> 'description',
51+
'Date'=>'dateCreated',
52+
'ImageUri'=>'thumbnailUrl',
53+
'Rights'=>'copyrightHolder',
54+
'Subject'=> 'about',
55+
'Places'=> 'locationCreated'
4956
);
5057

5158
$config['skylight_date_filters'] = array();
52-
$config['skylight_filters'] = array('Author' => 'creator_filter', 'Subject' => 'subject_filter', 'Collection' => 'publisher_filter','Date' => 'datetemporal_filter');
59+
$config['skylight_filters'] = array('Author' => 'creator_filter', 'Subject' => 'subject_filter', 'Place'=> 'place_filter', 'Collection' => 'publisher_filter','Date' => 'datetemporal_filter');
5360
$config['skylight_filter_delimiter'] = ':';
5461

5562
$config['skylight_meta_fields'] = array('Title' => 'dc.title.en',
@@ -59,16 +66,17 @@
5966
'Type' => 'dc.type');
6067

6168
$config['skylight_recorddisplay'] = array('Title',
62-
'Author' ,
69+
'Creator' ,
6370
'Description',
64-
'Extent',
65-
'Related Work',
71+
'Identifier',
72+
'Extent and Media',
6673
'Places',
6774
'Publisher',
6875
'Subject',
6976
'Date',
7077
'Rights',
71-
'Source');
78+
'Source',
79+
'Language');
7280

7381
$config['skylight_searchresult_display'] = array('Title',
7482
'Author' , 'Subject',
@@ -81,12 +89,11 @@
8189
'Collection' => 'dc.relation.ispartof.en',
8290
);
8391

84-
$config['skylight_sort_fields'] = array('Author' => 'dc.contributor.authorza_sort ',
85-
'Title' => 'dc.title_sort',
86-
'Date' => 'dc.date.issued_dt'
92+
$config['skylight_sort_fields'] = array(
93+
'Title' => 'dc.title_sort'
8794
);
8895

89-
$config['skylight_related_fields'] = array('Type' => 'dc.type.en', 'Author' => 'dc.creator.en', 'Subject' => 'dc.subject.en', 'Title' => 'dc.title.en', );
96+
$config['skylight_related_fields'] = array('Creator' => 'dc.creator.en', 'Subject' => 'dc.subject.en', 'Title' => 'dc.title.en', );
9097

9198
$config['skylight_feed_fields'] = array('Title' => 'Title',
9299
'Author' => 'Author',
@@ -121,6 +128,7 @@
121128
$config['skylight_homepage_recentitems'] = false;
122129
$config['skylight_homepage_randomitems'] = false;
123130
$config['skylight_homepage_fullwidth'] = true;
131+
$config['skylight_facet_limit'] = 5;
124132

125133

126134
?>

theme-local/art/css/style.css

+1
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ div[id^="openseadragon"] {
662662

663663

664664
.iiiflogo { display: inline-block; width: 50px; height: 50px; background: url(../images/iiiflogo.png) no-repeat 0px 0px;}
665+
/*.iiifdndlogo { display: inline-block; width: 50px; height: 50px; background: url(../images/iiifdnd.jpg) no-repeat 0px 0px;}*/
665666
.lunalogo { display: inline-block; width: 50px; height: 50px; background: url(../images/LUNAIIIF.png) no-repeat 0px 0px;}
666667
.uvlogo { display: inline-block; width: 50px; height: 50px; background: url(../images/uv.png) no-repeat 0px 0px;}
667668
.miradorlogo { display: inline-block; width: 50px; height: 50px; background: url(../images/mirador-logo.png) no-repeat 0px 0px;}

theme-local/geddes/css/style.css

+11-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ input:valid, textarea:valid { } /* Colors for form validity */
9090
input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0 0 5px red; -webkit-box-shadow: 0 0 5px red; box-shadow: 0 0 5px red; }
9191
.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
9292

93-
::-moz-selection { background: #3e541f; color: #fff; text-shadow: none; } /* These selection declarations have to be separate No text-shadow: twitter.com/miketaylr/status/12228805301 Also: hot pink! */
93+
::-moz-selection { background: #3e541f; color: #fff; text-shadow: none;font-weight:normal; } /* These selection declarations have to be separate No text-shadow: twitter.com/miketaylr/status/12228805301 Also: hot pink! */
9494
::selection { background: #3e541f; color: #fff; text-shadow: none; }
9595
a:link { -webkit-tap-highlight-color: #3e541f; } /* j.mp/webkit-tap-highlight-color */
9696

@@ -164,13 +164,21 @@ header .container { padding: 0;}
164164
.content a:visited { color: #3e541f;}
165165
.content a:hover { color: #3a8f44;}
166166

167-
.btn-info { background-color: #3e541f; color: #FFFFFF; letter-spacing: 1px; margin-bottom: 5px;}
167+
/*.content a { color: #3e541f}
168+
.content a:visited { color: #ffffff;}
169+
.content a:hover { color: #ffffff;}*/
170+
171+
.btn-info { background-color: #3e541f; border-color: #3e541f;color: #FFFFFF; margin-bottom: 5px;font-weight: normal;}
168172
.btn-info:hover { background-color: #3a8f44; color: #FFFFFF;}
173+
.btn-primary { background-color: #3e541f; border-color: #3e541f;color: #FFFFFF; margin-bottom: 5px;font-weight: normal;}
174+
.btn-primary:hover { background-color: #3a8f44; color: #FFFFFF;}
169175

170176
.btn-info a { color: #FFFFFF; letter-spacing: 1px;}
171177
.btn-info a:active { color: #FFFFFF; letter-spacing: 1px;}
172178
.btn-info a:visited { color: #FFFFFF; letter-spacing: 1px;}
173179

180+
181+
174182
.item-div { width: 660px; text-align: left; display: block; }
175183
.iteminfo { display: block; min-height:40px; text-align: left; width: 100%; float:left; }
176184
.iteminfo h3 { font-size: 20px; margin-top: 5px; }
@@ -679,3 +687,4 @@ tr:nth-child(odd) { background: #e6e6e6; }
679687
.search-row { background: #f7f7f7 }
680688
.search-row:nth-child(odd) { background: #e6e6e6; }
681689
.search-row .text {padding-left:5px;width:90%; float:left;}
690+
.warning {color:red;}

theme/art/views/record.php

+22-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
$media_uri = $this->config->item("skylight_media_url_prefix");
1212
$image_uri_field = $this->skylight_utilities->getField('ImageUri');
1313
$permalink_field = $this->skylight_utilities->getField('Permalink');
14+
$sketchfab_field = $this->skylight_utilities->getField('SketchFabURI');
1415
$type = 'Unknown';
1516
$mainImage = false;
1617
$mainImageTest = false;
@@ -125,7 +126,8 @@
125126
$jsonLink = '<span class ="json-link-item"><a href="https://librarylabs.ed.ac.uk/iiif/uv/?manifest='.$manifest.'" target="_blank" class="uvlogo" title="View in UV"></a></span>';
126127
$jsonLink .= '<span class ="json-link-item"><a target="_blank" href="https://librarylabs.ed.ac.uk/iiif/mirador/?manifest='.$manifest.'" class="miradorlogo" title="View in Mirador"></a></span>';
127128
$jsonLink .= '<span class ="json-link-item"><a href="https://images.is.ed.ac.uk/luna/servlet/view/search?search=SUBMIT&q='.$accno.'" class="lunalogo" title="View in LUNA"></a></span>';
128-
$jsonLink .= '<span class ="json-link-item"><a href="'.$manifest.'" target="_blank" class="iiiflogo" title="IIIF manifest"></a></span>';
129+
$jsonLink .= '<span class ="json-link-item"><a href="'.$manifest.'" target="_blank" class="iiiflogo" title="View IIIF manifest"></a></span>';
130+
//$jsonLink .= '<span class ="json-link-item"><a href="http://www.example.com/'.$manifest.'" target="_blank" class="iiifdndlogo" title="Drag and drop IIIF manifest"></a></span>'; $jsonLink .= '<span class ="json-link-item"><a href="http://www.example.com/'.$manifest.'" target="_blank" class="iiifdndlogo" title="Drag and drop IIIF manifest"></a></span>';
129131
}
130132

131133
}
@@ -155,8 +157,9 @@
155157
?>
156158
</div>
157159
</div>
160+
<?php
161+
158162

159-
<?php
160163
$numThumbnails = 0;
161164
$imageCounter = 0;
162165
if (isset($solr[$image_uri_field])) {
@@ -543,6 +546,22 @@
543546
<div class="clearfix"></div>
544547
<!-- print out crowdsourced tags -->
545548
<?php
549+
if (isset($solr[$sketchfab_field]))
550+
{
551+
$sketchfab_hash = substr($solr[$sketchfab_field][0],-32);
552+
$sketchfab_embed = "https://sketchfab.com/models/" . $sketchfab_hash. "/embed";
553+
?>
554+
<br>
555+
<div class="sketchfab-embed-wrapper"><iframe width="660" height="480" src="<?php echo $sketchfab_embed?>" frameborder="0" allow="autoplay; fullscreen; vr" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>
556+
557+
<p style="font-size: 13px; font-weight: normal; margin: 5px; color: #4A4A4A;">
558+
<a href="<?php echo $solr[$sketchfab_field][0]?>" target="blank">See <?php echo $record_title?> at Sketchfab</a>
559+
<!--<a href="https://sketchfab.com/openededinburgh?utm_medium=embed&utm_source=website&utm_campaign=share-popup" target="_blank" style="font-weight: bold; color: #1CAAD9;">The University of Edinburgh</a>
560+
<a href="https://sketchfab.com?utm_medium=embed&utm_source=website&utm_campaign=share-popup" target="_blank" style="font-weight: bold; color: #1CAAD9;">Sketchfab</a>-->
561+
</p>
562+
</div>
563+
<?php
564+
}
546565
if(isset($solr[$tags_field])) {?>
547566
<div class="crowd-tags"><span class="crowd-title" title="User generated tags created through crowd sourcing games"><i class="fa fa-users fa-lg" >&nbsp;</i>Tags:</span>
548567
<?php foreach($solr[$tags_field] as $tag) {
@@ -595,6 +614,7 @@
595614
echo '<!--</div>-->
596615
<div class="clearfix"></div>';
597616
}
617+
598618
?>
599619

600620
<input type="button" value="Back to Search Results" class="backbtn" onClick="history.go(-1);">

theme/geddes/views/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!--<div class="col-lg-12 col-md-10 col-sm-12 col-xs-12">-->
22
<div class="col-xl">
3+
<h1 class="warning">THIS SITE IS IN BETA TESTING AND IS NOT YET AN AUTHORITATIVE RESOURCE</h1>
34
<h1 class="itemtitle">An online portal to the Patrick Geddes Archives.</h1>
45
<div id="cf">
56
<img src="https://images.is.ed.ac.uk/luna/servlet/iiif/UoEhal~2~2~99338~100004/1696,226,4475,1959/1074,/0/default.jpg"/>

theme/geddes/views/record.php

+48-14
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
$link_uri_field = $this->skylight_utilities->getField("Link");
1111
$image_uri_field = $this->skylight_utilities->getField("ImageUri");
1212
$id = $this->skylight_utilities->getField("Id");
13+
//Insert Schema.org
14+
$schema = $this->config->item("skylight_schema_links");
15+
1316

1417
$link_uri_prefix = $this->config->item("skylight_link_url");
1518

@@ -20,15 +23,18 @@
2023
?>
2124

2225
<div class="col-md-9 col-sm-9 col-xs-12" xmlns="http://www.w3.org/1999/html">
26+
27+
<div itemscope itemtype ="http://schema.org/CreativeWork">
2328
<div class="row">
2429
<h1 class="itemtitle"><?php echo strip_tags($record_title) ?></h1>
2530
</div>
2631

2732
<div class="row">
28-
<button class="btn btn-info"><a href ="<?php echo $solr[$link_uri_field][0]?>" target="_blank"><b>View item in context</b></a></button>
33+
<div class="btn btn-info"><a href ="<?php echo $solr[$link_uri_field][0]?>" target="_blank">View in context</a></div>
2934
</div>
3035

3136
<div class="row full-metadata">
37+
3238
<table class="table">
3339
<tbody>
3440

@@ -42,39 +48,61 @@
4248

4349
<?php $excludes = array("");
4450
$idset = false;
51+
$nullid = false;
4552
foreach($recorddisplay as $key) {
4653
$element = $this->skylight_utilities->getField($key);
4754

4855
if(isset($solr[$element])) {
49-
if(!in_array($key, $excludes)) {
50-
echo '<tr><th>'.$key.'</th><td>';
51-
foreach($solr[$element] as $index => $metadatavalue) {
56+
if (!in_array($key, $excludes)) {
57+
echo '<tr><th>' . $key . '</th><td>';
58+
foreach ($solr[$element] as $index => $metadatavalue) {
5259
// if it's a facet search
5360
// make it a clickable search link
5461

55-
if(in_array($key, $filters)) {
62+
if (in_array($key, $filters)) {
5663

5764
$orig_filter = urlencode($metadatavalue);
5865

59-
echo '<a href="./search/*:*/' . $key . ':%22'.$orig_filter.'%22">'.$metadatavalue.'</a>';
60-
}
61-
else {
66+
echo '<a href="./search/*:*/' . $key . ':%22' . $orig_filter . '%22">' . $metadatavalue . '</a>';
67+
} else
68+
{/*
6269
if ($key == 'Identifier' || $key == 'Link' || $key == 'Parent') {
6370
if (strpos($metadatavalue, "http:") !== null) {
6471
echo '<a href="'.$metadatavalue.'" target="_blank">'.$metadatavalue.'</a>';
6572
$idset = true;
6673
}
67-
else{
74+
else*/
75+
if ($key == 'Identifier')
76+
{
77+
/* if (ctype_digit($metadatavalue))
78+
{
79+
echo $metadatavalue . " is a number";
80+
}
81+
else
82+
{
83+
echo $metadatavalue . " is not a number";
84+
}*/
85+
86+
$nullid = false;
87+
if ((!ctype_digit($metadatavalue)) and (strpos($metadatavalue, "oai:") !== 0) and (strpos($metadatavalue, "http:") !== 0))
88+
{
6889
echo $metadatavalue;
6990
}
91+
else
92+
{
93+
$nullid = true;
94+
}
7095
}
71-
else{
72-
echo $metadatavalue;
96+
else
97+
{
98+
echo '<span itemprop="'.$schema[$key].'">'. $metadatavalue. "</span>";
7399
}
74100
}
75101

76-
if($index < sizeof($solr[$element]) - 1) {
77-
echo '<br/>';
102+
if ($index < sizeof($solr[$element]) - 1) {
103+
if(!$nullid) {
104+
echo '<br/>';
105+
}
78106
}
79107
}
80108
echo '</td></tr>';
@@ -85,6 +113,7 @@
85113

86114
</tbody>
87115
</table>
116+
88117
</div>
89118

90119
<?php
@@ -178,6 +207,7 @@
178207
// if there are thumbnails
179208
if (isset($solr[$thumbnail_field])) {
180209
foreach ($solr[$thumbnail_field] as $thumbnail) {
210+
181211
$t_segments = explode("##", $thumbnail);
182212
$t_filename = $t_segments[1];
183213
if ($t_filename === $b_filename . ".jpg") {
@@ -239,6 +269,7 @@
239269

240270
if ($mainImage) { ?>
241271
<div class="main-image">
272+
<?php echo '<span itemprop="thumbnailUrl" style="display:none;">'. $image_filename. '</span>';?>
242273
<!--<img src = "<?php //echo $image_filename ;?>"/>-->
243274
<div id="openseadragon"> <!--style = "width:600px; height= 450px;">-->
244275
<script src="<?php echo base_url() ?>assets/openseadragon/openseadragon.min.js"></script>
@@ -260,8 +291,10 @@
260291
}]
261292
});
262293
</script>
294+
263295
</div>
264296
</div>
297+
<br>
265298
<?php
266299
if (!$image_title == '') {
267300
?>
@@ -280,4 +313,5 @@
280313
<div class="row">
281314
<button class="btn btn-info" onClick="history.go(-1);"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>Back to Search Results</button>
282315
</div>
283-
</div>
316+
</div>
317+
</div>

theme/geddes/views/search_facets.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@
7979
<li class="list-group-item">No matches</li>
8080
<?php }
8181
else {
82-
if($numterms == $this->config->item('skylight_results_per_page')) { ?>
82+
if($numterms == $this->config->item('skylight_facet_limit')) { ?>
83+
8384
<li class="list-group-item"><a href="./browse/<?php echo $facet['name']; ?>">More ...</a></li>
8485
<?php }
8586
} ?>

theme/geddes/views/search_results.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
foreach ($doc[$author_field] as $author) {
8686
$orig_filter = urlencode($author);
8787

88-
echo '<a class="agent" href="./search/*:*/Agent:%22'.$orig_filter.'%22">'.$author.'</a>';
88+
// echo '<a class="agent" href="./search/*:*/Agent:%22'.$orig_filter.'%22">'.$author.'</a>';
8989
$num_authors++;
9090
if($num_authors < sizeof($doc[$author_field])) {
9191
echo ' ';
@@ -102,7 +102,7 @@
102102
foreach ($doc[$subject_field] as $subject) {
103103

104104
$orig_filter = urlencode($subject);
105-
echo '<a class="subject" href="./search/*:*/Subject:%22'.$orig_filter.'%22">'.$subject.'</a>';
105+
// echo '<a class="subject" href="./search/*:*/Subject:%22'.$orig_filter.'%22">'.$subject.'</a>';
106106
$num_subject++;
107107
if($num_subject < sizeof($doc[$subject_field])) {
108108
echo ' ';

theme/stcecilia/views/search_facets.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
No matches<br><br>
8181
<?php }
8282
else {
83-
if($numterms == $this->config->item('skylight_results_per_page')) { ?>
83+
if($numterms == $this->config->item('skylight_facet_limit')) { ?>
8484
<a href="./browse/<?php echo $facet['name']; ?>">More ...</a><br><br>
8585
<?php }
8686
} ?>

0 commit comments

Comments
 (0)