Example #1
0
function templates_list()
{
    $navibars = new navibars();
    $navitable = new navitable("templates_list");
    $navibars->title(t(20, 'Templates'));
    $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=2"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=' . $_REQUEST['fid'] . '&act=0"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>', 'search_form'));
    if ($_REQUEST['quicksearch'] == 'true') {
        $navitable->setInitialURL("?fid=" . $_REQUEST['fid'] . '&act=json&_search=true&quicksearch=' . $_REQUEST['navigate-quicksearch']);
    }
    $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=json');
    $navitable->sortBy('id');
    $navitable->setDataIndex('id');
    $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=load&id=');
    $navitable->disableSelect();
    $navitable->addCol("ID", 'id', "60", "true", "left");
    $navitable->addCol(t(67, 'Title'), 'title', "260", "true", "left");
    $navitable->addCol(t(368, 'Theme'), 'theme', "180", "false", "left");
    $navitable->addCol(t(68, 'Status'), 'permission', "80", "true", "center");
    $navitable->addCol(t(65, 'Enabled'), 'enabled', "60", "true", "center");
    $navibars->add_content($navitable->generate());
    return $navibars->generate();
}