function webdictionary_list() { global $events; global $website; $navibars = new navibars(); $navitable = new navitable("webdictionary_list"); $navibars->title(t(21, 'Dictionary')); if (count($website->languages) > 0) { foreach ($website->languages as $wslg_code => $wslg) { $wslg_links[] = '<a href="?fid=' . $_REQUEST['fid'] . '&act=edit_language&code=' . $wslg_code . '"><i class="fa fa-fw fa-caret-right"></i> ' . language::name_by_code($wslg_code) . '</a>'; } $events->add_actions('blocks', array('item' => null, 'navibars' => &$navibars), $wslg_links, '<a class="content-actions-submenu-trigger" href="#"><img height="16" align="absmiddle" width="16" src="img/icons/silk/comment_edit.png"> ' . t(602, 'Edit language') . ' ▾</a>'); } $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=edit"><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')); $navitable->setQuickSearchURL('?fid=' . $_REQUEST['fid'] . '&act=json&_search=true&quicksearch='); 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('node_id'); $navitable->setDataIndex('node_id'); $navitable->setEditUrl('node_id', '?fid=' . $_REQUEST['fid'] . '&act=edit&id=', 'path'); $navitable->max_rows = 500; $navitable->addCol("#id#", 'id', "40", "true", "left", NULL, "true"); // ghost (unique) ID $navitable->addCol("ID", 'node_id', "90", "true", "left"); // textual ID $navitable->addCol(t(191, 'Source'), 'source', "60", "true", "left"); $navitable->addCol(t(46, 'Language'), 'lang', "50", "true", "left"); $navitable->addCol(t(54, 'Text'), 'text', "400", "true", "left"); $navitable->addCol("Path", "path", 0, "false", "left", NULL, "true"); $navibars->add_content($navitable->generate()); return $navibars->generate(); }