diff --git a/utils/MimeClass.inc b/includes/MimeClass.inc similarity index 100% rename from utils/MimeClass.inc rename to includes/MimeClass.inc diff --git a/utils/datastream.inc b/includes/datastream.inc similarity index 100% rename from utils/datastream.inc rename to includes/datastream.inc diff --git a/utils/islandora_dublin_core.inc b/includes/islandora_dublin_core.inc similarity index 100% rename from utils/islandora_dublin_core.inc rename to includes/islandora_dublin_core.inc diff --git a/islandora.module b/islandora.module index a77dda8b..e40a98df 100644 --- a/islandora.module +++ b/islandora.module @@ -124,7 +124,7 @@ function islandora_menu() { ); $items['islandora/object/%/edit'] = array( - 'title' => 'Edit', + 'title' => 'Manage', 'page callback' => 'islandora_edit_object', 'page arguments' => array(2), 'type' => MENU_LOCAL_TASK, @@ -144,7 +144,7 @@ function islandora_menu() { 'page callback' => 'islandora_datastream_as_attachment', 'page arguments' => array(2, 4), 'type' => MENU_CALLBACK, - 'file' => 'utils/datastream.inc', + 'file' => 'includes/datastream.inc', 'access arguments' => array(FEDORA_VIEW), ); @@ -153,7 +153,7 @@ function islandora_menu() { 'page callback' => 'islandora_datastream_as_attachment', 'page arguments' => array(2, 4), 'type' => MENU_CALLBACK, - 'file' => 'utils/datastream.inc', + 'file' => 'includes/datastream.inc', 'access arguments' => array(FEDORA_VIEW), ); @@ -162,7 +162,7 @@ function islandora_menu() { 'page callback' => 'islandora_datastream_as_attachment', 'page arguments' => array(2, 4), 'type' => MENU_CALLBACK, - 'file' => 'utils/datastream.inc', + 'file' => 'includes/datastream.inc', 'access arguments' => array(FEDORA_VIEW), ); @@ -525,7 +525,7 @@ function islandora_add_datastream($object_id) { function islandora_preprocess_islandora_default(&$variables) { $islandora_object = $variables['islandora_object']; - module_load_include('inc', 'islandora', 'utils/islandora_dublin_core'); + module_load_include('inc', 'islandora', 'includes/islandora_dublin_core'); try { $dc = $islandora_object['DC']->content; //$dc_xml = simplexml_load_string($dc); diff --git a/islandora_basic_collection/islandora_basic_collection.module b/islandora_basic_collection/islandora_basic_collection.module index e329ebaf..768c105b 100644 --- a/islandora_basic_collection/islandora_basic_collection.module +++ b/islandora_basic_collection/islandora_basic_collection.module @@ -88,7 +88,7 @@ function islandora_basic_collection_islandora_view_object($object, $user, $page_ */ function islandora_basic_collection_preprocess_islandora_basic_collection(&$variables) { $islandora_object = $variables['islandora_object']; - module_load_include('inc', 'islandora', 'utils/islandora_dublin_core'); + module_load_include('inc', 'islandora', 'includes/islandora_dublin_core'); try { $dc = $islandora_object['DC']->content; $dc_object = Dublin_Core::import_from_xml_string($dc); diff --git a/islandora_basic_image/css/islandora_basic_image.theme-rtl.css b/islandora_basic_image/css/islandora_basic_image.theme-rtl.css new file mode 100644 index 00000000..0611c541 --- /dev/null +++ b/islandora_basic_image/css/islandora_basic_image.theme-rtl.css @@ -0,0 +1,19 @@ +/* + Document : islandora_basic_collection.theme-rtl + Created on : May 23, 2012, 11:23:56 AM + Description: + Purpose of the stylesheet follows. +*/ + +@media all and (min-width: 768px) { + + body.no-sidebars .islandora-basic-image-content { + float: right; /* LTR */ + padding: 0 0 0 20px; + } + + body.no-sidebars .islandora-basic-image-sidebar { + float: left; /* LTR */ + } + +} diff --git a/islandora_basic_image/css/islandora_basic_image.theme.css b/islandora_basic_image/css/islandora_basic_image.theme.css index 764ed690..d9836fd6 100644 --- a/islandora_basic_image/css/islandora_basic_image.theme.css +++ b/islandora_basic_image/css/islandora_basic_image.theme.css @@ -5,4 +5,101 @@ Purpose of the stylesheet follows. */ +.islandora-basic-image-object img { + height: auto; + max-width: 100%; + *width: 100%; +} +.islandora-basic-image-content, +.islandora-basic-image-sidebar { + display: inline; + position: relative; +} + +.islandora-basic-image-metadata { + clear: both; + padding-top: 1.5em; +} + +dl.islandora-basic-image-fields { + width:100%; + margin: 0 auto; + letter-spacing:-0.31em; + *letter-spacing:normal; + word-spacing:-0.43em; +} + +/* + * The width + left/right padding of DTs/DDs equals 88% when compensating for an image + */ +.islandora-basic-image-metadata dt { + margin-right:-1px; + width:12.5%; + font-weight: bold; + text-align: right; +} + +.islandora-basic-image-metadata dd { + width:77%; +} + +/* + * In this rule, we reset the white-space (see hack above) + */ +.islandora-basic-image-metadata dt, +.islandora-basic-image-metadata dd { + display:inline-block; + *display:inline; + zoom:1; + letter-spacing:normal; + word-spacing:normal; + vertical-align:top; + padding:5px 0 3px 3%; + 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-basic-image-sidebar, +.islandora-basic-image-sidebar, +body.one-sidebar .islandora-basic-image-sidebar, +body.two-sidebars .islandora-basic-image-sidebar { + clear: both; + width: 100%; +} + +.islandora-basic-image-sidebar, +.islandora-basic-image-sidebar, +body.one-sidebar .islandora-basic-image-sidebar, +body.two-sidebars .islandora-basic-image-sidebar { + width: 100%; +} + +@media all and (min-width: 768px) { + + body.no-sidebars .islandora-basic-image-content, + body.no-sidebars .islandora-basic-image-sidebar { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + } + + body.no-sidebars .islandora-basic-image-content { + width: 60%; + padding: 0 20px 0 0; + float: left; /* LTR */ + } + + body.no-sidebars .islandora-basic-image-sidebar { + float: right; /* LTR */ + width: 40%; + clear: none; + } + +} \ No newline at end of file diff --git a/islandora_basic_image/islandora-basic-image.tpl.php b/islandora_basic_image/islandora-basic-image.tpl.php index 03576390..59147518 100644 --- a/islandora_basic_image/islandora-basic-image.tpl.php +++ b/islandora_basic_image/islandora-basic-image.tpl.php @@ -21,23 +21,35 @@ * along with the program. If not, see . */ ?> - + +
+
+ +
+
+

+

+

+
+ - $object = $variables['islandora_object']; - $image_url = $variables['islandora_image_url']; - drupal_set_title($object->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(''); -?> +
diff --git a/islandora_basic_image/islandora_basic_image.module b/islandora_basic_image/islandora_basic_image.module index 0fb48fc5..6dad3c63 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_islandora_view_object($object, $user, $page_numbe foreach ($object->models as $model) { if (isset($cmodel_list[$model][ISLANDORA_VIEW_HOOK]) && $cmodel_list[$model][ISLANDORA_VIEW_HOOK] == TRUE) { $output = theme('islandora_basic_image', array('islandora_object' => $object)); - return array('Basic Image Output' => $output); + return array('' => $output); } } return NULL; @@ -91,7 +91,7 @@ function islandora_basic_image_islandora_view_object($object, $user, $page_numbe */ function islandora_basic_image_preprocess_islandora_basic_image(&$variables) { $islandora_object = $variables['islandora_object']; - module_load_include('inc', 'islandora', 'utils/islandora_dublin_core'); + module_load_include('inc', 'islandora', 'includes/islandora_dublin_core'); try { $dc = $islandora_object['DC']->content; $dc_object = Dublin_Core::import_from_xml_string($dc); @@ -101,15 +101,20 @@ function islandora_basic_image_preprocess_islandora_basic_image(&$variables) { $variables['islandora_dublin_core'] = $dc_object; //create a nicer array for themers //TODO: give this a better home + $dc_array = array(); - foreach ($dc_object as $element) { + foreach ($dc_object as $element) { if (!empty($element)) { - foreach ($element as $key => $value) { - foreach ($value as $v) { - if (!empty($v)) { - $dc_array[] = array($key => $v); + foreach ($element as $field => $value) { + // split value if the result value is an array + if (is_array($value)) { + $value = implode(", ", $value); } - } + $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]['class'] = strtolower( preg_replace('/[^A-Za-z0-9]/', '-', $field)); } } } @@ -124,7 +129,8 @@ function islandora_basic_image_preprocess_islandora_basic_image(&$variables) { $variables['islandora_thumbnail_url'] = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/TN/view'; } if (isset($islandora_object['MEDIUM_SIZE'])) { - $variables['islandora_medium_size_url'] = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/MEDIUM_SIZE/view'; + $medium_size = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/MEDIUM_SIZE/view'; + $variables['islandora_medium_size_url'] = ''; } }