|
|
|
@ -392,31 +392,7 @@ class ObjectHelper {
|
|
|
|
|
return $output; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Gets a list of datastreams from an object using its pid |
|
|
|
|
* |
|
|
|
|
* We make some assumptions here. We have implemented a policy that |
|
|
|
|
* we ingest in our repository will have TN (thumbnail) datastream. Even audio |
|
|
|
|
* will have a picture of a speaker or something. This is not critical |
|
|
|
|
* but makes searches etc. look better if there is a TN stream. |
|
|
|
|
* This diplays all the streams in a collapsed fieldset at the bottom of the object page. |
|
|
|
|
* you can implement a content model if you would like certain streams displayed in certain ways. |
|
|
|
|
* @param $object_pid String |
|
|
|
|
* @return String |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
function get_formatted_datastream_list($object_pid, $contentModels, &$fedoraItem) { |
|
|
|
|
global $fedoraUser, $fedoraPass, $base_url, $user; |
|
|
|
|
module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); |
|
|
|
|
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); |
|
|
|
|
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); |
|
|
|
|
module_load_include('inc', 'fedora_repository', 'ContentModel'); |
|
|
|
|
|
|
|
|
|
$path = drupal_get_path('module', 'fedora_repository'); |
|
|
|
|
$dataStreamBody = ''; |
|
|
|
|
$fedoraItem = new Fedora_Item($object_pid); |
|
|
|
|
|
|
|
|
|
if (user_access(ObjectHelper :: $VIEW_DETAILED_CONTENT_LIST)) { |
|
|
|
|
function getFormattedDatastreamList($object_pid, $contentModels, &$fedoraItem) { |
|
|
|
|
$availableDataStreamsText = 'Detailed List of Content'; |
|
|
|
|
//$metaDataText='Description'; |
|
|
|
|
$mainStreamLabel = NULL; |
|
|
|
@ -464,13 +440,37 @@ class ObjectHelper {
|
|
|
|
|
$dataStreamBody .= drupal_get_form('add_stream_form', $object_pid); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
$fieldset = array( |
|
|
|
|
'#title' => t("!text", array('!text' => $availableDataStreamsText)), |
|
|
|
|
'#collapsible' => TRUE, |
|
|
|
|
'#collapsed' => TRUE, |
|
|
|
|
'#value' => $dataStreamBody |
|
|
|
|
); |
|
|
|
|
$dataStreamBody = '<div class = "fedora_detailed_list">' . theme('fieldset', $fieldset) . '</div>'; |
|
|
|
|
|
|
|
|
|
$dataStreamBody = '<div class = "fedora_detailed_list">' . $dataStreamBody . '</div>'; |
|
|
|
|
return $dataStreamBody; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Gets a list of datastreams from an object using its pid |
|
|
|
|
* |
|
|
|
|
* We make some assumptions here. We have implemented a policy that |
|
|
|
|
* we ingest in our repository will have TN (thumbnail) datastream. Even audio |
|
|
|
|
* will have a picture of a speaker or something. This is not critical |
|
|
|
|
* but makes searches etc. look better if there is a TN stream. |
|
|
|
|
* This diplays all the streams in a collapsed fieldset at the bottom of the object page. |
|
|
|
|
* you can implement a content model if you would like certain streams displayed in certain ways. |
|
|
|
|
* @param $object_pid String |
|
|
|
|
* @return String |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
function get_formatted_datastream_list($object_pid, $contentModels, &$fedoraItem) { |
|
|
|
|
global $fedoraUser, $fedoraPass, $base_url, $user; |
|
|
|
|
module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); |
|
|
|
|
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); |
|
|
|
|
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); |
|
|
|
|
module_load_include('inc', 'fedora_repository', 'ContentModel'); |
|
|
|
|
|
|
|
|
|
$path = drupal_get_path('module', 'fedora_repository'); |
|
|
|
|
$dataStreamBody = ''; |
|
|
|
|
$fedoraItem = new Fedora_Item($object_pid); |
|
|
|
|
|
|
|
|
|
if (user_access(ObjectHelper :: $VIEW_DETAILED_CONTENT_LIST)) { |
|
|
|
|
$dataStreamBody = $this->getFormattedDatastreamList($object_pid, $contentModels, $fedoraItem); |
|
|
|
|
} |
|
|
|
|
$content = ''; |
|
|
|
|
|
|
|
|
|