diff --git a/acdh_repo_gui.libraries.yml b/acdh_repo_gui.libraries.yml
index dd7345e..55407de 100644
--- a/acdh_repo_gui.libraries.yml
+++ b/acdh_repo_gui.libraries.yml
@@ -6,6 +6,7 @@ repo-styles:
css/dataTables.bootstrap4.min.css: {}
css/font-awesome/css/font-awesome.min.css: {}
css/jqtree/themes/default/style.min.css: {}
+ css/lightbox.css: {}
js:
js/jquery-1.12.3.min.js: {}
js/citation-js-0.5.0.min.js: {}
@@ -16,6 +17,7 @@ repo-styles:
js/dataTables.bootstrap4.min.js: {}
js/datatable_init.js: {}
js/acdh_repo_gui_pager.js: {}
+ js/lightbox.js: {}
dependencies:
- core/drupal
- core/drupal.form
@@ -25,9 +27,11 @@ repo-root-view:
css:
base:
css/acdh_repo_gui.css: {}
+ css/lightbox.css: {}
js:
js/jquery-1.12.3.min.js: {}
js/acdh_repo_gui_pager.js: {}
+ js/lightbox.js: {}
dependencies:
- core/drupal
- core/drupal.form
diff --git a/inst/dbfunctions.sql b/inst/dbfunctions.sql
index b02a6ff..d12a17b 100644
--- a/inst/dbfunctions.sql
+++ b/inst/dbfunctions.sql
@@ -1069,13 +1069,13 @@ CASE
CREATE TEMPORARY TABLE type_data AS (
WITH type_data as (
SELECT
- DISTINCT(fts.id),
+ DISTINCT(cd.acdhid) as id,
cd.headline_title,
cd.headline_desc,
cd.headline_binary
FROM collection_data as cd
- LEFT JOIN full_text_search as fts on cd.acdhid = fts.id
- LEFT JOIN metadata as m on m.mid = fts.mid
+ LEFT JOIN metadata as m on m.id = cd.acdhid
+ LEFT JOIN full_text_search as fts on m.mid = fts.mid
WHERE
(
m.property = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'
diff --git a/src/Object/ResourceObject.php b/src/Object/ResourceObject.php
index 8b58821..d039253 100644
--- a/src/Object/ResourceObject.php
+++ b/src/Object/ResourceObject.php
@@ -297,6 +297,30 @@ public function getTitleImage(string $width = '200px'): string
return '';
}
+ /**
+ * Get the titleimage URL
+ * @param string $width
+ * @return string
+ */
+ public function getTitleImageUrl(string $width = '200px'): string
+ {
+ $img = '';
+ $imgBinary = '';
+ $width = str_replace('px', '', $width);
+ //check the thumbnail service first
+ if ($acdhid = $this->getAcdhID()) {
+ $acdhid = str_replace('http://', '', $acdhid);
+ $acdhid = str_replace('https://', '', $acdhid);
+ if ($file = @fopen($this->thumbUrl.$acdhid, "r")) {
+ $type = fgets($file, 40);
+ if (!empty($type)) {
+ return $this->thumbUrl.$acdhid.'?width='.$width;
+ }
+ }
+ }
+ return '';
+ }
+
/**
* Check if we have a titleimage id or not
* @return bool
diff --git a/templates/acdh-repo-gui-detail-basic.html.twig b/templates/acdh-repo-gui-detail-basic.html.twig
index 2889106..f1eb656 100644
--- a/templates/acdh-repo-gui-detail-basic.html.twig
+++ b/templates/acdh-repo-gui-detail-basic.html.twig
@@ -101,7 +101,8 @@
},
'acdh:hasIdentifier': {
'icon': 'label',
- 'label': 'Identifier(s)'
+ 'label': 'Identifier(s)',
+ 'delimiter': ',
'
},
'acdh:hasRelatedProject': {
'icon': 'track_changes',
@@ -121,14 +122,14 @@
}
}
%}
-
+