|
|
|
@ -751,7 +751,7 @@ function makeObject($pid, $dsID) {
|
|
|
|
|
* if there is no query datastream falls back to the query shipped with the module. |
|
|
|
|
* @return String |
|
|
|
|
*/ |
|
|
|
|
function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NULL, $pageNumber = NULL, $limit = NULL) { |
|
|
|
|
function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NULL, $page_number = NULL, $limit = NULL) { |
|
|
|
|
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); |
|
|
|
|
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); |
|
|
|
|
global $user; |
|
|
|
@ -801,24 +801,40 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
|
|
|
|
|
// $limit=20; |
|
|
|
|
//} |
|
|
|
|
|
|
|
|
|
module_load_include('inc', 'fedora_repository', 'ContentModel'); |
|
|
|
|
$breadcrumbs = array(); |
|
|
|
|
$objectHelper->getBreadcrumbs($pid, $breadcrumbs); |
|
|
|
|
drupal_set_breadcrumb(array_reverse($breadcrumbs)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$offset = $limit * $pageNumber; |
|
|
|
|
$offset = $limit * $page_number; |
|
|
|
|
//$results = $collectionClass->getRelatedObjects($pid, $limit, $offset, NULL); //updated so we can do paging in query not in xslt |
|
|
|
|
//$results = $collectionClass->getRelatedItems($pid, NULL); |
|
|
|
|
$content_models = $objectHelper->get_content_models_list($pid); |
|
|
|
|
// Each content model may return either a tabset array or plain HTML. If it's HTML, stick it in a tab. |
|
|
|
|
$cmodels_tabs = array( |
|
|
|
|
'#type' => 'tabset', |
|
|
|
|
); |
|
|
|
|
foreach ($content_models as $content_model) { |
|
|
|
|
$content .= $objectHelper->createExtraFieldsets($pid, $content_model, $pageNumber); |
|
|
|
|
//$content_model_fieldsets = $objectHelper->createExtraFieldsets($pid, $content_model, $pageNumber); |
|
|
|
|
$content_model_fieldset = $content_model->displayExtraFieldset($pid, $page_number); |
|
|
|
|
if (is_array($content_model_fieldset)) { |
|
|
|
|
$cmodels_tabs = array_merge($cmodels_tabs, $content_model_fieldset); |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
$cmodels_tabs['tabset'][$content_model->pid] = array( |
|
|
|
|
'#type' => 'tabpage', |
|
|
|
|
'#title' => $cmodel->name, |
|
|
|
|
'#content' => $content_model_fieldset, |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//$content .= $objectHelper |
|
|
|
|
//$content .= $objectHelper->parseContent($results, $pid, $dsId, $collection, $pageNumber); |
|
|
|
|
//the below is for islandlives we should be able to do this in the xslt though |
|
|
|
|
//$css=$path.'/stylesheets/container-large.css'; |
|
|
|
|
//drupal_add_css($css); |
|
|
|
|
return $content . '</div>'; |
|
|
|
|
return tabs_render($cmodels_tabs) . '</div>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function fedora_repository_urlencode_string($str) { |
|
|
|
|