|
|
@ -93,7 +93,7 @@ function islandora_menu() { |
|
|
|
$items['islandora'] = array( |
|
|
|
$items['islandora'] = array( |
|
|
|
'title' => 'Islandora Repository', |
|
|
|
'title' => 'Islandora Repository', |
|
|
|
'page callback' => 'islandora_view_default_object', |
|
|
|
'page callback' => 'islandora_view_default_object', |
|
|
|
'type' => MENU_NORMAL_ITEM, |
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
'access arguments' => array(FEDORA_VIEW), |
|
|
|
'access arguments' => array(FEDORA_VIEW), |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
@ -117,10 +117,19 @@ function islandora_menu() { |
|
|
|
|
|
|
|
|
|
|
|
$items['islandora/object/%/view'] = array( |
|
|
|
$items['islandora/object/%/view'] = array( |
|
|
|
'title' => 'View', |
|
|
|
'title' => 'View', |
|
|
|
'page callback' => 'islandora_view_object', |
|
|
|
//'page callback' => 'islandora_view_object', |
|
|
|
'page arguments' => array(2), |
|
|
|
'page arguments' => array(2), |
|
|
|
'type' => MENU_DEFAULT_LOCAL_TASK, |
|
|
|
'type' => MENU_DEFAULT_LOCAL_TASK, |
|
|
|
'access arguments' => array(FEDORA_VIEW), |
|
|
|
'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( |
|
|
|
$items['islandora/object/%/edit'] = array( |
|
|
@ -131,6 +140,25 @@ function islandora_menu() { |
|
|
|
'access arguments' => array(FEDORA_MODIFY_STATE), |
|
|
|
'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( |
|
|
|
$items['islandora/object/%/delete'] = array( |
|
|
|
'title' => 'Purge object', |
|
|
|
'title' => 'Purge object', |
|
|
|
'page callback' => 'islandora_purge_object', |
|
|
|
'page callback' => 'islandora_purge_object', |
|
|
@ -185,6 +213,14 @@ function islandora_menu() { |
|
|
|
return $items; |
|
|
|
return $items; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function islandora_admin_paths_alter(&$paths) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$paths['*/edit*'] = TRUE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* determines whether we can see the object or not |
|
|
|
* determines whether we can see the object or not |
|
|
|
* checks PID namespace permissions, and user permissions |
|
|
|
* 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); |
|
|
|
$arr = module_invoke_all('islandora_edit_object', $fedora_object); |
|
|
|
$output = ""; |
|
|
|
$output = ""; |
|
|
|
foreach ($arr as $key => $value) { |
|
|
|
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? |
|
|
|
//we could do another module invoke all here to build the edit tab with a default implemented in this module? |
|
|
|
return $output; |
|
|
|
return $output; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function islandora_edit_properties($object_id){ |
|
|
|
|
|
|
|
return 'edit properties '.$object_id; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* builds a default page for the edit tab |
|
|
|
* builds a default page for the edit tab |
|
|
|
* @param object $fedora_object |
|
|
|
* @param object $fedora_object |
|
|
@ -429,7 +469,7 @@ function islandora_view_object($object_id) { |
|
|
|
//module_invoke_all(islandora_display($arr)), |
|
|
|
//module_invoke_all(islandora_display($arr)), |
|
|
|
$output = ""; |
|
|
|
$output = ""; |
|
|
|
foreach ($arr as $key => $value) { |
|
|
|
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? |
|
|
|
//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 |
|
|
|
return $output; //just an example as we could have more then one array element |
|
|
|