Browse Source

object details tab is now diableable

pull/94/head
William Panting 13 years ago
parent
commit
8e3e02634c
  1. 6
      fedora_repository.module
  2. 16
      formClass.inc

6
fedora_repository.module

@ -1027,6 +1027,8 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
// Add a 'manage object' tab for all objects, where detailed list of content is shown. // Add a 'manage object' tab for all objects, where detailed list of content is shown.
$obj = new FedoraObjectDetailedContent($pid); $obj = new FedoraObjectDetailedContent($pid);
if(variable_get('fedora_repository_show_object_details_tab', FALSE)) {//can disable showing the object details tab in admin UI
$object_details = $obj->showFieldSets(); $object_details = $obj->showFieldSets();
if ($object_details['fedora_object_details']['#selected'] == TRUE) { if ($object_details['fedora_object_details']['#selected'] == TRUE) {
foreach ($cmodels_tabs as &$cmodel_tab) { foreach ($cmodels_tabs as &$cmodel_tab) {
@ -1035,6 +1037,10 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
} }
} }
} }
}
else {
$object_details = array();
}
$hook_tabs = module_invoke_all('islandora_tabs', $content_models, $pid); $hook_tabs = module_invoke_all('islandora_tabs', $content_models, $pid);
$cmodels_tabs = array_merge($cmodels_tabs, $object_details, $hook_tabs); $cmodels_tabs = array_merge($cmodels_tabs, $object_details, $hook_tabs);

16
formClass.inc

@ -301,6 +301,22 @@ class formClass {
'#default_value' => variable_get('fedora_repository_title', 'Digital Repository'), '#default_value' => variable_get('fedora_repository_title', 'Digital Repository'),
'#description' => t('The title displayed when viewing collections and objects in /fedora/repository. Leave blank to display no title. Note that the menus must be rebuilt after changing this variable.'), '#description' => t('The title displayed when viewing collections and objects in /fedora/repository. Leave blank to display no title. Note that the menus must be rebuilt after changing this variable.'),
); );
$form['tabs'] = array(//have tabs options (like disable)
'#type' => 'fieldset',
'#title' => t('Tabs Configuration'),
'#description' => t('Configure the tabs avaialble when viewing Fedora objects.'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['tabs']['fedora_repository_show_object_details_tab'] = array(//when checked show object details tab
'#type' => 'checkbox',
'#title' => t('Show Object Details Tab'),
'#default_value' => variable_get('fedora_repository_show_object_details_tab', TRUE),
'#description' => t("When enabled, the 'Object Details' tab will be visible when visiting objects if the user has the correct permissions."),
);
$form['advanced'] = array( $form['advanced'] = array(
'#type' => 'fieldset', '#type' => 'fieldset',
'#title' => t('Advanced configuration options'), '#title' => t('Advanced configuration options'),

Loading…
Cancel
Save