|
|
@ -55,14 +55,14 @@ class FedoraObjectDetailedContent { |
|
|
|
if (!isset($profile)) { |
|
|
|
if (!isset($profile)) { |
|
|
|
// default behaviour |
|
|
|
// default behaviour |
|
|
|
watchdog('fedora_repository', "Error while reading the default object details display profile: @e", array("@e" => $e->getMessage()), WATCHDOG_WARNING); |
|
|
|
watchdog('fedora_repository', "Error while reading the default object details display profile: @e", array("@e" => $e->getMessage()), WATCHDOG_WARNING); |
|
|
|
$dc_html = $objectHelper->getFormattedDC($this->item); |
|
|
|
$dc_returned = $objectHelper->getFormattedDC($this->item); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
// invoke the requested display profile |
|
|
|
// invoke the requested display profile |
|
|
|
require_once(drupal_get_path('module', $profile['module']) ."/". $profile['file']); |
|
|
|
require_once(drupal_get_path('module', $profile['module']) ."/". $profile['file']); |
|
|
|
$details_function = $profile['function']; |
|
|
|
$details_function = $profile['function']; |
|
|
|
if (function_exists($details_function)) { |
|
|
|
if (function_exists($details_function)) { |
|
|
|
$dc_html = $details_function($this->item); |
|
|
|
$dc_returned = $details_function($this->item); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
// problem - display profile not found |
|
|
|
// problem - display profile not found |
|
|
@ -70,16 +70,27 @@ class FedoraObjectDetailedContent { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$dc_array = array(); |
|
|
|
$i = 0; |
|
|
|
$i = 0; |
|
|
|
if (fedora_repository_access(OBJECTHELPER :: $VIEW_DETAILED_CONTENT_LIST, $this->pid, $user)) { |
|
|
|
if (is_array($dc_returned)) { |
|
|
|
|
|
|
|
$dc_array = $dc_returned; |
|
|
|
|
|
|
|
$dc_array['#weight'] = $i++; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
$dc_array = array( |
|
|
|
|
|
|
|
'#type' => 'markup', |
|
|
|
|
|
|
|
'#value' => $dc_returned, //XXX: This could easily be done in Drupal, instead of using an XSL |
|
|
|
|
|
|
|
'#weight' => $i++ |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$tabset['fedora_object_details']['tabset']['view'] = array( |
|
|
|
$tabset['fedora_object_details']['tabset']['view'] = array( |
|
|
|
'#type' => 'tabpage', |
|
|
|
'#type' => 'tabpage', |
|
|
|
'#title' => t('View'), |
|
|
|
'#title' => t('View'), |
|
|
|
'dc' => array( |
|
|
|
'dc' => $dc_array, |
|
|
|
'#type' => 'markup', |
|
|
|
); |
|
|
|
'#value' => $dc_html, //XXX: This could easily be done in Drupal, instead of using an XSL |
|
|
|
if (fedora_repository_access(ObjectHelper :: $VIEW_DETAILED_CONTENT_LIST, $this->pid, $user)) { |
|
|
|
'#weight' => $i++ |
|
|
|
$tabset['fedora_object_details']['tabset']['view'] += array( |
|
|
|
), |
|
|
|
|
|
|
|
'list' => array( |
|
|
|
'list' => array( |
|
|
|
'#type' => 'fieldset', |
|
|
|
'#type' => 'fieldset', |
|
|
|
'#title' => t('Detailed List of Content'), |
|
|
|
'#title' => t('Detailed List of Content'), |
|
|
@ -100,6 +111,11 @@ class FedoraObjectDetailedContent { |
|
|
|
'#weight' => $i++, |
|
|
|
'#weight' => $i++, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (fedora_repository_access(ObjectHelper :: $PURGE_FEDORA_OBJECTSANDSTREAMS, $this->pid, $user)) { |
|
|
|
|
|
|
|
$tabset['fedora_object_details']['tabset']['view'] += array( |
|
|
|
'purge' => array( |
|
|
|
'purge' => array( |
|
|
|
'#type' => 'markup', |
|
|
|
'#type' => 'markup', |
|
|
|
'#value' => $purge_form, |
|
|
|
'#value' => $purge_form, |
|
|
|