function views_ui_admin_tools

Page callback for the tools - other page

1 string reference to 'views_ui_admin_tools'
views_ui_menu in ./views_ui.module

File

includes/admin.inc, line 3662

Code

function views_ui_admin_tools() {
    $form['clear_cache'] = array(
        '#type' => 'submit',
        '#value' => t("Clear Views' cache"),
        '#submit' => array(
            'views_ui_tools_clear_cache',
        ),
    );
    $form['views_sql_signature'] = array(
        '#type' => 'checkbox',
        '#title' => t('Add Views signature to all SQL queries'),
        '#description' => t("All Views-generated queries will include a special 'VIEWS' = 'VIEWS' string in the WHERE clause. This makes identifying Views queries in database server logs simpler, but should only be used when troubleshooting."),
        '#default_value' => variable_get('views_sql_signature', FALSE),
    );
    $form['views_skip_cache'] = array(
        '#type' => 'checkbox',
        '#title' => t('Disable views data caching'),
        '#description' => t("Views caches data about tables, modules and views available, to increase performance. By checking this box, Views will skip this cache and always rebuild this data when needed. This can have a serious performance impact on your site."),
        '#default_value' => variable_get('views_skip_cache', FALSE),
    );
    $form['views_hide_help_message'] = array(
        '#type' => 'checkbox',
        '#title' => t('Ignore missing advanced help module'),
        '#description' => t("Views uses the advanced help module to provide help text; if this module is not present Views will complain, unless this setting is checked."),
        '#default_value' => variable_get('views_hide_help_message', FALSE),
    );
    $form['views_ui_query_on_top'] = array(
        '#type' => 'checkbox',
        '#title' => t('Show query above live preview'),
        '#description' => t("The live preview feature will show you the output of the view you're creating, as well as the view. Check here to show the query and other information above the view; leave this unchecked to show that information below the view."),
        '#default_value' => variable_get('views_ui_query_on_top', FALSE),
    );
    $form['views_ui_disable_live_preview'] = array(
        '#type' => 'checkbox',
        '#title' => t('Disable automatic live preview'),
        '#description' => t("Don't automatically update the preview. This can speed up the editing of views a bit.'"),
        '#default_value' => variable_get('views_ui_disable_live_preview', 0),
    );
    $form['views_show_additional_queries'] = array(
        '#type' => 'checkbox',
        '#title' => t('Show other queries run during render during live preview'),
        '#description' => t("Drupal has the potential to run many queries while a view is being rendered. Checking this box will display every query run during view render as part of the live preview."),
        '#default_value' => variable_get('views_show_additional_queries', FALSE),
    );
    $form['views_no_hover_links'] = array(
        '#type' => 'checkbox',
        '#title' => t('Do not show hover links over views'),
        '#description' => t("To make it easier to administrate your views, Views provides 'hover' links to take you to the edit and export screen of a view whenever the view is used. This can be distracting on some themes, though; if it is problematic, you can turn it off here."),
        '#default_value' => variable_get('views_no_hover_links', FALSE),
    );
    $form['views_devel_output'] = array(
        '#type' => 'checkbox',
        '#title' => t('Enable views performance statistics via the Devel module'),
        '#description' => t("Check this to enable some Views query and performance statistics <em>if Devel is installed</em>."),
        '#default_value' => variable_get('views_devel_output', FALSE),
    );
    $form['views_no_javascript'] = array(
        '#type' => 'checkbox',
        '#title' => t('Disable javascript with Views'),
        '#description' => t("If you are having problems with the javascript, you can disable it here; the Views UI should degrade and still be usable without javascript, it just not as good."),
        '#default_value' => variable_get('views_no_javascript', FALSE),
    );
    $form['views_localization_plugin'] = array(
        '#type' => 'radios',
        '#title' => t('Translation method'),
        '#options' => views_fetch_plugin_names('localization', NULL, array(), TRUE),
        '#default_value' => views_get_localization_plugin(),
        '#description' => t('Select a translation method to use for Views data like header, footer, and empty text.'),
    );
    $regions = system_region_list(variable_get('theme_default', 'garland'));
    $regions['watchdog'] = t('Watchdog');
    $form['views_devel_region'] = array(
        '#type' => 'select',
        '#title' => t('Page region to output performance statistics'),
        '#default_value' => variable_get('views_devel_region', 'footer'),
        '#options' => $regions,
    );
    $form['views_exposed_filter_any_label'] = array(
        '#type' => 'select',
        '#title' => t('Label for "Any" value on optional single-select exposed filters'),
        '#options' => array(
            'old_any' => '<Any>',
            'new_any' => t('- Any -'),
        ),
        '#default_value' => variable_get('views_exposed_filter_any_label', 'old_any'),
    );
    $options = views_fetch_plugin_names('display_extender');
    if (!empty($options)) {
        $form['extenders'] = array(
            '#type' => 'fieldset',
        );
        $form['extenders']['views_display_extenders'] = array(
            '#title' => t('Display extenders'),
            '#default_value' => variable_get('views_display_extenders', array()),
            '#options' => $options,
            '#type' => 'checkboxes',
            '#description' => t('Select extensions of the views interface.'),
        );
    }
    return system_settings_form($form);
}