From f418c49b80196f269a852259dcae0411fad4a3b8 Mon Sep 17 00:00:00 2001 From: krisbulman Date: Fri, 25 May 2012 16:20:56 -0300 Subject: [PATCH] deleted unneeded template, added dc_array to islandora module, cleaned up default collection display --- css/islandora.theme.css | 75 +++++++++++++++++++ islandora-object.tpl.php | 67 +++++++++++------ islandora.module | 1 + ...slandora-basic-image--islandora-27.tpl.php | 52 ------------- .../islandora_basic_image.module | 2 +- 5 files changed, 120 insertions(+), 77 deletions(-) delete mode 100644 islandora_basic_image/islandora-basic-image--islandora-27.tpl.php diff --git a/css/islandora.theme.css b/css/islandora.theme.css index 764ed690..e0673b8f 100644 --- a/css/islandora.theme.css +++ b/css/islandora.theme.css @@ -5,4 +5,79 @@ Purpose of the stylesheet follows. */ +/* + * Thumbnails float optionally to the left or right of descriptive lists. + */ +.islandora-object-thumb img { + max-width: 100%; + *width: 100%; + border: 1px solid #ccc; +} + +dl.islandora-object-thumb { + float: left; + width: 15%; + margin: 0.75em auto; +} + +.islandora-object-thumb dt, +.islandora-object-thumb dd { + margin: 0; +} + +/* + * These rules will display DTs/DDs as columns. + * Constructs must follow a key/value pair pattern. + * The three last declarations are meant to kill white space between DTs/DDs + * (result of inline-block styling) + */ +dl.islandora-object-fields { + float: right; + width:83%; + margin: 0.75em auto; + letter-spacing:-0.34em; + *letter-spacing:normal; + word-spacing:-0.44em; + border-top:3px solid #ddd; +} + +/* + * The width + left/right padding of DTs/DDs equals 88% when compensating for an image + */ +.islandora-object-fields dt { + margin-right:-1px; + width:22.5%; + font-weight: bold; +} + +.islandora-object-fields dd { + width:67%; +} + +/* + * In this rule, we reset the white-space (see hack above) + */ +.islandora-object-fields dt, +.islandora-object-fields dd { + display:inline-block; + *display:inline; + zoom:1; + letter-spacing:normal; + word-spacing:normal; + vertical-align:top; + padding:6px 2% 4px; + margin:0; + border-top:1px solid #ddd; + -ms-word-break: break-all; + word-break: break-all; + word-break: break-word; /* webkit */ +-webkit-hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; +} + +.islandora-object-fields dt.first, +.islandora-object-fields dd.first { + border-top: 0; +} \ No newline at end of file diff --git a/islandora-object.tpl.php b/islandora-object.tpl.php index a89a755d..ca7a67ed 100644 --- a/islandora-object.tpl.php +++ b/islandora-object.tpl.php @@ -46,29 +46,48 @@ //dsm($object); drupal_set_title($islandora_object->label); -$dublin_core = $variables['islandora_dublin_core']; -print($islandora_object->label . ' ' . $islandora_object->id); -print ('

datastreams

'); -foreach ($islandora_object as $ds) { - print $ds->label . '
'; - //do something -} -print('

Dublin Core

'); +// $dublin_core = $variables['islandora_dublin_core']; +// print($islandora_object->label . ' ' . $islandora_object->id); +// print ('

datastreams

'); +// foreach ($islandora_object as $ds) { +// print $ds->label . '
'; +// //do something +// } +// print('

Dublin Core

'); -foreach ($dublin_core as $element) { - if (!empty($element)) { - // print($element); - foreach ($element as $key => $value) { - foreach($value as $v){ - if(!empty($v)){ - print ''.($key).': ';print($v).'
'; - } - } - } - } -} -if(isset($variables['islandora_thumbnail_url'])){ - print(''); -} -?> +// foreach ($dublin_core as $element) { +// if (!empty($element)) { +// // print($element); +// foreach ($element as $key => $value) { +// foreach($value as $v){ +// if(!empty($v)){ +// print ''.($key).': ';print($v).'
'; +// } +// } +// } +// } +// } +?> +
+

Details

+
+
+ + '); ?>
+ +
+
+
+ + $value): ?> +
+ +
+
+ +
+ + +
+
diff --git a/islandora.module b/islandora.module index cde267ab..4c82bf0b 100644 --- a/islandora.module +++ b/islandora.module @@ -579,6 +579,7 @@ function islandora_preprocess_islandora_default(&$variables) { } catch (Exception $e) { drupal_set_message(t('Error retrieving object %s %t', array('%s' => $islandora_object->id, '%t' => $e->getMessage())), 'error'); } + $variables['dc_array'] = $dc_object->as_formatted_array(); $variables['islandora_dublin_core'] = $dc_object; $variables['islandora_object_label'] = $islandora_object->label; global $base_url; diff --git a/islandora_basic_image/islandora-basic-image--islandora-27.tpl.php b/islandora_basic_image/islandora-basic-image--islandora-27.tpl.php deleted file mode 100644 index 1ea742c9..00000000 --- a/islandora_basic_image/islandora-basic-image--islandora-27.tpl.php +++ /dev/null @@ -1,52 +0,0 @@ -. - */ -?> - - -
-
- -
-
-

-

-

-
- -
diff --git a/islandora_basic_image/islandora_basic_image.module b/islandora_basic_image/islandora_basic_image.module index 387ecf69..f66f7c78 100644 --- a/islandora_basic_image/islandora_basic_image.module +++ b/islandora_basic_image/islandora_basic_image.module @@ -77,7 +77,7 @@ function islandora_basic_image_menu() { * @param string $object_id * @return string */ -/** +/* function islandora_basic_image_manage_object($object_id){ return 'Image CModel edit function '.$object_id; }*/