Browse Source

ISLANDORA-171 Pop out tabs in Collection Class

pull/105/head
Alexander O'Neill 14 years ago
parent
commit
cf6ea2455f
  1. 18
      CollectionClass.inc
  2. 4
      fedora_repository.module

18
CollectionClass.inc

@ -417,9 +417,7 @@ class CollectionClass {
$tabset = array(); $tabset = array();
$tabset['my_tabset'] = array(
'#type' => 'tabset',
);
global $user; global $user;
$objectHelper = new ObjectHelper(); $objectHelper = new ObjectHelper();
@ -431,13 +429,13 @@ class CollectionClass {
$show_ingest_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'fedora_repository_ingest_form'); $show_ingest_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'fedora_repository_ingest_form');
$add_to_collection = $this->getIngestInterface(); $add_to_collection = $this->getIngestInterface();
$tabset['my_tabset']['view_tab'] = array( $tabset['view_tab'] = array(
// $collection_fieldset = array ( // $collection_fieldset = array (
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('Members'), '#title' => t('Members'),
'#content' => $collection_items '#content' => $collection_items
); );
$tabset['my_tabset']['add_tab'] = array( $tabset['add_tab'] = array(
// #type and #title are the minimum requirements. // #type and #title are the minimum requirements.
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('Add / Edit'), '#title' => t('Add / Edit'),
@ -445,18 +443,18 @@ class CollectionClass {
// This will be the content of the tab. // This will be the content of the tab.
'#content' => $add_to_collection, '#content' => $add_to_collection,
); );
$tabset['my_tabset']['third_tab'] = array( $tabset['third_tab'] = array(
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('Description'), '#title' => t('Description'),
); );
$tabset['my_tabset']['third_tab']['tabset'] = array( $tabset['third_tab']['tabset'] = array(
'#type' => 'tabset', '#type' => 'tabset',
); );
$dc_html = $objectHelper->getFormattedDC($collection_item); $dc_html = $objectHelper->getFormattedDC($collection_item);
$ds_list = $objectHelper->getFormattedDatastreamList($this->pid, NULL, $collection_item); $ds_list = $objectHelper->getFormattedDatastreamList($this->pid, NULL, $collection_item);
$tabset['my_tabset']['third_tab']['tabset']['view'] = array( $tabset['third_tab']['tabset']['view'] = array(
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('View'), '#title' => t('View'),
'#content' => $dc_html . $ds_list, '#content' => $dc_html . $ds_list,
@ -464,14 +462,14 @@ class CollectionClass {
if (fedora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $this->pid, $user)) { if (fedora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $this->pid, $user)) {
$editform = drupal_get_form('fedora_repository_edit_qdc_form', $this->pid, 'DC'); $editform = drupal_get_form('fedora_repository_edit_qdc_form', $this->pid, 'DC');
$tabset['my_tabset']['third_tab']['tabset']['edit'] = array( $tabset['third_tab']['tabset']['edit'] = array(
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('Edit'), '#title' => t('Edit'),
'#content' => $editform, '#content' => $editform,
); );
} }
return tabs_render($tabset); return $tabset;
} }
function getIngestInterface() { function getIngestInterface() {

4
fedora_repository.module

@ -822,9 +822,9 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
$cmodels_tabs = array_merge($cmodels_tabs, $content_model_fieldset); $cmodels_tabs = array_merge($cmodels_tabs, $content_model_fieldset);
} }
else { else {
$cmodels_tabs['tabset'][$content_model->pid] = array( $cmodels_tabs[$content_model->pid] = array(
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => $cmodel->name, '#title' => $content_model->name,
'#content' => $content_model_fieldset, '#content' => $content_model_fieldset,
); );
} }

Loading…
Cancel
Save