function lingotek_admin_configuration_view in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.7 lingotek.admin.inc \lingotek_admin_configuration_view()
- 7.3 lingotek.admin.inc \lingotek_admin_configuration_view()
- 7.5 lingotek.admin.inc \lingotek_admin_configuration_view()
- 7.6 lingotek.admin.inc \lingotek_admin_configuration_view()
1 string reference to 'lingotek_admin_configuration_view'
- lingotek_menu in ./
lingotek.module - Implements hook_menu().
File
- ./
lingotek.admin.inc, line 1924
Code
function lingotek_admin_configuration_view($form_short_id = NULL, $show_fieldset = TRUE) {
lingotek_is_module_setup();
$account = LingotekAccount::instance();
$api = LingotekApi::instance();
$site = variable_get('site_name', 'Drupal Site');
$is_enterprise = $account
->isEnterprise();
//$form_short_id values: config, logging, utilities, language_switcher
$form_id = "lingotek_admin_{$form_short_id}_form";
if (!is_null($form_short_id) && function_exists($form_id)) {
return drupal_get_form($form_id);
}
ctools_include('modal');
ctools_modal_add_js();
$show_fieldset = FALSE;
$output = array();
$output['lingotek'] = array(
'#type' => 'vertical_tabs',
'#attached' => array(
'js' => array(
drupal_get_path('module', 'lingotek') . '/js/lingotek.admin.js',
),
),
);
$account_summary = array(
drupal_get_form('lingotek_admin_account_status_form', $show_fieldset),
drupal_get_form('lingotek_admin_connection_form', $show_fieldset),
);
$output['lingotek'][] = lingotek_wrap_in_fieldset($account_summary, 'Account');
$connected = $api
->testAuthentication();
if ($connected) {
/*$arr = array(
drupal_get_form('lingotek_admin_node_translation_settings_form', $show_fieldset),
);
if ($is_enterprise) {
$arr[] = drupal_get_form('lingotek_admin_advanced_parsing_form', TRUE);
}*/
foreach (lingotek_managed_entity_types() as $machine_name => $entity_type) {
$entity_types[] = $machine_name;
$entity_settings = drupal_get_form('lingotek_admin_node_translation_settings_form', $machine_name, $show_fieldset);
$output['lingotek'][] = lingotek_wrap_in_fieldset($entity_settings, t('Translate @types', array(
'@type' => $entity_type['label'],
)));
}
//$output['lingotek'][] = lingotek_wrap_in_fieldset($arr, 'Translate Content');
$output['lingotek'][] = lingotek_wrap_in_fieldset(drupal_get_form('lingotek_admin_comment_translation_settings_form', $show_fieldset), 'Translate Comments');
$output['lingotek'][] = lingotek_wrap_in_fieldset(drupal_get_form('lingotek_admin_additional_translation_settings_form', $show_fieldset), 'Translate Configuration');
$output['lingotek'][] = lingotek_wrap_in_fieldset(drupal_get_form('lingotek_admin_profiles_form', $show_fieldset), 'Translation Profiles');
if ($is_enterprise) {
$output['lingotek'][] = lingotek_wrap_in_fieldset(drupal_get_form('lingotek_admin_advanced_parsing_form', TRUE), 'Content Parsing (Advanced)');
}
$output['lingotek'][] = lingotek_wrap_in_fieldset(drupal_get_form('lingotek_admin_prefs_form', $show_fieldset), 'Preferences');
$logging_utilities = array(
drupal_get_form('lingotek_admin_logging_form', $show_fieldset),
drupal_get_form('lingotek_admin_utilities_form', $show_fieldset),
);
$output['lingotek'][] = lingotek_wrap_in_fieldset($logging_utilities, 'Logging & Utilities');
}
return $output;
}