function views_ui_add_template_page

1 string reference to 'views_ui_add_template_page'
views_ui_menu in ./views_ui.module
Implements hook_menu().

File

includes/admin.inc, line 5480

Code

function views_ui_add_template_page() {
    $templates = views_get_all_templates();
    if (empty($templates)) {
        return t('There are no templates available.');
    }
    $header = array(
        t('Name'),
        t('Description'),
        t('Operation'),
    );
    $rows = array();
    foreach ($templates as $template) {
        $rows[] = array(
            array(
                'data' => check_plain($template->get_human_name()),
            ),
            array(
                'data' => check_plain($template->description),
            ),
            array(
                'data' => l('add', 'admin/structure/views/template/' . $template->name . '/add'),
            ),
        );
    }
    $output = theme('table', array(
        'header' => $header,
        'rows' => $rows,
    ));
    return $output;
}