|
|
|
@ -79,14 +79,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, |
|
|
|
|
)), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
$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,12 +442,8 @@ 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 ($hook['destination_dsid'] == $datastream->id) { |
|
|
|
|
return l(t('regenerate'), "islandora/object/{$datastream->parent->id}/datastream/{$datastream->id}/regenerate"); |
|
|
|
|
} |
|
|
|
|
if (islandora_datastream_access(ISLANDORA_REGENERATE_DERIVATIVES, $datastream)) { |
|
|
|
|
return l(t('regenerate'), "islandora/object/{$datastream->parent->id}/datastream/{$datastream->id}/regenerate"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|