From b42d9c5920e3cea7ed315b1e1a3be67ea06b3a7d Mon Sep 17 00:00:00 2001 From: Jordan Dukart Date: Tue, 25 Feb 2014 18:14:01 +0000 Subject: [PATCH 01/18] Change the default view to utilize the new metadata framework. --- includes/datastream.version.inc | 2 +- includes/manage_deleted_objects.inc | 8 +++---- theme/islandora-object.tpl.php | 36 ++++++++++++----------------- theme/theme.inc | 7 ++++++ 4 files changed, 27 insertions(+), 26 deletions(-) diff --git a/includes/datastream.version.inc b/includes/datastream.version.inc index 8c02aaad..ecef019d 100644 --- a/includes/datastream.version.inc +++ b/includes/datastream.version.inc @@ -234,7 +234,7 @@ function islandora_revert_datastream_version_form_submit(array $form, array &$fo /** * Gets Audit datastream values from foxml. * - * @param String $pid + * @param string $pid * PID of parent object * * @return array diff --git a/includes/manage_deleted_objects.inc b/includes/manage_deleted_objects.inc index 2708efe3..a6b5e96e 100644 --- a/includes/manage_deleted_objects.inc +++ b/includes/manage_deleted_objects.inc @@ -287,7 +287,7 @@ function islandora_get_contentmodels_with_deleted_members() { /** * Restores deleted object. * - * @param String $pid + * @param string $pid * PID of object to be restored */ function islandora_restore_object_by_pid($pid) { @@ -298,7 +298,7 @@ function islandora_restore_object_by_pid($pid) { /** * Purges deleted object. * - * @param String $pid + * @param string $pid * PID of object to be restored */ function islandora_purge_object_by_pid($pid) { @@ -314,7 +314,7 @@ function islandora_purge_object_by_pid($pid) { * @param int $offset * offset to be added to search * - * @return String + * @return string * Sparql query */ function islandora_get_deleted_query($content_models, $offset = 0) { @@ -332,7 +332,7 @@ function islandora_get_deleted_query($content_models, $offset = 0) { $unions .= "UNION {?subject fm:hasModel ; fm:state fm:Deleted; fm:hasModel ?object; - } + } "; } $optional = "OPTIONAL{?subject fm:label ?label}"; diff --git a/theme/islandora-object.tpl.php b/theme/islandora-object.tpl.php index 6fa306c3..fdd09607 100644 --- a/theme/islandora-object.tpl.php +++ b/theme/islandora-object.tpl.php @@ -60,7 +60,7 @@ ?>

- +
@@ -68,26 +68,10 @@
- +
+ +
+

+
    + +
  • label, "islandora/object/{$collection->id}"); ?>
  • + +
+
+ diff --git a/theme/theme.inc b/theme/theme.inc index b783cfa8..7e54fefd 100644 --- a/theme/theme.inc +++ b/theme/theme.inc @@ -109,6 +109,7 @@ function islandora_preprocess_islandora_default(&$variables) { $islandora_object = $variables['islandora_object']; module_load_include('inc', 'islandora', 'includes/utilities'); module_load_include('inc', 'islandora', 'includes/datastream'); + module_load_include('inc', 'islandora', 'includes/metadata'); $variables['parent_collections'] = islandora_get_parents_from_rels_ext($islandora_object); @@ -140,8 +141,14 @@ function islandora_preprocess_islandora_default(&$variables) { $dc_object = DublinCore::importFromXMLString($islandora_object['DC']->content); $dc_array = $dc_object->asArray(); } + // We should eventually remove the DC object and dc_array code as it only + // exists to not break legacy implementations. $variables['dc_array'] = isset($dc_array) ? $dc_array : array(); $variables['islandora_dublin_core'] = isset($dc_object) ? $dc_object : NULL; + + $variables['parent_collections'] = islandora_get_parents_from_rels_ext($islandora_object); + $variables['metadata'] = islandora_retrieve_metadata_markup($islandora_object, TRUE); + $variables['description'] = islandora_retrieve_description_markup($islandora_object); $variables['islandora_object_label'] = $islandora_object->label; if (isset($islandora_object['TN']) && islandora_datastream_access(ISLANDORA_VIEW_OBJECTS, $islandora_object['TN'])) { $variables['islandora_thumbnail_url'] = url("islandora/object/{$islandora_object->id}/datastream/TN/view"); From f8b63e6110a168c76d0484524533dbffe5b6f28d Mon Sep 17 00:00:00 2001 From: Jordan Dukart Date: Tue, 25 Feb 2014 18:20:19 +0000 Subject: [PATCH 02/18] Re-added a variable already defined. --- theme/theme.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/theme/theme.inc b/theme/theme.inc index 7e54fefd..feac06b2 100644 --- a/theme/theme.inc +++ b/theme/theme.inc @@ -146,7 +146,6 @@ function islandora_preprocess_islandora_default(&$variables) { $variables['dc_array'] = isset($dc_array) ? $dc_array : array(); $variables['islandora_dublin_core'] = isset($dc_object) ? $dc_object : NULL; - $variables['parent_collections'] = islandora_get_parents_from_rels_ext($islandora_object); $variables['metadata'] = islandora_retrieve_metadata_markup($islandora_object, TRUE); $variables['description'] = islandora_retrieve_description_markup($islandora_object); $variables['islandora_object_label'] = $islandora_object->label; From ee89aaaaa3a0ea18668ac4cc84aa9c97ec01ce77 Mon Sep 17 00:00:00 2001 From: Jordan Dukart Date: Tue, 25 Feb 2014 18:23:04 +0000 Subject: [PATCH 03/18] Add a class that may be needed. --- theme/islandora-dublin-core-display.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/islandora-dublin-core-display.tpl.php b/theme/islandora-dublin-core-display.tpl.php index 2c2a02ee..52c80607 100644 --- a/theme/islandora-dublin-core-display.tpl.php +++ b/theme/islandora-dublin-core-display.tpl.php @@ -17,7 +17,7 @@
>
-