|
|
|
@ -53,14 +53,12 @@ function islandora_preprocess_islandora_default_edit(array &$variables) {
|
|
|
|
|
'class' => 'datastream-size', |
|
|
|
|
'data' => islandora_datastream_get_human_readable_size($ds), |
|
|
|
|
); |
|
|
|
|
if (islandora_datastream_access(ISLANDORA_VIEW_DATASTREAM_HISTORY, $ds)) { |
|
|
|
|
$row[] = array( |
|
|
|
|
'class' => 'datastream-versions', |
|
|
|
|
'data' => theme('islandora_datastream_version_link', array( |
|
|
|
|
'datastream' => $ds, |
|
|
|
|
)), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
$row[] = array( |
|
|
|
|
'class' => 'datastream-download', |
|
|
|
|
'data' => theme('islandora_datastream_download_link', array( |
|
|
|
@ -79,14 +77,12 @@ function islandora_preprocess_islandora_default_edit(array &$variables) {
|
|
|
|
|
'datastream' => $ds, |
|
|
|
|
)), |
|
|
|
|
); |
|
|
|
|
if (islandora_datastream_access(ISLANDORA_REGENERATE_DERIVATIVES, $ds)) { |
|
|
|
|
$row[] = array( |
|
|
|
|
'class' => 'datastream-regenerate', |
|
|
|
|
'data' => theme('islandora_datastream_regenerate_link', array( |
|
|
|
|
'datastream' => $ds, |
|
|
|
|
)), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
$rows[] = $row; |
|
|
|
|
} |
|
|
|
|
$caption = filter_xss($islandora_object->label) . ' - ' . $islandora_object->id; |
|
|
|
@ -444,13 +440,9 @@ function theme_islandora_datastream_version_link(array $vars) {
|
|
|
|
|
*/ |
|
|
|
|
function theme_islandora_datastream_regenerate_link(array $vars) { |
|
|
|
|
$datastream = $vars['datastream']; |
|
|
|
|
$object = $datastream->parent; |
|
|
|
|
$hooks = islandora_invoke_hook_list(ISLANDORA_DERVIATIVE_CREATION_HOOK, $object->models, array($object)); |
|
|
|
|
foreach ($hooks as $hook) { |
|
|
|
|
if (isset($hook['source_dsid']) && isset($object[$hook['source_dsid']]) && $hook['destination_dsid'] == $datastream->id) { |
|
|
|
|
if (islandora_datastream_access(ISLANDORA_REGENERATE_DERIVATIVES, $datastream)) { |
|
|
|
|
return l(t('regenerate'), "islandora/object/{$datastream->parent->id}/datastream/{$datastream->id}/regenerate"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|