|
|
|
@ -432,13 +432,13 @@ function islandora_islandora_view_object($object) {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* Theme registry function |
|
|
|
|
* @return array |
|
|
|
|
*/ |
|
|
|
|
function islandora_theme() { |
|
|
|
|
function islandora_theme() { |
|
|
|
|
return array( |
|
|
|
|
'islandora_default' => array( |
|
|
|
|
'template' => 'islandora-object', |
|
|
|
@ -449,13 +449,13 @@ function islandora_theme() {
|
|
|
|
|
'variables' => array('islandora_object' => NULL), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* drupal hook_permissions function |
|
|
|
|
* @return array |
|
|
|
|
*/ |
|
|
|
|
function islandora_permission() { |
|
|
|
|
function islandora_permission() { |
|
|
|
|
return array( |
|
|
|
|
FEDORA_VIEW => array( |
|
|
|
|
'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.') |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* |
|
|
|
|
* @param string $object_id |
|
|
|
|
* @return type |
|
|
|
|
*/ |
|
|
|
|
function islandora_add_datastream($object_id) { |
|
|
|
|
function islandora_add_datastream($object_id) { |
|
|
|
|
if (!isset($object_id)) { |
|
|
|
|
drupal_set_message(t('Cannot add datastream to object, object id not set')); |
|
|
|
|
return; |
|
|
|
@ -502,9 +502,9 @@ function islandora_add_datastream($object_id) {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
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']; |
|
|
|
|
module_load_include('inc', 'islandora', 'utils/islandora_dublin_core'); |
|
|
|
|
try { |
|
|
|
@ -520,18 +520,18 @@ function islandora_preprocess_islandora_default(&$variables) {
|
|
|
|
|
if (isset($islandora_object['TN'])) { |
|
|
|
|
$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']; |
|
|
|
|
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'; |
|
|
|
|
$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; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |