|
|
@ -35,6 +35,8 @@ define('ISLANDORA_PURGE', 'delete fedora objects and datastreams'); |
|
|
|
define('ISLANDORA_MANAGE_PROPERTIES', 'manage object properties'); |
|
|
|
define('ISLANDORA_MANAGE_PROPERTIES', 'manage object properties'); |
|
|
|
define('ISLANDORA_VIEW_DATASTREAM_HISTORY', 'view old datastream versions'); |
|
|
|
define('ISLANDORA_VIEW_DATASTREAM_HISTORY', 'view old datastream versions'); |
|
|
|
define('ISLANDORA_MANAGE_DELETED_OBJECTS', 'manage deleted objects'); |
|
|
|
define('ISLANDORA_MANAGE_DELETED_OBJECTS', 'manage deleted objects'); |
|
|
|
|
|
|
|
define('ISLANDORA_REVERT_DATASTREAM', 'revert to old datastream'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Hooks. |
|
|
|
// Hooks. |
|
|
|
define('ISLANDORA_VIEW_HOOK', 'islandora_view_object'); |
|
|
|
define('ISLANDORA_VIEW_HOOK', 'islandora_view_object'); |
|
|
@ -278,6 +280,16 @@ function islandora_menu() { |
|
|
|
'access arguments' => array(ISLANDORA_PURGE, 4), |
|
|
|
'access arguments' => array(ISLANDORA_PURGE, 4), |
|
|
|
'load arguments' => array(2), |
|
|
|
'load arguments' => array(2), |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/version/%/revert'] = array( |
|
|
|
|
|
|
|
'title' => 'Revert to datastream version', |
|
|
|
|
|
|
|
'page arguments' => array('islandora_revert_datastream_version_form', 4, 6), |
|
|
|
|
|
|
|
'page callback' => 'drupal_get_form', |
|
|
|
|
|
|
|
'file' => 'includes/datastream.version.inc', |
|
|
|
|
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
|
|
|
|
'access callback' => 'islandora_datastream_access', |
|
|
|
|
|
|
|
'access arguments' => array(ISLANDORA_REVERT_DATASTREAM, 4), |
|
|
|
|
|
|
|
'load arguments' => array(2), |
|
|
|
|
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/version/%/view'] = array( |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/version/%/view'] = array( |
|
|
|
'title' => 'View datastream version', |
|
|
|
'title' => 'View datastream version', |
|
|
|
'page callback' => 'islandora_view_datastream', |
|
|
|
'page callback' => 'islandora_view_datastream', |
|
|
@ -402,6 +414,10 @@ function islandora_theme() { |
|
|
|
'file' => 'theme/theme.inc', |
|
|
|
'file' => 'theme/theme.inc', |
|
|
|
'variables' => array('datastream' => NULL, 'version' => NULL), |
|
|
|
'variables' => array('datastream' => NULL, 'version' => NULL), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
'islandora_datastream_revert_link' => array( |
|
|
|
|
|
|
|
'file' => 'theme/theme.inc', |
|
|
|
|
|
|
|
'variables' => array('datastream' => NULL, 'version' => NULL), |
|
|
|
|
|
|
|
), |
|
|
|
'islandora_datastream_view_link' => array( |
|
|
|
'islandora_datastream_view_link' => array( |
|
|
|
'file' => 'theme/theme.inc', |
|
|
|
'file' => 'theme/theme.inc', |
|
|
|
'variables' => array( |
|
|
|
'variables' => array( |
|
|
@ -454,6 +470,10 @@ function islandora_permission() { |
|
|
|
'title' => t('View datastream history'), |
|
|
|
'title' => t('View datastream history'), |
|
|
|
'description' => t('View all previous versions of a datastream.'), |
|
|
|
'description' => t('View all previous versions of a datastream.'), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
ISLANDORA_REVERT_DATASTREAM => array( |
|
|
|
|
|
|
|
'title' => t('Revert datastream history'), |
|
|
|
|
|
|
|
'description' => t('Revert to a previous version of a datastream.'), |
|
|
|
|
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|