function tripal_feature_admin
2.x tripal_feature.admin.inc | tripal_feature_admin() |
3.x tripal_feature.admin.inc | tripal_feature_admin() |
1.x tripal_feature.admin.inc | tripal_feature_admin() |
Related topics
2 string references to 'tripal_feature_admin'
- tripal_feature_menu in tripal_feature/
tripal_feature.module - Menu items are automatically added for the new node types created by this module to the 'Create Content' Navigation menu item. This function adds more menu items needed for this module.
- tripal_feature_theme in tripal_feature/
tripal_feature.module - We need to let drupal know about our theme functions and their arguments. We create theme functions to allow users of the module to customize the look and feel of the output generated in this module
File
- tripal_feature/
includes/ tripal_feature.admin.inc, line 13 - @todo Add file header description
Code
function tripal_feature_admin() {
/*
// before proceeding check to see if we have any
// currently processing jobs. If so, we don't want
// to give the opportunity to sync libraries
$active_jobs = FALSE;
if (tripal_get_module_active_jobs('tripal_feature')) {
$active_jobs = TRUE;
}
if (!$active_jobs) {
*/
get_tripal_feature_admin_form_title_set($form);
get_tripal_feature_admin_form_url_set($form);
$form['browser'] = array(
'#type' => 'fieldset',
'#title' => t('Feature Browser'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$allowedoptions1 = array(
'show_feature_browser' => "Show the feature browser on the organism page. The browser loads when page loads. This may be slow for large sites.",
'hide_feature_browser' => "Hide the feature browser on the organism page. Disables the feature browser completely.",
);
// $allowedoptions ['allow_feature_browser'] = "Allow loading of the feature browsing through AJAX. For large sites the initial page load will be quick with the feature browser loading afterwards.";
$form['browser']['browser_desc'] = array(
'#type' => 'markup',
'#value' => 'A feature browser can be added to an organism page to allow users to quickly ' .
'access a feature. This will most likely not be the ideal mechanism for accessing feature ' .
'information, especially for large sites, but it will alow users exploring the site (such ' .
'as students) to better understand the data types available on the site.',
);
$form['browser']['feature_types'] = array(
'#title' => t('Feature Types'),
'#type' => 'textarea',
'#description' => t("Enter the Sequence Ontology (SO) terms for the feature types that " .
"will be shown in the feature browser."),
'#default_value' => variable_get('chado_browser_feature_types', 'gene contig'),
);
$form['browser']['browse_features'] = array(
'#title' => 'Feature Browser on Organism Page',
'#type' => 'radios',
'#options' => $allowedoptions1,
'#default_value' => variable_get('tripal_feature_browse_setting', 'show_feature_browser'),
);
$form['browser']['browse_features_library'] = array(
'#title' => 'Feature Browser on Library Page',
'#type' => 'radios',
'#options' => array(
'show_feature_browser' => "Show the feature browse on the library page. The browser loads when page loads. This may be slow for large sites.",
'hide_feature_browser' => "Hide the feature browser on the library page. Disables the feature browser completely.",
),
'#default_value' => variable_get('tripal_library_feature_browse_setting', 'show_feature_browser'),
);
$form['browser']['browse_features_analysis'] = array(
'#title' => 'Feature Browser on Analysis Page',
'#type' => 'radios',
'#options' => array(
'show_feature_browser' => "Show the feature browse on the analysis page. The browser loads when page loads. This may be slow for large sites.",
'hide_feature_browser' => "Hide the feature browser on the analysis page. Disables the feature browser completely.",
),
'#default_value' => variable_get('tripal_analysis_feature_browse_setting', 'show_feature_browser'),
);
$form['browser']['set_browse_button'] = array(
'#type' => 'submit',
'#value' => t('Set Browser'),
'#weight' => 2,
);
$form['summary'] = array(
'#type' => 'fieldset',
'#title' => t('Feature Summary Report'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$allowedoptions2['show_feature_summary'] = "Show the feature summary on the organism page. The summary loads when page loads.";
$allowedoptions2['hide_feature_summary'] = "Hide the feature summary on the organism page. Disables the feature summary.";
$form['summary']['feature_summary'] = array(
'#title' => 'Feature Summary on Organism Page',
'#description' => 'A feature summary can be added to an organism page to allow users to see the ' .
'type and quantity of features available for the organism.',
'#type' => 'radios',
'#options' => $allowedoptions2,
'#default_value' => variable_get('tripal_feature_summary_setting', 'show_feature_summary'),
);
$form['summary']['feature_mapping'] = array(
'#title' => 'Map feature types',
'#description' => t('You may specify which Sequence Ontology (SO) terms to show in the ' .
'feature summary report by listing them in the following text area. Enter one per line. ' .
'If left blank, all SO terms for all features will be shown in the report. Only those terms ' .
'listed below will be shown in the report. Terms will appear in the report in the same order listed. To rename a ' .
'SO term to be more human readable form, use an \'=\' sign after the SO term (e.g. \'polypeptide = Protein\')'),
'#type' => 'textarea',
'#rows' => 15,
'#default_value' => variable_get('tripal_feature_summary_report_mapping', ''),
);
$form['summary']['set_summary_button'] = array(
'#type' => 'submit',
'#value' => t('Set Summary'),
'#weight' => 2,
);
get_tripal_feature_admin_form_taxonomy_set($form);
get_tripal_feature_admin_form_reindex_set($form);
get_tripal_feature_admin_form_cleanup_set($form);
/* }
else {
$form['notice'] = array(
'#type' => 'fieldset',
'#title' => t('Feature Management Temporarily Unavailable'),
'#collapsible' => FALSE,
'#collapsed' => FALSE,
);
$form['notice']['message'] = array(
'#value' => t('Currently, feature management jobs are waiting or ".
"are running. Managemment features have been hidden until these ".
"jobs complete. Please check back later once these jobs have ".
"finished. You can view the status of pending jobs in the Tripal ".
"jobs page.'),
);
}
*/
return system_settings_form($form);
}