Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #94 from willtp87/ISLANDORA-520

ISLANDORA-520
  • Loading branch information...
commit 5d7180f6c478c75d680a5656c2c0f0d8a8788680 2 parents e48b828 + 45209b8
@jonathangreen jonathangreen authored
Showing with 30 additions and 7 deletions.
  1. +14 −7 fedora_repository.module
  2. +16 −0 formClass.inc
View
21 fedora_repository.module
@@ -1027,13 +1027,20 @@ 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.
$obj = new FedoraObjectDetailedContent($pid);
- $object_details = $obj->showFieldSets();
- if ($object_details['fedora_object_details']['#selected'] == TRUE) {
- foreach ($cmodels_tabs as &$cmodel_tab) {
- if (is_array($cmodel_tab)) {
- $cmodel_tab['#selected'] = FALSE;
- }
- }
+
+ //can disable showing the object details tab in admin UI
+ if (variable_get('fedora_repository_show_object_details_tab', TRUE)) {
+ $object_details = $obj->showFieldSets();
+ if ($object_details['fedora_object_details']['#selected'] == TRUE) {
+ foreach ($cmodels_tabs as &$cmodel_tab) {
+ if (is_array($cmodel_tab)) {
+ $cmodel_tab['#selected'] = FALSE;
+ }
+ }
+ }
+ }
+ else {
+ $object_details = array();
}
$hook_tabs = module_invoke_all('islandora_tabs', $content_models, $pid);
View
16 formClass.inc
@@ -301,6 +301,22 @@ class formClass {
'#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.'),
);
+ //have tabs options (like disable)
+ $form['tabs'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Tabs Configuration'),
+ '#description' => t('Configure the tabs avaialble when viewing Fedora objects.'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ );
+ //when checked show object details tab
+ $form['tabs']['fedora_repository_show_object_details_tab'] = array(
+ '#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 to users with the correct permissions when viewing an object in the repository"),
+ );
+
$form['advanced'] = array(
'#type' => 'fieldset',
'#title' => t('Advanced configuration options'),
Please sign in to comment.
Something went wrong with that request. Please try again.