diff --git a/islandora_basic_collection/css/islandora_basic_collection.theme.css b/islandora_basic_collection/css/islandora_basic_collection.theme.css index 860fa8c7..780abdce 100644 --- a/islandora_basic_collection/css/islandora_basic_collection.theme.css +++ b/islandora_basic_collection/css/islandora_basic_collection.theme.css @@ -5,5 +5,33 @@ Purpose of the stylesheet follows. */ +/* islandora-basic-collection STYLES*/ +.islandora-basic-collection { + width: 100%; + margin: 0 auto; + overflow: hidden; +} +dl.islandora-basic-collection-object +{ + width: 20%; + min-width: 100px; + text-align: center; + float: left; + margin: 2% 2% 50px 2%; +} + +.islandora-basic-collection-object dt img { + max-width: 100%; + *width: 100%; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +.islandora-basic-collection-object dd +{ + margin: 0; + padding: 0; +} diff --git a/islandora_basic_collection/islandora-basic-collection.tpl.php b/islandora_basic_collection/islandora-basic-collection.tpl.php index 16b252bb..07f2a73d 100644 --- a/islandora_basic_collection/islandora-basic-collection.tpl.php +++ b/islandora_basic_collection/islandora-basic-collection.tpl.php @@ -21,30 +21,12 @@ * along with the program. If not, see . */ ?> -label); - foreach ($variables['islandora_dublin_core'] as $element) { - if (!empty($element)) { - foreach ($element as $key => $value) { - foreach ($value as $v) { - if (!empty($v)) { - print '' . ($key) . ': '; - print($v) . '
'; - } - } - } - } - } - print(''); - print('

Associated Objects

'); - foreach($variables['islandora_associated_objects'] as $associated_objects){ - global $base_url; - $link = l($associated_objects['title']['value'],$base_url.'/islandora/object/'.$associated_objects['object']['value']); - print ($link).'
'; - - } -?> - +label); ?> +
+ $value): ?> +
+
+
+
+ +
diff --git a/islandora_basic_collection/islandora_basic_collection.module b/islandora_basic_collection/islandora_basic_collection.module index 7432e527..85a8b311 100644 --- a/islandora_basic_collection/islandora_basic_collection.module +++ b/islandora_basic_collection/islandora_basic_collection.module @@ -153,7 +153,7 @@ function islandora_basic_collection_islandora_view_object($object, $user, $page_ foreach ($object->models as $model) { if (isset($cmodel_list[$model][ISLANDORA_VIEW_HOOK]) && $cmodel_list[$model][ISLANDORA_VIEW_HOOK] == TRUE) { $output = theme('islandora_basic_collection', array('islandora_object' => $object)); - return array('Basic Collection Output' => $output); + return array('' => $output); } } return NULL; @@ -166,6 +166,10 @@ function islandora_basic_collection_islandora_view_object($object, $user, $page_ * an array of variables that will be passed to the theme function */ function islandora_basic_collection_preprocess_islandora_basic_collection(&$variables) { + // base url + global $base_url; + // base path + global $base_path; $islandora_object = $variables['islandora_object']; module_load_include('inc', 'islandora', 'includes/islandora_dublin_core'); try { @@ -178,16 +182,35 @@ function islandora_basic_collection_preprocess_islandora_basic_collection(&$vari $variables['islandora_dublin_core'] = $dc_object; $variables['islandora_object_label'] = $islandora_object->label; $variables['theme_hook_suggestions'][] = 'islandora_basic_collection__' . str_replace(':', '_', $islandora_object->id); - global $base_url; if (isset($islandora_object['OBJ'])) { - $variables['islandora_image_url'] = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/OBJ/view'; + $full_size_url = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/OBJ/view'; + $variables['islandora_full_img'] = ''; } if (isset($islandora_object['TN'])) { - $variables['islandora_thumbnail_url'] = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/TN/view'; + $thumbnail_size_url = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/TN/view'; + $variables['islandora_thumbnail_img'] = ''; } if (isset($islandora_object['MEDIUM_SIZE'])) { - $variables['islandora_medium_size_url'] = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/MEDIUM_SIZE/view'; + $medium_size_url = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/MEDIUM_SIZE/view'; + $variables['islandora_medium_img'] = ''; } + + $associated_objects_array = array(); + foreach($variables['islandora_associated_objects'] as $key => $value) { + $pid = $variables['islandora_associated_objects'][$key]['object']['value']; + $object_url = 'islandora/object/' . $pid; + $thumbnail_img = ''; + $title = $variables['islandora_associated_objects'][$key]['title']['value']; + $associated_objects_array[$pid]['pid'] = $pid; + $associated_objects_array[$pid]['path'] = $object_url; + $associated_objects_array[$pid]['title'] = $title; + $associated_objects_array[$pid]['class'] = strtolower( preg_replace('/[^A-Za-z0-9]/', '-', $pid)); + $associated_objects_array[$pid]['thumbnail'] = $thumbnail_img; + $associated_objects_array[$pid]['title_link'] = l($title, $object_url, array('html' => TRUE, 'attributes' => array('title' => $title))); + $associated_objects_array[$pid]['thumb_link'] = l($thumbnail_img, $object_url, array('html' => TRUE, 'attributes' => array('title' => $title))); + } + $variables['associated_objects_array'] = $associated_objects_array; + } function islandora_basic_collection_get_objects($object) { diff --git a/islandora_basic_image/islandora-basic-image--islandora-27.tpl.php b/islandora_basic_image/islandora-basic-image--islandora-27.tpl.php index 8b775078..1ea742c9 100644 --- a/islandora_basic_image/islandora-basic-image--islandora-27.tpl.php +++ b/islandora_basic_image/islandora-basic-image--islandora-27.tpl.php @@ -1,7 +1,6 @@ . */ ?> -label); - print ('This template has been overridden by a theme suggestion'); - foreach ($variables['islandora_dublin_core'] as $element) { - if (!empty($element)) { - foreach ($element as $key => $value) { - foreach ($value as $v) { - if (!empty($v)) { - print '' . ($key) . ': '; - print($v) . '
'; - } - } - } - } - } - print(''); -?> + +
+
+ +
+
+

+

+

+
+ +
diff --git a/islandora_basic_image/islandora-basic-image.tpl.php b/islandora_basic_image/islandora-basic-image.tpl.php index 59147518..7736e664 100644 --- a/islandora_basic_image/islandora-basic-image.tpl.php +++ b/islandora_basic_image/islandora-basic-image.tpl.php @@ -1,7 +1,7 @@
- +

@@ -37,19 +37,14 @@
$value): ?> -
+
- - - -
+
- - diff --git a/islandora_basic_image/islandora_basic_image.module b/islandora_basic_image/islandora_basic_image.module index 0e229775..2a15c695 100644 --- a/islandora_basic_image/islandora_basic_image.module +++ b/islandora_basic_image/islandora_basic_image.module @@ -223,7 +223,7 @@ function islandora_basic_image_preprocess_islandora_basic_image(&$variables) { // $dc_label = explode(':', $field); // $element_label = ucfirst($dc_label[1]); // $dc_array[$field]['label'] = $element_label; - // $dc_array[$field]['value'] = strip_tags($value); + // $dc_array[$field]['value'] = strip_tags($value); // $dc_array[$field]['class'] = strtolower( preg_replace('/[^A-Za-z0-9]/', '-', $field)); // } // } @@ -234,14 +234,16 @@ function islandora_basic_image_preprocess_islandora_basic_image(&$variables) { $variables['theme_hook_suggestions'][] = 'islandora_basic_image__' . str_replace(':', '_', $islandora_object->id); global $base_url; if (isset($islandora_object['OBJ'])) { - $variables['islandora_image_url'] = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/OBJ/view'; + $full_size_url = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/OBJ/view'; + $variables['islandora_full_img'] = ''; } if (isset($islandora_object['TN'])) { - $variables['islandora_thumbnail_url'] = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/TN/view'; + $thumbnail_size_url = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/TN/view'; + $variables['islandora_thumbnail_img'] = ''; } if (isset($islandora_object['MEDIUM_SIZE'])) { - $medium_size = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/MEDIUM_SIZE/view'; - $variables['islandora_medium_size_url'] = ''; + $medium_size_url = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/MEDIUM_SIZE/view'; + $variables['islandora_medium_img'] = ''; } }