Browse Source

updated module files to elimate some strict warnings updated info file to reference css

pull/109/merge
Paul Pound 13 years ago
parent
commit
a364874a78
  1. 6
      islandora-object-edit.tpl.php
  2. 2
      islandora.info
  3. 15
      islandora.module
  4. 2
      islandora_basic_collection/islandora_basic_collection.info
  5. 2
      islandora_basic_collection/islandora_basic_collection.module
  6. 2
      islandora_basic_image/islandora_basic_image.info
  7. 2
      islandora_basic_image/islandora_basic_image.module

6
islandora-object-edit.tpl.php

@ -47,12 +47,12 @@
//dsm($object); //dsm($object);
drupal_set_title($islandora_object->label); drupal_set_title($islandora_object->label);
$islandora_datastreams = $variables['islandora_datastreams'];
print($islandora_object->label . ' ' . $islandora_object->id); print($islandora_object->label . ' ' . $islandora_object->id);
print('this is the edit template'); print('this is the edit template');
print ('<h3>datastreams</h3>'); print ('<h3>datastreams</h3>');
foreach ($islandora_object as $ds) { foreach ($islandora_datastreams as $key => $ds) {
print $ds->label . '<br>'; print $key. '<br />';
//do something //do something
} }
?> ?>

2
islandora.info

@ -3,3 +3,5 @@ description = "View and manage Fedora objects"
package = Islandora package = Islandora
version = 7.x-dev version = 7.x-dev
core = 7.x core = 7.x
stylesheets[all][] = css/islandora.base.css
stylesheets[all][] = css/islandora.theme.css

15
islandora.module

@ -308,7 +308,7 @@ function islandora_islandora_edit_object($fedora_object) {
$supported_models = islandora_get_types(); $supported_models = islandora_get_types();
$output = ""; $output = "";
foreach ($fedora_object->models as $model) { foreach ($fedora_object->models as $model) {
if ($supported_models[$model][ISLANDORA_EDIT_HOOK] == TRUE) {//another module is handling the view if (isset($supported_models[$model][ISLANDORA_EDIT_HOOK]) && $supported_models[$model][ISLANDORA_EDIT_HOOK] == TRUE) {//another module is handling the view
return; return;
} }
} }
@ -387,7 +387,7 @@ function islandora_islandora_view_object($object) {
$supported_models = islandora_get_types(); $supported_models = islandora_get_types();
$output = ""; $output = "";
foreach ($object->models as $model) { foreach ($object->models as $model) {
if ($supported_models[$model][ISLANDORA_VIEW_HOOK] == TRUE) {//another module is handling the view if (isset($supported_models[$model][ISLANDORA_VIEW_HOOK]) && $supported_models[$model][ISLANDORA_VIEW_HOOK] == TRUE) {//another module is handling the view
return; return;
} }
} }
@ -484,5 +484,14 @@ function islandora_preprocess_islandora_default(&$variables) {
} }
function islandora_preprocess_islandora_default_edit(&$variables) { function islandora_preprocess_islandora_default_edit(&$variables) {
//$islandora_object = $variables['islandora_object']; $islandora_object = $variables['islandora_object'];
global $base_url;
$datastreams = array();
foreach ($islandora_object as $ds) {
$datastreams['download_url'] = $base_url . '/islandora/object/' . $islandora_object->id . 'datastream/' . $ds->id .'/download';
$datastreams['view_url'] = $base_url . '/islandora/object/' . $islandora_object->id . 'datastream/' . $ds->id .'/view';
$datastreams['delete_url'] = $base_url . '/islandora/object/' . $islandora_object->id . 'datastream/' . $ds->id .'/delete';
$variables['islandora_datastreams'][$ds->id] = $datastreams;
}
} }

2
islandora_basic_collection/islandora_basic_collection.info

@ -3,3 +3,5 @@ description = "A default Islandora Repository module to handle simple collection
dependencies[] = islandora dependencies[] = islandora
package = Islandora package = Islandora
core = 7.x core = 7.x
stylesheets[all][] = css/islandora_basic_collection.base.css
stylesheets[all][] = css/islandora_basic_collection.theme.css

2
islandora_basic_collection/islandora_basic_collection.module

@ -72,7 +72,7 @@ function islandora_basic_collection_islandora_view_object($object, $user, $page_
$cmodel_list = islandora_basic_collection_islandora_get_types(); $cmodel_list = islandora_basic_collection_islandora_get_types();
$models = $object->models; $models = $object->models;
foreach ($object->models as $model) { foreach ($object->models as $model) {
if ($cmodel_list[$model][ISLANDORA_VIEW_HOOK] == TRUE) { if (isset($cmodel_list[$model][ISLANDORA_VIEW_HOOK]) && $cmodel_list[$model][ISLANDORA_VIEW_HOOK] == TRUE) {
$output = theme('islandora_basic_collection', array('islandora_object' => $object)); $output = theme('islandora_basic_collection', array('islandora_object' => $object));
return array('Basic Collection Output' => $output); return array('Basic Collection Output' => $output);
} }

2
islandora_basic_image/islandora_basic_image.info

@ -3,3 +3,5 @@ description = "A default Islandora Repository module to handle images"
dependencies[] = islandora dependencies[] = islandora
package = Islandora package = Islandora
core = 7.x core = 7.x
stylesheets[all][] = css/islandora_basic_image.base.css
stylesheets[all][] = css/islandora_basic_image.theme.css

2
islandora_basic_image/islandora_basic_image.module

@ -75,7 +75,7 @@ function islandora_basic_image_islandora_view_object($object, $user, $page_numbe
$cmodel_list = islandora_basic_image_islandora_get_types(); $cmodel_list = islandora_basic_image_islandora_get_types();
$models = $object->models; $models = $object->models;
foreach ($object->models as $model) { foreach ($object->models as $model) {
if ($cmodel_list[$model][ISLANDORA_VIEW_HOOK] == TRUE) { if (isset($cmodel_list[$model][ISLANDORA_VIEW_HOOK]) && $cmodel_list[$model][ISLANDORA_VIEW_HOOK] == TRUE) {
$output = theme('islandora_basic_image', array('islandora_object' => $object)); $output = theme('islandora_basic_image', array('islandora_object' => $object));
return array('Basic Image Output' => $output); return array('Basic Image Output' => $output);
} }

Loading…
Cancel
Save