function items_list() { global $layout; global $user; $navibars = new navibars(); $navitable = new navitable("items_list"); $navibars->title(t(22, 'Items')); $navibars->add_actions(array($user->permission("items.create") == 'false' ? '' : '<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=list"><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('date_modified', 'DESC'); $navitable->setDataIndex('id'); $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=edit&id='); $navitable->enableSearch(); if ($user->permission("items.delete") == 'true') { $navitable->enableDelete(); } $navitable->setGridNotesObjectName("item"); $navitable->addCol("ID", 'id', "40", "true", "left"); $navitable->addCol(t(67, 'Title'), 'title', "320", "true", "left"); $navitable->addCol(t(309, 'Social'), 'comments', "50", "true", "center"); $navitable->addCol(t(78, 'Category'), 'category', "210", "true", "left"); //$navitable->addCol(t(266, 'Author'), 'author_username', "80", "true", "left"); $navitable->addCol(t(551, 'Date to display'), 'date_to_display', "60", "true", "center"); $navitable->addCol(t(85, 'Date published'), 'dates', "100", "true", "center"); $navitable->addCol(t(68, 'Status'), 'permission', "80", "true", "center"); $navitable->addCol(t(168, 'Notes'), 'note', "50", "false", "center"); $navitable->setLoadCallback(' $("td[aria-describedby=\'items_list_category\']").truncate({ "width": "auto", "token": "…", "side": "center", "addtitle": true }); if($("#jqgh_items_list_category button").length < 1) { $("#jqgh_items_list_category").prepend("<button><i class=\\"fa fa-bars\\"></i></button>"); $("#jqgh_items_list_category button") .button() .css( { "float": "right", "margin-top": "0px", "padding": "0px" }) .on("click", items_list_choose_categories); $("#jqgh_items_list_category span.ui-button-text").css({"padding-top": "0", "padding-bottom": "0"}); } '); // add categories filter $hierarchy = structure::hierarchy(); $hierarchy = structure::hierarchyListClasses($hierarchy); $navibars->add_content('<div id="filter_categories_window" style="display: none;">' . $hierarchy . '</div>'); $layout->add_script('$("#filter_categories_window ul").attr("data-name", "filter_categories_field");'); $layout->add_script(' $("#filter_categories_window ul").jAutochecklist({ popup: false, absolutePosition: true, width: 0, listWidth: 400, listMaxHeight: 400, onItemClick: function(nval, li, selected_before, selected_after) { selected_after = selected_after.join(","); var filters = { "groupOp" : "AND", "rules": [ { "field" : "category", "op" : "in", "data" : selected_after }, { "field" : "title", "op" : "cn", "data" : $("#navigate-quicksearch").val() } ] }; $("#items_list").jqGrid( "setGridParam", { search: true, postData: { "filters": filters } } ).trigger("reloadGrid"); } });'); $layout->add_script(' function items_list_choose_categories() { $("#navigate-quicksearch").parent().on("submit", function(){ $("#filter_categories_window ul").jAutochecklist("deselectAll"); }); $("#filter_categories_window ul").jAutochecklist("open"); $(".jAutochecklist_list").css({"position": "absolute"}); $(".jAutochecklist_list").css($("#jqgh_items_list_category button").offset()); $(".jAutochecklist_dropdown_wrapper").hide(); $(".jAutochecklist_list").css({ "border-radius": "8px", "margin-left": "-373px", "margin-top": "16px" }); $(".jAutochecklist_list").addClass("navi-ui-widget-shadow ui-menu ui-widget ui-widget-content ui-corner-all"); return false; } '); $navibars->add_content($navitable->generate()); return $navibars->generate(); }
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(); }
function webuser_groups_list() { global $user; global $DB; global $website; $navibars = new navibars(); $navitable = new navitable('webuser_groups_list'); $navibars->title(t(24, 'Web users') . ' / ' . t(506, 'Groups')); $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=0"><img height="16" align="absmiddle" width="16" src="img/icons/silk/user.png"> ' . t(24, 'Web users') . '</a>')); $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=webuser_group_edit"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=' . $_REQUEST['fid'] . '&act=webuser_groups_list"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>')); $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=webuser_groups_json'); $navitable->sortBy('id'); $navitable->setDataIndex('id'); $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=webuser_group_edit&id='); $navitable->addCol("ID", 'id', "80", "true", "left"); $navitable->addCol(t(237, 'Code'), 'code', "100", "true", "left"); $navitable->addCol(t(159, 'Name'), 'name', "300", "true", "left"); $navibars->add_content($navitable->generate()); return $navibars->generate(); }
function block_groups_list() { global $user; global $DB; global $website; $navibars = new navibars(); $navitable = new navitable('block_groups_list'); $navibars->title(t(23, 'Blocks') . ' / ' . t(506, 'Groups')); $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=0"><img height="16" align="absmiddle" width="16" src="img/icons/silk/brick.png"> ' . t(23, 'Blocks') . '</a>', '<a href="?fid=' . $_REQUEST['fid'] . '&act=block_types_list"><img height="16" align="absmiddle" width="16" src="img/icons/silk/brick_edit.png"> ' . t(167, 'Types') . '</a>')); $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=block_group_edit"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=' . $_REQUEST['fid'] . '&act=block_groups_list"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>')); $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=block_groups_json'); $navitable->sortBy('id'); $navitable->setDataIndex('id'); $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=block_group_edit&id='); $navitable->setGridNotesObjectName("block_group"); $navitable->addCol("ID", 'id', "80", "true", "left"); $navitable->addCol(t(237, 'Code'), 'code', "120", "true", "left"); $navitable->addCol(t(67, 'Title'), 'title', "200", "true", "left"); $navitable->addCol(t(23, 'Blocks'), 'blocks', "80", "true", "left"); $navitable->addCol(t(168, 'Notes'), 'note', "50", "false", "center"); $navibars->add_content($navitable->generate()); return $navibars->generate(); }
function websites_list() { global $user; $navibars = new navibars(); $navitable = new navitable("websites_list"); $navibars->title(t(241, 'Websites')); $navibars->add_actions(array($user->permission('websites.edit') == 'true' ? '<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')); if ($_REQUEST['quicksearch'] == 'true') { $navitable->setInitialURL("?fid=" . $_REQUEST['fid'] . '&act=1&_search=true&quicksearch=' . $_REQUEST['navigate-quicksearch']); } $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=1'); $navitable->sortBy('id'); $navitable->setDataIndex('id'); $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=2&id='); $navitable->addCol("ID", 'id', "80", "true", "left"); $navitable->addCol(t(328, 'Favicon'), 'favicon', "32", "true", "center"); $navitable->addCol(t(159, 'Name'), 'name', "200", "true", "left"); $navitable->addCol(t(187, 'Homepage'), 'homepage', "300", "true", "center"); $navitable->addCol(t(68, 'Status'), 'permission', "100", "true", "center"); $navibars->add_content($navitable->generate()); return $navibars->generate(); }
function profiles_list() { $navibars = new navibars(); $navitable = new navitable("profiles_list"); $navibars->title(t(243, 'Profiles')); $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=1&_search=true&quicksearch=' . $_REQUEST['navigate-quicksearch']); } $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=1'); $navitable->sortBy('id'); $navitable->setDataIndex('id'); $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=2&id='); $navitable->addCol("ID", 'id', "80", "true", "left"); $navitable->addCol(t(159, 'Name'), 'name', "400", "true", "left"); $navibars->add_content($navitable->generate()); return $navibars->generate(); }
function users_list() { $navibars = new navibars(); $navitable = new navitable("users_list"); $navibars->title(t(15, 'Users')); $navibars->add_actions(array('<a href="?fid=users&act=2"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=users&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=users&act=1&_search=true&quicksearch=" . $_REQUEST['navigate-quicksearch']); } $navitable->setURL('?fid=users&act=1'); $navitable->sortBy('id', 'DESC'); $navitable->setDataIndex('id'); $navitable->setEditUrl('id', '?fid=users&act=2&id='); $navitable->enableDelete(); $navitable->addCol("ID", 'id', "80", "true", "left"); $navitable->addCol(t(1, 'User'), 'username', "150", "true", "left"); $navitable->addCol(t(44, 'E-Mail'), 'email', "150", "true", "left"); $navitable->addCol(t(45, 'Profile'), 'profile', "100", "true", "left"); $navitable->addCol(t(46, 'Language'), 'language', "80", "true", "left"); $navitable->addCol(t(47, 'Blocked'), 'blocked', "50", "true", "center"); $navibars->add_content($navitable->generate()); return $navibars->generate(); }
function functions_list() { $navibars = new navibars(); $navitable = new navitable("functions_list"); $navibars->title(t(240, 'Functions')); $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=1&_search=true&quicksearch=' . $_REQUEST['navigate-quicksearch']); } $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=1'); $navitable->sortBy('id'); $navitable->setDataIndex('id'); $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=2&id='); $navitable->addCol("ID", 'id', "80", "true", "left"); $navitable->addCol(t(78, 'Category'), 'category', "100", "true", "left"); $navitable->addCol(t(237, 'Code'), 'codename', "100", "true", "left"); $navitable->addCol(t(242, 'Icon'), 'icon', "50", "true", "center"); $navitable->addCol(t(67, 'Title'), 'lid', "200", "true", "left"); $navitable->addCol(t(65, 'Enabled'), 'enabled', "80", "true", "center"); $navibars->add_content($navitable->generate()); return $navibars->generate(); }
function backups_list() { $navibars = new navibars(); $navitable = new navitable("backups_list"); $navibars->title(t(329, 'Backups')); $navibars->add_actions(array('<a href="#" onclick="navigate_restore_dialog();"><img height="16" align="absmiddle" width="16" src="img/icons/silk/database_refresh.png"> ' . t(412, 'Restore') . '</a> ')); $navibars->add_actions(array('<a href="?fid=backups&act=2"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=backups&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=backups&act=1&_search=true&quicksearch=" . $_REQUEST['navigate-quicksearch']); } $navitable->setURL('?fid=backups&act=1'); $navitable->sortBy('id'); $navitable->setDataIndex('id'); $navitable->setEditUrl('id', '?fid=backups&act=2&id='); $navitable->addCol("ID", 'id', "80", "true", "left"); $navitable->addCol(t(196, 'Date and time'), 'date_created', "150", "true", "center"); $navitable->addCol(t(67, 'Title'), 'title', "400", "true", "left"); $navitable->addCol(t(409, 'Size'), 'size', "80", "true", "center"); $navitable->addCol(t(68, 'Status'), 'status', "150", "true", "left"); $navibars->add_content($navitable->generate()); return $navibars->generate(); }
function comments_list() { $navibars = new navibars(); $navitable = new navitable("comments_list"); $navibars->title(t(250, 'Comments')); $navibars->add_actions(array('<a href="#" onclick="navigate_delete_dialog();"><img height="16" align="absmiddle" width="16" src="img/icons/silk/comments_delete.png"> ' . t(522, 'Remove Spam') . '</a>')); $delete_html = array(); $delete_html[] = '<div id="navigate-delete-dialog" class="hidden">'; $delete_html[] = t(60, 'Do you really want to delete the selected items?') . "<br /><br />"; $delete_html[] = t(523, 'This function can NOT be undone.'); $delete_html[] = '</div>'; $delete_html[] = '<script language="javascript" type="text/javascript">'; $delete_html[] = 'function navigate_delete_dialog()'; $delete_html[] = '{'; $delete_html[] = '$("#navigate-delete-dialog").removeClass("hidden");'; $delete_html[] = '$("#navigate-delete-dialog").dialog({ resizable: true, height: 150, width: 300, modal: true, title: "' . t(522, 'Remove Spam') . '", buttons: { "' . t(35, 'Delete') . '": function() { $(this).dialog("close"); window.location.href = "?fid=' . $_REQUEST['fid'] . '&act=remove_spam"; }, "' . t(58, 'Cancel') . '": function() { $(this).dialog("close"); } } });'; $delete_html[] = '}'; $delete_html[] = '</script>'; $navibars->add_content(implode("\n", $delete_html)); $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=1&_search=true&quicksearch=' . $_REQUEST['navigate-quicksearch']); } $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=1'); $navitable->sortBy('date_created', 'desc'); $navitable->setDataIndex('id'); $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=2&id='); $navitable->enableDelete(); $navitable->addCol("ID", 'id', "80", "true", "left"); $navitable->addCol(t(180, 'Item'), 'item', "200", "true", "left"); $navitable->addCol(t(226, 'Date created'), 'date_created', "100", "true", "left"); $navitable->addCol(t(1, 'User'), 'user', "100", "true", "left"); $navitable->addCol(t(54, 'Text'), 'message', "200", "true", "left"); $navitable->addCol(t(68, 'Status'), 'status', "80", "true", "center"); $navibars->add_content($navitable->generate()); return $navibars->generate(); }
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(); }