57 lines
2.7 KiB
PHP
57 lines
2.7 KiB
PHP
<?php
|
|
/** \file scripts\page\menu_kb.php
|
|
* \brief DI webinterface menu documentation script.
|
|
* \author Rob Schalken, Core|Vision
|
|
* \version $Revision: 26247 $
|
|
* \date $Date: 2016-02-29 10:40:22 +0100 (Mon, 29 Feb 2016) $
|
|
*
|
|
* This file contains the menu documentation script, now called "Knowledge Base". This file creates the documentation menu.
|
|
* Here the user can select multiple documentation actions (add/overview)
|
|
*/
|
|
|
|
//== Required settings ======================
|
|
$_PAGE_INFO['page_title'] = _("Knowledge Base");
|
|
|
|
$_PAGE_INFO['history_menu_buttons'] = array("Project overview", $_PAGE_INFO['HIST_MAIN']);
|
|
$_PAGE_INFO['history_menu_links'] = array("page/project", "page/menu");
|
|
//===========================================
|
|
//Button text //Page (including next action) // Rights needed
|
|
$_PAGE_INFO['menu_items'] = array( array(_("Search document") ,"page/menu_kb_search&action=doc_info" , "menu:documentatie"),
|
|
array(_("Add document") ,"page/menu_kb_search&action=doc_new" , "menu:documentatie"),
|
|
array(_("Change document") ,"page/menu_kb_search&action=doc_change" , "menu:documentatie"),
|
|
array(_("Delete document") ,"page/menu_kb_search&action=doc_delete" , "menu:documentatie"));
|
|
|
|
// Clear previous session info
|
|
unset($_SESSION[$_PAGE_INFO['id']]['action']);
|
|
unset($_SESSION[$_PAGE_INFO['id']]['recall']);
|
|
|
|
// Verify project/rights and log
|
|
if (Ver_Rights_Project_Log("menu:documentatie", "menu:documentatie", $_SESSION[$_PAGE_INFO['id']]['login']['project']['name'])) {
|
|
// Save page title
|
|
$_SESSION[$_PAGE_INFO['id']]['title'] = _("Knowledge Base");
|
|
|
|
// Show page header
|
|
print_page_header();
|
|
|
|
// Collect menu items
|
|
for ($i = 0; $i < (sizeof($_PAGE_INFO['menu_items'])); $i++) {
|
|
// Retrieve button text
|
|
$menu_items[$i] = $_PAGE_INFO['menu_items'][$i][0];
|
|
// Verify menu rights and available link => enable/disable
|
|
if ((db_ver_rights_user_one_valid($_SESSION[$_PAGE_INFO['id']]['login']['user']['id'], $_PAGE_INFO['menu_items'][$i][2])) && (!empty($_PAGE_INFO['menu_items'][$i][1]))) {
|
|
$menu_rights[$i] = 1;
|
|
}
|
|
else {
|
|
$menu_rights[$i] = 0;
|
|
}
|
|
// Retrieve button link
|
|
$menu_links[$i] = "?id=" . $_PAGE_INFO['id'] . "&href=" . $_PAGE_INFO['menu_items'][$i][1];
|
|
}
|
|
|
|
// Display main menu
|
|
print_menu(_("Knowledge Base"), $menu_items, $menu_links, $menu_rights);
|
|
|
|
// Show page footer
|
|
print_page_footer();
|
|
}
|
|
?>
|