|
|
|
@ -459,7 +459,8 @@ function islandora_theme() {
|
|
|
|
|
'variables' => array( |
|
|
|
|
'object' => NULL, |
|
|
|
|
'content' => NULL, |
|
|
|
|
'islandora_content' => NULL), |
|
|
|
|
'islandora_content' => NULL, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
// Render a bunch of objects as either a grid or a list. |
|
|
|
|
'islandora_objects' => array( |
|
|
|
@ -562,6 +563,12 @@ function islandora_theme() {
|
|
|
|
|
'file' => 'includes/solution_packs.inc', |
|
|
|
|
'render element' => 'form', |
|
|
|
|
), |
|
|
|
|
// Overview for manage tab. |
|
|
|
|
'islandora_object_overview' => array( |
|
|
|
|
'file' => 'theme/theme.inc', |
|
|
|
|
'template' => 'theme/islandora-object-overview', |
|
|
|
|
'variables' => array('islandora_object' => NULL), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -919,40 +926,21 @@ function islandora_object_manage_access_callback($perms, $object = NULL) {
|
|
|
|
|
*/ |
|
|
|
|
function islandora_manage_overview_object(AbstractObject $object) { |
|
|
|
|
module_load_include('inc', 'islandora', 'includes/utilities'); |
|
|
|
|
$output = array(); |
|
|
|
|
$output = islandora_create_manage_overview($object); |
|
|
|
|
$hooks = islandora_build_hook_list(ISLANDORA_OVERVIEW_HOOK, $object->models); |
|
|
|
|
foreach ($hooks as $hook) { |
|
|
|
|
$temp = module_invoke_all($hook, $object); |
|
|
|
|
islandora_as_renderable_array($temp); |
|
|
|
|
if (!empty($temp)) { |
|
|
|
|
arsort($temp); |
|
|
|
|
$output = array_merge_recursive($output, $temp); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (empty($output)) { |
|
|
|
|
// Add in the default, if we did not get any results. |
|
|
|
|
$output = islandora_default_islandora_manage_overview_object($object); |
|
|
|
|
} |
|
|
|
|
arsort($output); |
|
|
|
|
drupal_alter($hooks, $object, $output); |
|
|
|
|
islandora_as_renderable_array($output); |
|
|
|
|
return $output; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Renders the default manage object page for the given object. |
|
|
|
|
* |
|
|
|
|
* @param AbstractObject $object |
|
|
|
|
* The object used to render the manage object page. |
|
|
|
|
* |
|
|
|
|
* @return array |
|
|
|
|
* The default rendering of the object manage page, indexed at |
|
|
|
|
* 'Default Edit output'. |
|
|
|
|
*/ |
|
|
|
|
function islandora_default_islandora_manage_overview_object(AbstractObject $object) { |
|
|
|
|
$output = theme('islandora_default_overview', array('islandora_object' => $object)); |
|
|
|
|
return array('Default overview output' => array('#markup' => $output)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Renders the given objects manage page. |
|
|
|
|
* |
|
|
|
@ -1819,7 +1807,6 @@ function islandora_islandora_object_purged($pid) {
|
|
|
|
|
islandora_conditionally_clear_cache(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Implements hook_islandora_datastream_purged(). |
|
|
|
|
*/ |
|
|
|
@ -2170,3 +2157,17 @@ function islandora_islandora_get_breadcrumb_query_predicates(AbstractObject $obj
|
|
|
|
|
'fedora-rels-ext:isMemberOf', |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Provides information for the object manage page. |
|
|
|
|
* |
|
|
|
|
* @param AbstractObject $object |
|
|
|
|
* The object being managed. |
|
|
|
|
* |
|
|
|
|
* @return array |
|
|
|
|
* themed output |
|
|
|
|
*/ |
|
|
|
|
function islandora_create_manage_overview(AbstractObject $object) { |
|
|
|
|
$output = theme('islandora_object_overview', array('islandora_object' => $object)); |
|
|
|
|
return array('cmodels' => $output); |
|
|
|
|
} |
|
|
|
|