Same name in other branches
  1. 7.x-3.x quicktabs_tabstyles/quicktabs_tabstyles.module \theme_quicktabs_style_options()

Theme function for quicktabs style radio options.

1 theme call to theme_quicktabs_style_options()
quicktabs_styles dans includes/admin.inc
Callback function for admin/settings/quicktabs. Display the settings form.

Fichier

includes/admin.inc, line 116

Code

function theme_quicktabs_style_options($variables) {
    $style_element = $variables['quicktabs_tabstyle'];
    $markup = '';
    $tabs['one'] = array(
        'title' => t('One'),
        'type' => 'freetext',
        'text' => t('First tab'),
    );
    $tabs['two'] = array(
        'title' => t('Two'),
        'type' => 'freetext',
        'text' => t('Second tab'),
    );
    $tabs['three'] = array(
        'title' => t('Three'),
        'type' => 'freetext',
        'text' => t('Third tab'),
    );
    $quicktabs->tabs = $tabs;
    $quicktabs->ajax = FALSE;
    $quicktabs->hide_empty_tabs = FALSE;
    // Preview for each style.
    foreach (element_children($style_element) as $style) {
        $element = $style_element[$style];
        $quicktabs->style = $style;
        $quicktabs->machine_name = drupal_strtolower($style);
        $preview = '<div class="quicktabs-preview">' . drupal_render(quicktabs_render($quicktabs)) . '</div>';
        $element['#description'] = t('%style preview', array(
            '%style' => $element['#title'],
        )) . ':<br />' . $preview;
        $markup .= drupal_render($element);
    }
    $build = array(
        'style' => array(
            '#markup' => $markup,
        ),
        '#attached' => array(
            'css' => array(
                drupal_get_path('module', 'quicktabs') . '/css/quicktabs-admin.css',
            ),
        ),
    );
    return drupal_render($build);
}