function views_ui::list_render

Overrides ctools_export_ui::list_render

File

plugins/export_ui/views_ui.class.php, line 314

Class

views_ui
CTools Export UI class handler for Views UI.

Code

public function list_render(&$form_state) {
    views_include('admin');
    views_ui_add_admin_css();
    if (empty($_REQUEST['js'])) {
        views_ui_check_advanced_help();
    }
    drupal_add_library('system', 'jquery.bbq');
    views_add_js('views-list');
    $this->active = $form_state['values']['order'];
    $this->order = $form_state['values']['sort'];
    $header = array(
        $this->tablesort_link(t('View name'), 'name', 'views-ui-name'),
        array(
            'data' => t('Description'),
            'class' => array(
                'views-ui-description',
            ),
        ),
        $this->tablesort_link(t('Tag'), 'tag', 'views-ui-tag'),
        $this->tablesort_link(t('Path'), 'path', 'views-ui-path'),
        array(
            'data' => t('Operations'),
            'class' => array(
                'views-ui-operations',
            ),
        ),
    );
    $table = array(
        'header' => $header,
        'rows' => $this->rows,
        'empty' => t('No views match the search criteria.'),
        'attributes' => array(
            'id' => 'ctools-export-ui-list-items',
        ),
    );
    return theme('table', $table);
}