|
|
@ -751,7 +751,7 @@ function makeObject($pid, $dsID) { |
|
|
|
* if there is no query datastream falls back to the query shipped with the module. |
|
|
|
* if there is no query datastream falls back to the query shipped with the module. |
|
|
|
* @return String |
|
|
|
* @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', 'ObjectHelper'); |
|
|
|
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); |
|
|
|
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); |
|
|
|
global $user; |
|
|
|
global $user; |
|
|
@ -801,24 +801,40 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU |
|
|
|
// $limit=20; |
|
|
|
// $limit=20; |
|
|
|
//} |
|
|
|
//} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module_load_include('inc', 'fedora_repository', 'ContentModel'); |
|
|
|
$breadcrumbs = array(); |
|
|
|
$breadcrumbs = array(); |
|
|
|
$objectHelper->getBreadcrumbs($pid, $breadcrumbs); |
|
|
|
$objectHelper->getBreadcrumbs($pid, $breadcrumbs); |
|
|
|
drupal_set_breadcrumb(array_reverse($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->getRelatedObjects($pid, $limit, $offset, NULL); //updated so we can do paging in query not in xslt |
|
|
|
//$results = $collectionClass->getRelatedItems($pid, NULL); |
|
|
|
//$results = $collectionClass->getRelatedItems($pid, NULL); |
|
|
|
$content_models = $objectHelper->get_content_models_list($pid); |
|
|
|
$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) { |
|
|
|
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 |
|
|
|
//$content .= $objectHelper->parseContent($results, $pid, $dsId, $collection, $pageNumber); |
|
|
|
//$content .= $objectHelper->parseContent($results, $pid, $dsId, $collection, $pageNumber); |
|
|
|
//the below is for islandlives we should be able to do this in the xslt though |
|
|
|
//the below is for islandlives we should be able to do this in the xslt though |
|
|
|
//$css=$path.'/stylesheets/container-large.css'; |
|
|
|
//$css=$path.'/stylesheets/container-large.css'; |
|
|
|
//drupal_add_css($css); |
|
|
|
//drupal_add_css($css); |
|
|
|
return $content . '</div>'; |
|
|
|
return tabs_render($cmodels_tabs) . '</div>'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function fedora_repository_urlencode_string($str) { |
|
|
|
function fedora_repository_urlencode_string($str) { |
|
|
|