|
|
|
@ -93,7 +93,7 @@ function islandora_menu() {
|
|
|
|
|
$items['islandora'] = array( |
|
|
|
|
'title' => 'Islandora Repository', |
|
|
|
|
'page callback' => 'islandora_view_default_object', |
|
|
|
|
'type' => MENU_NORMAL_ITEM, |
|
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
|
'access arguments' => array(FEDORA_VIEW), |
|
|
|
|
); |
|
|
|
|
|
|
|
|
@ -117,10 +117,19 @@ function islandora_menu() {
|
|
|
|
|
|
|
|
|
|
$items['islandora/object/%/view'] = array( |
|
|
|
|
'title' => 'View', |
|
|
|
|
'page callback' => 'islandora_view_object', |
|
|
|
|
//'page callback' => 'islandora_view_object', |
|
|
|
|
'page arguments' => array(2), |
|
|
|
|
'type' => MENU_DEFAULT_LOCAL_TASK, |
|
|
|
|
'access arguments' => array(FEDORA_VIEW), |
|
|
|
|
'weight' => -10 |
|
|
|
|
); |
|
|
|
|
$items['islandora/object/%/view/default'] = array( |
|
|
|
|
'title' => 'View', |
|
|
|
|
'page callback' => 'islandora_view_object', |
|
|
|
|
'page arguments' => array(2), |
|
|
|
|
'type' => MENU_LOCAL_TASK, |
|
|
|
|
'access arguments' => array(FEDORA_VIEW), |
|
|
|
|
'weight' => -10, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$items['islandora/object/%/edit'] = array( |
|
|
|
@ -131,6 +140,25 @@ function islandora_menu() {
|
|
|
|
|
'access arguments' => array(FEDORA_MODIFY_STATE), |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$items['islandora/object/%/edit/datastreams'] = array( |
|
|
|
|
'title' => 'Manage Datastreams', |
|
|
|
|
'page callback' => 'islandora_edit_object', |
|
|
|
|
'page arguments' => array(2), |
|
|
|
|
'type' => MENU_LOCAL_TASK, |
|
|
|
|
'access arguments' => array(FEDORA_PURGE), |
|
|
|
|
'weight' => -10, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$items['islandora/object/%/edit/properties'] = array( |
|
|
|
|
'title' => 'Manage Properties', |
|
|
|
|
'page callback' => 'islandora_edit_properties', |
|
|
|
|
'page arguments' => array(2), |
|
|
|
|
'type' => MENU_LOCAL_TASK, |
|
|
|
|
'access arguments' => array(FEDORA_MODIFY_STATE), |
|
|
|
|
'weight' => -5, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$items['islandora/object/%/delete'] = array( |
|
|
|
|
'title' => 'Purge object', |
|
|
|
|
'page callback' => 'islandora_purge_object', |
|
|
|
@ -185,6 +213,14 @@ function islandora_menu() {
|
|
|
|
|
return $items; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function islandora_admin_paths_alter(&$paths) { |
|
|
|
|
|
|
|
|
|
$paths['*/edit*'] = TRUE; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* determines whether we can see the object or not |
|
|
|
|
* checks PID namespace permissions, and user permissions |
|
|
|
@ -301,12 +337,16 @@ function islandora_edit_object($object_id) {
|
|
|
|
|
$arr = module_invoke_all('islandora_edit_object', $fedora_object); |
|
|
|
|
$output = ""; |
|
|
|
|
foreach ($arr as $key => $value) { |
|
|
|
|
$output .= $key . '<br />' . $value; //if we have multiple modules handle one cmodel we need to iterate over multiple |
|
|
|
|
$output .= $value; //if we have multiple modules handle one cmodel we need to iterate over multiple |
|
|
|
|
} |
|
|
|
|
//we could do another module invoke all here to build the edit tab with a default implemented in this module? |
|
|
|
|
return $output; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function islandora_edit_properties($object_id){ |
|
|
|
|
return 'edit properties '.$object_id; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* builds a default page for the edit tab |
|
|
|
|
* @param object $fedora_object |
|
|
|
@ -429,7 +469,7 @@ function islandora_view_object($object_id) {
|
|
|
|
|
//module_invoke_all(islandora_display($arr)), |
|
|
|
|
$output = ""; |
|
|
|
|
foreach ($arr as $key => $value) { |
|
|
|
|
$output .= $key . '<br />' . $value; //if we have multiple modules handle one cmodel we need to iterate over multiple |
|
|
|
|
$output .= $value; //if we have multiple modules handle one cmodel we need to iterate over multiple |
|
|
|
|
} |
|
|
|
|
//we could do another module invoke all here to build the edit tab with a default implemented in this module? |
|
|
|
|
return $output; //just an example as we could have more then one array element |
|
|
|
@ -451,7 +491,7 @@ function islandora_islandora_view_object($object) {
|
|
|
|
|
} |
|
|
|
|
$output = theme('islandora_default', array('islandora_object' => $object)); |
|
|
|
|
return array('Default Output' => $output); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Theme registry function |
|
|
|
@ -550,9 +590,9 @@ function islandora_preprocess_islandora_default_edit(&$variables) {
|
|
|
|
|
$datastreams = array(); |
|
|
|
|
$variables['islandora_editmetadata_url'] = $base_url . '/islandora/edit_form/' . $islandora_object->id; |
|
|
|
|
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'; |
|
|
|
|
$datastreams['label'] = $ds->label; |
|
|
|
|
$variables['islandora_datastreams'][$ds->id] = $datastreams; |
|
|
|
|
} |
|
|
|
|