Browse Source

Fixed formatting

pull/108/merge
rwincewicz 13 years ago
parent
commit
c6e40ce7b8
  1. 36
      islandora.module

36
islandora.module

@ -432,13 +432,13 @@ function islandora_islandora_view_object($object) {
return; return;
} }
} }
} }
/** /**
* Theme registry function * Theme registry function
* @return array * @return array
*/ */
function islandora_theme() { function islandora_theme() {
return array( return array(
'islandora_default' => array( 'islandora_default' => array(
'template' => 'islandora-object', 'template' => 'islandora-object',
@ -449,13 +449,13 @@ function islandora_theme() {
'variables' => array('islandora_object' => NULL), 'variables' => array('islandora_object' => NULL),
), ),
); );
} }
/** /**
* drupal hook_permissions function * drupal hook_permissions function
* @return array * @return array
*/ */
function islandora_permission() { function islandora_permission() {
return array( return array(
FEDORA_VIEW => array( FEDORA_VIEW => array(
'title' => t('View Fedora Repository objects and datastreams'), 'title' => t('View Fedora Repository objects and datastreams'),
@ -482,14 +482,14 @@ function islandora_permission() {
'description' => t('Users with this permission will be allowed to change a Fedora objects state.') 'description' => t('Users with this permission will be allowed to change a Fedora objects state.')
), ),
); );
} }
/** /**
* *
* @param string $object_id * @param string $object_id
* @return type * @return type
*/ */
function islandora_add_datastream($object_id) { function islandora_add_datastream($object_id) {
if (!isset($object_id)) { if (!isset($object_id)) {
drupal_set_message(t('Cannot add datastream to object, object id not set')); drupal_set_message(t('Cannot add datastream to object, object id not set'));
return; return;
@ -502,9 +502,9 @@ function islandora_add_datastream($object_id) {
return; return;
} }
module_invoke_all('islandora_add_datastream', $object); //allow submodules to handle add datastream based on object type module_invoke_all('islandora_add_datastream', $object); //allow submodules to handle add datastream based on object type
} }
function islandora_preprocess_islandora_default(&$variables) { function islandora_preprocess_islandora_default(&$variables) {
$islandora_object = $variables['islandora_object']; $islandora_object = $variables['islandora_object'];
module_load_include('inc', 'islandora', 'utils/islandora_dublin_core'); module_load_include('inc', 'islandora', 'utils/islandora_dublin_core');
try { try {
@ -520,18 +520,18 @@ function islandora_preprocess_islandora_default(&$variables) {
if (isset($islandora_object['TN'])) { if (isset($islandora_object['TN'])) {
$variables['islandora_thumbnail_url'] = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/TN/view'; $variables['islandora_thumbnail_url'] = $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/TN/view';
} }
} }
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; global $base_url;
$datastreams = array(); $datastreams = array();
foreach ($islandora_object as $ds) { foreach ($islandora_object as $ds) {
$datastreams['download_url'] = $base_url . '/islandora/object/' . $islandora_object->id . 'datastream/' . $ds->id .'/download'; $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['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'; $datastreams['delete_url'] = $base_url . '/islandora/object/' . $islandora_object->id . 'datastream/' . $ds->id . '/delete';
$variables['islandora_datastreams'][$ds->id] = $datastreams; $variables['islandora_datastreams'][$ds->id] = $datastreams;
} }
} }
} }
Loading…
Cancel
Save