Browse Source

added menu path to load object profile configurations, setup admin page to request all profiles and create a table for user selection

pull/104/head
Jason MacWilliams 13 years ago
parent
commit
6701587fd4
  1. 33
      formClass.inc

33
formClass.inc

@ -179,6 +179,16 @@ class formClass {
'access arguments' => array('view fedora collection'),
);
// ***** Jason: begin menu path for xslt config page
$items['admin/settings/fedora_repository/object_details_xslt'] = array(
'title' => "",
'type' => MENU_CALLBACK,
'page callback' => 'drupal_get_form',
'page arguments' => array('fedora_repository_object_details_XSLT_config'),
'file' => 'ObjectDetails.inc',
'access arguments' => array('administer site configuration'),
);
// ***** Jason: end menu path for xslt config page
return $items;
}
@ -286,6 +296,7 @@ class formClass {
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
//when checked show object details tab
$form['tabs']['fedora_repository_show_object_details_tab'] = array(
'#type' => 'checkbox',
@ -294,6 +305,28 @@ class formClass {
'#description' => t("When enabled, the 'Object Details' tab will be visible to users with the correct permissions when viewing an object in the repository"),
);
// ***** Jason: begin object details display profiles
module_load_include('inc', 'fedora_repository', 'ObjectDetails');
$primary_display_mode = variable_get('islandora_object_details_display_table', 'convertQDC');
$profiles = module_invoke_all("islandora_object_details_display");
$display_options = array();
foreach ($profiles as $machine_name => $profile) {
$display_options[$machine_name] = $profile['name'];
$config_path = $profile['config'];
if (isset($config_path) && $config_path != ""){
$display_options[$machine_name] .= " (". l("config", $config_path, array()) .")";
}
}
$form['tabs']['islandora_object_details_display_table'] = array(
'#type' => 'radios',
'#title' => t('Show object details as'),
'#options' => $display_options,
'#default_value' => $primary_display_mode,
// '#description' => t("Tells Islandora how to display the object details page for each object"),
);
// ***** Jason: end object details display profiles
$form['advanced'] = array(
'#type' => 'fieldset',
'#title' => t('Advanced configuration options'),

Loading…
Cancel
Save