La config des gestionnaires de menu est mise a part.
This commit is contained in:
parent
7ef66e8e78
commit
8923d1f2b3
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/admin/ihm.php
|
\file htdocs/admin/ihm.php
|
||||||
\brief Page de configuration du de l'interface homme machine
|
\brief Page de configuration de l'interface homme machine
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -37,8 +37,6 @@ if (!$user->admin)
|
|||||||
|
|
||||||
if (! defined("MAIN_MOTD")) define("MAIN_MOTD","");
|
if (! defined("MAIN_MOTD")) define("MAIN_MOTD","");
|
||||||
|
|
||||||
$dirtop = "../includes/menus/barre_top";
|
|
||||||
$dirleft = "../includes/menus/barre_left";
|
|
||||||
$dirtheme = "../theme";
|
$dirtheme = "../theme";
|
||||||
|
|
||||||
// Liste des zone de recherche permanantes supportées
|
// Liste des zone de recherche permanantes supportées
|
||||||
@ -60,12 +58,6 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update')
|
|||||||
dolibarr_set_const($db, "MAIN_SHOW_BUGTRACK_LINK", $_POST["main_show_bugtrack_link"]);
|
dolibarr_set_const($db, "MAIN_SHOW_BUGTRACK_LINK", $_POST["main_show_bugtrack_link"]);
|
||||||
dolibarr_set_const($db, "MAIN_SHOW_WORKBOARD", $_POST["main_show_workboard"]);
|
dolibarr_set_const($db, "MAIN_SHOW_WORKBOARD", $_POST["main_show_workboard"]);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_MENU_BARRETOP", $_POST["main_menu_barretop"]);
|
|
||||||
dolibarr_set_const($db, "MAIN_MENU_BARRELEFT", $_POST["main_menu_barreleft"]);
|
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_MENUFRONT_BARRETOP", $_POST["main_menufront_barretop"]);
|
|
||||||
dolibarr_set_const($db, "MAIN_MENUFRONT_BARRELEFT",$_POST["main_menufront_barreleft"]);
|
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"]);
|
dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"]);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT", $_POST["main_searchform_contact"]);
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT", $_POST["main_searchform_contact"]);
|
||||||
@ -76,7 +68,7 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update')
|
|||||||
|
|
||||||
$_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer
|
$_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer
|
||||||
|
|
||||||
Header("Location: ihm.php?mainmenu=home&leftmenu=setup");
|
Header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +83,9 @@ print "<br>\n";
|
|||||||
|
|
||||||
if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
||||||
{
|
{
|
||||||
print '<form method="post" action="ihm.php">';
|
$html=new Form($db);
|
||||||
|
|
||||||
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
@ -103,7 +97,6 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
// Langue par defaut
|
// Langue par defaut
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||||
$html=new Form($db);
|
|
||||||
$html->select_lang($conf->global->MAIN_LANG_DEFAULT,'main_lang_default',1);
|
$html->select_lang($conf->global->MAIN_LANG_DEFAULT,'main_lang_default',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -159,40 +152,6 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
|
|
||||||
|
|
||||||
// Gestionnaires de menu
|
|
||||||
$var=true;
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Menu").'</td>';
|
|
||||||
print '<td>'.$langs->trans("InternalUsers").'</td>';
|
|
||||||
print '<td>'.$langs->trans("ExternalUsers").'</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Menu top
|
|
||||||
$var=!$var;
|
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMenuTopManager").'</td>';
|
|
||||||
print '<td>';
|
|
||||||
print $html->select_menu($conf->global->MAIN_MENU_BARRETOP,'main_menu_barretop',$dirtop);
|
|
||||||
print '</td>';
|
|
||||||
print '<td>';
|
|
||||||
print $html->select_menu($conf->global->MAIN_MENUFRONT_BARRETOP,'main_menufront_barretop',$dirtop);
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Menu left
|
|
||||||
$var=!$var;
|
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMenuLeftManager").'</td>';
|
|
||||||
print '<td>';
|
|
||||||
print $html->select_menu($conf->global->MAIN_MENU_BARRELEFT,'main_menu_barreleft',$dirleft);
|
|
||||||
print '</td>';
|
|
||||||
print '<td>';
|
|
||||||
print $html->select_menu($conf->global->MAIN_MENUFRONT_BARRELEFT,'main_menufront_barreleft',$dirleft);
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
print '</table><br>';
|
|
||||||
|
|
||||||
|
|
||||||
// Themes
|
// Themes
|
||||||
show_theme(1);
|
show_theme(1);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -289,43 +248,6 @@ else
|
|||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
|
|
||||||
|
|
||||||
// Gestionnaires de menu
|
|
||||||
$var=true;
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Menu").'</td>';
|
|
||||||
print '<td>'.$langs->trans("InternalUsers").'</td>';
|
|
||||||
print '<td>'.$langs->trans("ExternalUsers").'</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
$var=!$var;
|
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMenuTopManager").'</td>';
|
|
||||||
print '<td>';
|
|
||||||
$filelib=eregi_replace('\.php$','',$conf->global->MAIN_MENU_BARRETOP);
|
|
||||||
print $filelib;
|
|
||||||
print '</td>';
|
|
||||||
print '<td>';
|
|
||||||
$filelib=eregi_replace('\.php$','',$conf->global->MAIN_MENUFRONT_BARRETOP);
|
|
||||||
print $filelib;
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
$var=!$var;
|
|
||||||
print '<tr '.$bc[$var].'>';
|
|
||||||
print '<td>'.$langs->trans("DefaultMenuLeftManager").'</td>';
|
|
||||||
print '<td>';
|
|
||||||
$filelib=eregi_replace('\.php$','',$conf->global->MAIN_MENU_BARRELEFT);
|
|
||||||
print $filelib;
|
|
||||||
print '</td>';
|
|
||||||
print '<td>';
|
|
||||||
$filelib=eregi_replace('\.php$','',$conf->global->MAIN_MENUFRONT_BARRELEFT);
|
|
||||||
print $filelib;
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
print '</table><br>';
|
|
||||||
|
|
||||||
|
|
||||||
// Themes
|
// Themes
|
||||||
show_theme(0);
|
show_theme(0);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -353,7 +275,7 @@ else
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
print '<a class="tabAction" href="ihm.php?action=edit">'.$langs->trans("Edit").'</a>';
|
print '<a class="tabAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Edit").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,6 +46,8 @@ function llxHeader($head = "", $title="", $help_url='')
|
|||||||
|
|
||||||
$menu->add(DOL_URL_ROOT."/admin/modules.php", $langs->trans("Modules"));
|
$menu->add(DOL_URL_ROOT."/admin/modules.php", $langs->trans("Modules"));
|
||||||
|
|
||||||
|
$menu->add(DOL_URL_ROOT."/admin/menus.php", $langs->trans("Menus"));
|
||||||
|
|
||||||
$menu->add(DOL_URL_ROOT."/admin/ihm.php", $langs->trans("GUISetup"));
|
$menu->add(DOL_URL_ROOT."/admin/ihm.php", $langs->trans("GUISetup"));
|
||||||
|
|
||||||
$menu->add(DOL_URL_ROOT."/admin/boxes.php", $langs->trans("Boxes"));
|
$menu->add(DOL_URL_ROOT."/admin/boxes.php", $langs->trans("Boxes"));
|
||||||
|
|||||||
@ -127,6 +127,7 @@ class MenuLeft {
|
|||||||
$newmenu->add(DOL_URL_ROOT."/admin/index.php?leftmenu=setup", $langs->trans("Setup"));
|
$newmenu->add(DOL_URL_ROOT."/admin/index.php?leftmenu=setup", $langs->trans("Setup"));
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/company.php", $langs->trans("MenuCompanySetup"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/company.php", $langs->trans("MenuCompanySetup"));
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/modules.php", $langs->trans("Modules"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/modules.php", $langs->trans("Modules"));
|
||||||
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/menus.php", $langs->trans("Menus"));
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/ihm.php", $langs->trans("GUISetup"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/ihm.php", $langs->trans("GUISetup"));
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/boxes.php", $langs->trans("Boxes"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/boxes.php", $langs->trans("Boxes"));
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/delais.php",$langs->trans("Alerts"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/delais.php",$langs->trans("Alerts"));
|
||||||
|
|||||||
@ -130,6 +130,7 @@ class MenuLeft {
|
|||||||
$newmenu->add(DOL_URL_ROOT."/admin/index.php?leftmenu=setup", $langs->trans("Setup"));
|
$newmenu->add(DOL_URL_ROOT."/admin/index.php?leftmenu=setup", $langs->trans("Setup"));
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/company.php", $langs->trans("MenuCompanySetup"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/company.php", $langs->trans("MenuCompanySetup"));
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/modules.php", $langs->trans("Modules"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/modules.php", $langs->trans("Modules"));
|
||||||
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/menus.php", $langs->trans("Menus"));
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/ihm.php", $langs->trans("GUISetup"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/ihm.php", $langs->trans("GUISetup"));
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/boxes.php", $langs->trans("Boxes"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/boxes.php", $langs->trans("Boxes"));
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/delais.php",$langs->trans("Alerts"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/delais.php",$langs->trans("Alerts"));
|
||||||
|
|||||||
@ -212,7 +212,7 @@ class MenuTop {
|
|||||||
print '<td class="tmenu"><font class="tmenudisabled">'.$langs->trans("MenuFinancial").'</font>';
|
print '<td class="tmenu"><font class="tmenudisabled">'.$langs->trans("MenuFinancial").'</font>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Projets
|
// Projects
|
||||||
if ($conf->projet->enabled)
|
if ($conf->projet->enabled)
|
||||||
{
|
{
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
@ -256,7 +256,40 @@ class MenuTop {
|
|||||||
print '<td class="tmenu"><font class="tmenudisabled">'.$langs->trans("Tools").'</font>';
|
print '<td class="tmenu"><font class="tmenudisabled">'.$langs->trans("Tools").'</font>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// OSCommerce 1
|
// Telephonie
|
||||||
|
if ($conf->telephonie->enabled && $user->rights->telephonie->lire)
|
||||||
|
{
|
||||||
|
$class="";
|
||||||
|
if (ereg("^".DOL_URL_ROOT."\/telephonie\/",$_SERVER["PHP_SELF"]))
|
||||||
|
{
|
||||||
|
$class='class="tmenu" id="sel"';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$class = 'class="tmenu"';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/telephonie/index.php?mainmenu=telephonie"'.($this->atarget?" target=$this->atarget":"").'>Telephonie</a></td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Energie
|
||||||
|
if ($conf->energie->enabled)
|
||||||
|
{
|
||||||
|
$langs->load("energy");
|
||||||
|
$class="";
|
||||||
|
if (ereg("^".DOL_URL_ROOT."\/energie\/",$_SERVER["PHP_SELF"]))
|
||||||
|
{
|
||||||
|
$class='class="tmenu" id="sel"';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$class = 'class="tmenu"';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/energie/index.php?mainmenu=energie"'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Energy").'</a></td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// OSCommerce 1
|
||||||
if ($conf->boutique->enabled)
|
if ($conf->boutique->enabled)
|
||||||
{
|
{
|
||||||
$langs->load("shop");
|
$langs->load("shop");
|
||||||
|
|||||||
@ -201,7 +201,7 @@ class MenuTop {
|
|||||||
print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/compta/index.php?mainmenu=accountancy&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("MenuFinancial").'</a></td>';
|
print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/compta/index.php?mainmenu=accountancy&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("MenuFinancial").'</a></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Projets
|
// Projects
|
||||||
if ($conf->projet->enabled)
|
if ($conf->projet->enabled)
|
||||||
{
|
{
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
@ -279,7 +279,40 @@ class MenuTop {
|
|||||||
print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/mantis/mantis.php?mainmenu=mantis"'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("BugTracker").'</a></td>';
|
print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/mantis/mantis.php?mainmenu=mantis"'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("BugTracker").'</a></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Members
|
// Telephonie
|
||||||
|
if ($conf->telephonie->enabled && $user->rights->telephonie->lire)
|
||||||
|
{
|
||||||
|
$class="";
|
||||||
|
if (ereg("^".DOL_URL_ROOT."\/telephonie\/",$_SERVER["PHP_SELF"]))
|
||||||
|
{
|
||||||
|
$class='class="tmenu" id="sel"';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$class = 'class="tmenu"';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/telephonie/index.php?mainmenu=telephonie"'.($this->atarget?" target=$this->atarget":"").'>Telephonie</a></td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Energie
|
||||||
|
if ($conf->energie->enabled)
|
||||||
|
{
|
||||||
|
$langs->load("energy");
|
||||||
|
$class="";
|
||||||
|
if (ereg("^".DOL_URL_ROOT."\/energie\/",$_SERVER["PHP_SELF"]))
|
||||||
|
{
|
||||||
|
$class='class="tmenu" id="sel"';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$class = 'class="tmenu"';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<td class="tmenu"><a '.$class.' href="'.DOL_URL_ROOT.'/energie/index.php?mainmenu=energie"'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Energy").'</a></td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Members
|
||||||
if ($conf->adherent->enabled)
|
if ($conf->adherent->enabled)
|
||||||
{
|
{
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
|
|||||||
@ -50,6 +50,7 @@ Box=Box
|
|||||||
Boxes=Boxes
|
Boxes=Boxes
|
||||||
PositionByDefault=Default order
|
PositionByDefault=Default order
|
||||||
Position=Order
|
Position=Order
|
||||||
|
MenusDesc=Menus managers define content of the 2 menu bars (horizontal bar and vertical bar).
|
||||||
System=System
|
System=System
|
||||||
SystemInfo=System information
|
SystemInfo=System information
|
||||||
SystemTools=System tools
|
SystemTools=System tools
|
||||||
|
|||||||
@ -50,6 +50,7 @@ Box=Bo
|
|||||||
Boxes=Boîtes
|
Boxes=Boîtes
|
||||||
PositionByDefault=Position par défaut
|
PositionByDefault=Position par défaut
|
||||||
Position=Ordre
|
Position=Ordre
|
||||||
|
MenusDesc=Les gestionnaires de menu définissent le contenu des 2 barres de menus (la barre horizontale et la barre verticale). Il est possible de mettre un gestionnaire différent selon que l'utilisateur soit interne ou externe.
|
||||||
System=Système
|
System=Système
|
||||||
SystemInfo=Infos Système
|
SystemInfo=Infos Système
|
||||||
SystemTools=Outils Système
|
SystemTools=Outils Système
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user