Move agenda menu into module
This commit is contained in:
parent
86b44f460d
commit
143acdc3f0
@ -693,42 +693,6 @@ function print_left_eldy_menu($db,$menu_array)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Menu AGENDA
|
|
||||||
*/
|
|
||||||
if ($mainmenu == 'agenda')
|
|
||||||
{
|
|
||||||
// Actions
|
|
||||||
if ($conf->agenda->enabled)
|
|
||||||
{
|
|
||||||
$langs->load("agenda");
|
|
||||||
|
|
||||||
// Actions
|
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, ($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create));
|
|
||||||
// Calendar
|
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->myactions->read);
|
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
|
||||||
if ($user->rights->agenda->allactions->read)
|
|
||||||
{
|
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
|
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
|
|
||||||
}
|
|
||||||
// List
|
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
|
||||||
if ($user->rights->agenda->allactions->read)
|
|
||||||
{
|
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
|
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
|
|
||||||
}
|
|
||||||
// Reports
|
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->allactions->read);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Menu PROJETS
|
* Menu PROJETS
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -906,7 +906,8 @@ class DolibarrModules
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if (! $resql)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
if ($this->db->errno() != "DB_ERROR_RECORD_ALREADY_EXISTS") {
|
if ($this->db->errno() != "DB_ERROR_RECORD_ALREADY_EXISTS")
|
||||||
|
{
|
||||||
$this->error=$this->db->lasterror();
|
$this->error=$this->db->lasterror();
|
||||||
dol_syslog("DolibarrModules::insert_permissions error ".$this->error, LOG_ERR);
|
dol_syslog("DolibarrModules::insert_permissions error ".$this->error, LOG_ERR);
|
||||||
$err++;
|
$err++;
|
||||||
|
|||||||
@ -156,7 +156,7 @@ class modAgenda extends DolibarrModules
|
|||||||
'type'=>'top',
|
'type'=>'top',
|
||||||
'titre'=>'Agenda',
|
'titre'=>'Agenda',
|
||||||
'mainmenu'=>'agenda',
|
'mainmenu'=>'agenda',
|
||||||
'leftmenu'=>'0',
|
'leftmenu'=>'1', // Use 1 if you also want to add left menu entries using this descriptor.
|
||||||
'url'=>'/comm/action/index.php',
|
'url'=>'/comm/action/index.php',
|
||||||
'langs'=>'agenda',
|
'langs'=>'agenda',
|
||||||
'position'=>100,
|
'position'=>100,
|
||||||
@ -166,6 +166,192 @@ class modAgenda extends DolibarrModules
|
|||||||
'user'=>0);
|
'user'=>0);
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
|
$this->menu[$r]=array('fk_menu'=>'r=0',
|
||||||
|
'type'=>'left',
|
||||||
|
'titre'=>'Actions',
|
||||||
|
'mainmenu'=>'agenda',
|
||||||
|
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda',
|
||||||
|
'langs'=>'agenda',
|
||||||
|
'position'=>100,
|
||||||
|
'perms'=>'$user->rights->agenda->myactions->read',
|
||||||
|
'enabled'=>'$conf->agenda->enabled',
|
||||||
|
'target'=>'',
|
||||||
|
'user'=>0);
|
||||||
|
$r++;
|
||||||
|
$this->menu[$r]=array('fk_menu'=>'r=1',
|
||||||
|
'type'=>'left',
|
||||||
|
'titre'=>'NewAction',
|
||||||
|
'mainmenu'=>'agenda',
|
||||||
|
'url'=>'/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create',
|
||||||
|
'langs'=>'agenda',
|
||||||
|
'position'=>101,
|
||||||
|
'perms'=>'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)',
|
||||||
|
'enabled'=>'$conf->agenda->enabled',
|
||||||
|
'target'=>'',
|
||||||
|
'user'=>0);
|
||||||
|
$r++;
|
||||||
|
// Calendar
|
||||||
|
$this->menu[$r]=array('fk_menu'=>'r=1',
|
||||||
|
'type'=>'left',
|
||||||
|
'titre'=>'Calendar',
|
||||||
|
'mainmenu'=>'agenda',
|
||||||
|
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda',
|
||||||
|
'langs'=>'agenda',
|
||||||
|
'position'=>102,
|
||||||
|
'perms'=>'$user->rights->agenda->myactions->read',
|
||||||
|
'enabled'=>'$conf->agenda->enabled',
|
||||||
|
'target'=>'',
|
||||||
|
'user'=>0);
|
||||||
|
$r++;
|
||||||
|
$this->menu[$r]=array('fk_menu'=>'r=3',
|
||||||
|
'type'=>'left',
|
||||||
|
'titre'=>'MenuToDoMyActions',
|
||||||
|
'mainmenu'=>'agenda',
|
||||||
|
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine',
|
||||||
|
'langs'=>'agenda',
|
||||||
|
'position'=>103,
|
||||||
|
'perms'=>'$user->rights->agenda->myactions->read',
|
||||||
|
'enabled'=>'$conf->agenda->enabled',
|
||||||
|
'target'=>'',
|
||||||
|
'user'=>0);
|
||||||
|
$r++;
|
||||||
|
$this->menu[$r]=array('fk_menu'=>'r=3',
|
||||||
|
'type'=>'left',
|
||||||
|
'titre'=>'MenuDoneMyActions',
|
||||||
|
'mainmenu'=>'agenda',
|
||||||
|
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine',
|
||||||
|
'langs'=>'agenda',
|
||||||
|
'position'=>104,
|
||||||
|
'perms'=>'$user->rights->agenda->myactions->read',
|
||||||
|
'enabled'=>'$conf->agenda->enabled',
|
||||||
|
'target'=>'',
|
||||||
|
'user'=>0);
|
||||||
|
$r++;
|
||||||
|
$this->menu[$r]=array('fk_menu'=>'r=3',
|
||||||
|
'type'=>'left',
|
||||||
|
'titre'=>'MenuToDoActions',
|
||||||
|
'mainmenu'=>'agenda',
|
||||||
|
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo',
|
||||||
|
'langs'=>'agenda',
|
||||||
|
'position'=>105,
|
||||||
|
'perms'=>'$user->rights->agenda->allactions->read',
|
||||||
|
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||||
|
'target'=>'',
|
||||||
|
'user'=>0);
|
||||||
|
$r++;
|
||||||
|
$this->menu[$r]=array('fk_menu'=>'r=3',
|
||||||
|
'type'=>'left',
|
||||||
|
'titre'=>'MenuDoneActions',
|
||||||
|
'mainmenu'=>'agenda',
|
||||||
|
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done',
|
||||||
|
'langs'=>'agenda',
|
||||||
|
'position'=>106,
|
||||||
|
'perms'=>'$user->rights->agenda->allactions->read',
|
||||||
|
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||||
|
'target'=>'',
|
||||||
|
'user'=>0);
|
||||||
|
$r++;
|
||||||
|
// List
|
||||||
|
$this->menu[$r]=array('fk_menu'=>'r=1',
|
||||||
|
'type'=>'left',
|
||||||
|
'titre'=>'List',
|
||||||
|
'mainmenu'=>'agenda',
|
||||||
|
'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda',
|
||||||
|
'langs'=>'agenda',
|
||||||
|
'position'=>112,
|
||||||
|
'perms'=>'$user->rights->agenda->myactions->read',
|
||||||
|
'enabled'=>'$conf->agenda->enabled',
|
||||||
|
'target'=>'',
|
||||||
|
'user'=>0);
|
||||||
|
$r++;
|
||||||
|
$this->menu[$r]=array('fk_menu'=>'r=8',
|
||||||
|
'type'=>'left',
|
||||||
|
'titre'=>'MenuToDoMyActions',
|
||||||
|
'mainmenu'=>'agenda',
|
||||||
|
'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine',
|
||||||
|
'langs'=>'agenda',
|
||||||
|
'position'=>113,
|
||||||
|
'perms'=>'$user->rights->agenda->myactions->read',
|
||||||
|
'enabled'=>'$conf->agenda->enabled',
|
||||||
|
'target'=>'',
|
||||||
|
'user'=>0);
|
||||||
|
$r++;
|
||||||
|
$this->menu[$r]=array('fk_menu'=>'r=8',
|
||||||
|
'type'=>'left',
|
||||||
|
'titre'=>'MenuDoneMyActions',
|
||||||
|
'mainmenu'=>'agenda',
|
||||||
|
'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine',
|
||||||
|
'langs'=>'agenda',
|
||||||
|
'position'=>114,
|
||||||
|
'perms'=>'$user->rights->agenda->myactions->read',
|
||||||
|
'enabled'=>'$conf->agenda->enabled',
|
||||||
|
'target'=>'',
|
||||||
|
'user'=>0);
|
||||||
|
$r++;
|
||||||
|
$this->menu[$r]=array('fk_menu'=>'r=8',
|
||||||
|
'type'=>'left',
|
||||||
|
'titre'=>'MenuToDoActions',
|
||||||
|
'mainmenu'=>'agenda',
|
||||||
|
'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo',
|
||||||
|
'langs'=>'agenda',
|
||||||
|
'position'=>115,
|
||||||
|
'perms'=>'$user->rights->agenda->allactions->read',
|
||||||
|
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||||
|
'target'=>'',
|
||||||
|
'user'=>0);
|
||||||
|
$r++;
|
||||||
|
$this->menu[$r]=array('fk_menu'=>'r=8',
|
||||||
|
'type'=>'left',
|
||||||
|
'titre'=>'MenuDoneActions',
|
||||||
|
'mainmenu'=>'agenda',
|
||||||
|
'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done',
|
||||||
|
'langs'=>'agenda',
|
||||||
|
'position'=>116,
|
||||||
|
'perms'=>'$user->rights->agenda->allactions->read',
|
||||||
|
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||||
|
'target'=>'',
|
||||||
|
'user'=>0);
|
||||||
|
$r++;
|
||||||
|
// Reports
|
||||||
|
$this->menu[$r]=array('fk_menu'=>'r=1',
|
||||||
|
'type'=>'left',
|
||||||
|
'titre'=>'Reportings',
|
||||||
|
'mainmenu'=>'agenda',
|
||||||
|
'url'=>'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda',
|
||||||
|
'langs'=>'agenda',
|
||||||
|
'position'=>120,
|
||||||
|
'perms'=>'$user->rights->agenda->allactions->read',
|
||||||
|
'enabled'=>'$conf->agenda->enabled',
|
||||||
|
'target'=>'',
|
||||||
|
'user'=>0);
|
||||||
|
$r++;
|
||||||
|
/*$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||||
|
$newmenu->add(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, ($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create));
|
||||||
|
// Calendar
|
||||||
|
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->myactions->read);
|
||||||
|
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||||
|
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||||
|
if ($user->rights->agenda->allactions->read)
|
||||||
|
{
|
||||||
|
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
|
||||||
|
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
|
||||||
|
}
|
||||||
|
|
||||||
|
// List
|
||||||
|
$newmenu->add(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||||
|
$newmenu->add(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||||
|
$newmenu->add(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||||
|
if ($user->rights->agenda->allactions->read)
|
||||||
|
{
|
||||||
|
$newmenu->add(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
|
||||||
|
$newmenu->add(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reports
|
||||||
|
$newmenu->add(DOL_URL_ROOT."/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->allactions->read);
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
// Exports
|
// Exports
|
||||||
//--------
|
//--------
|
||||||
$r=0;
|
$r=0;
|
||||||
|
|||||||
@ -737,109 +737,6 @@ if (! function_exists("llxHeader"))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Show an HTML header + a BODY + The top menu bar
|
|
||||||
* \param head Lines in the HEAD
|
|
||||||
* \param title Title of web page
|
|
||||||
* \param target Target to use in menu links
|
|
||||||
* \param disablejs Do not output links to js (Ex: qd fonction utilisee par sous formulaire Ajax)
|
|
||||||
* \param disablehead Do not output head section
|
|
||||||
* \param arrayofjs Array of js files to add in header
|
|
||||||
* \param arrayofcss Array of css files to add in header
|
|
||||||
*/
|
|
||||||
function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='')
|
|
||||||
{
|
|
||||||
global $user, $conf, $langs, $db, $dolibarr_main_authentication;
|
|
||||||
|
|
||||||
if (! $conf->top_menu) $conf->top_menu ='eldy_backoffice.php';
|
|
||||||
if (! $conf->left_menu) $conf->left_menu='eldy_backoffice.php';
|
|
||||||
|
|
||||||
print '<body id="mainbody"><div id="dhtmltooltip"></div>';
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Top menu
|
|
||||||
*/
|
|
||||||
print "\n".'<!-- Start top horizontal menu -->'."\n";
|
|
||||||
print '<div class="tmenu">'."\n";
|
|
||||||
|
|
||||||
// Load the top menu manager
|
|
||||||
$result=@include_once(DOL_DOCUMENT_ROOT ."/includes/menus/barre_top/".$conf->top_menu);
|
|
||||||
if (! $result) // If failed to include, we try with standard
|
|
||||||
{
|
|
||||||
$conf->top_menu='eldy_backoffice.php';
|
|
||||||
include_once(DOL_DOCUMENT_ROOT ."/includes/menus/barre_top/".$conf->top_menu);
|
|
||||||
}
|
|
||||||
$menutop = new MenuTop($db);
|
|
||||||
$menutop->atarget=$target;
|
|
||||||
|
|
||||||
// Affiche le menu
|
|
||||||
$menutop->showmenu();
|
|
||||||
|
|
||||||
// Link to login card
|
|
||||||
print '<a class="login" href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$user->id.'"';
|
|
||||||
print $menutop->atarget?(' target="'.$menutop->atarget.'"'):'';
|
|
||||||
print '>'.$user->login.'</a>';
|
|
||||||
|
|
||||||
// Link info
|
|
||||||
$htmltext=''; $text='';
|
|
||||||
if ($_SESSION["dol_authmode"] != 'forceuser'
|
|
||||||
&& $_SESSION["dol_authmode"] != 'http')
|
|
||||||
{
|
|
||||||
$htmltext=$langs->trans("Logout").'<br>';
|
|
||||||
$htmltext.="<br>";
|
|
||||||
|
|
||||||
$text.='<a href="'.DOL_URL_ROOT.'/user/logout.php"';
|
|
||||||
$text.=$menutop->atarget?(' target="'.$menutop->atarget.'"'):'';
|
|
||||||
$text.='>';
|
|
||||||
$text.='<img class="login" border="0" width="14" height="14" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/logout.png"';
|
|
||||||
$text.=' alt="'.dol_escape_htmltag($langs->trans("Logout")).'" title=""';
|
|
||||||
$text.='>';
|
|
||||||
$text.='</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$text.='<img class="login" border="0" width="14" height="14" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/logout.png"';
|
|
||||||
$text.=' alt="'.dol_escape_htmltag($langs->trans("Logout")).'" title=""';
|
|
||||||
$text.='>';
|
|
||||||
}
|
|
||||||
$htmltext.='<u>'.$langs->trans("User").'</u>';
|
|
||||||
$htmltext.='<br><b>'.$langs->trans("Name").'</b>: '.$user->fullname;
|
|
||||||
$htmltext.='<br><b>'.$langs->trans("Login").'</b>: '.$user->login;
|
|
||||||
$htmltext.='<br><b>'.$langs->trans("Administrator").'</b>: '.yn($user->admin);
|
|
||||||
$htmltext.='<br><b>'.$langs->trans("Type").'</b>: '.($user->societe_id?$langs->trans("External"):$langs->trans("Internal"));
|
|
||||||
$htmltext.='<br>';
|
|
||||||
$htmltext.='<br><u>'.$langs->trans("Connection").'</u>';
|
|
||||||
if ($conf->global->MAIN_MODULE_MULTICOMPANY) $htmltext.='<br><b>'.$langs->trans("ConnectedOnMultiCompany").'</b>: '.$conf->entity.' (user entity '.$user->entity.')';
|
|
||||||
$htmltext.='<br><b>'.$langs->trans("ConnectedSince").'</b>: '.dol_print_date($user->datelastlogin,"dayhour");
|
|
||||||
$htmltext.='<br><b>'.$langs->trans("PreviousConnexion").'</b>: '.dol_print_date($user->datepreviouslogin,"dayhour");
|
|
||||||
$htmltext.='<br><b>'.$langs->trans("AuthenticationMode").'</b>: '.$_SESSION["dol_authmode"];
|
|
||||||
$htmltext.='<br><b>'.$langs->trans("CurrentTheme").'</b>: '.$conf->theme;
|
|
||||||
$htmltext.='<br><b>'.$langs->trans("CurrentUserLanguage").'</b>: '.$langs->getDefaultLang();
|
|
||||||
$htmltext.='<br><b>'.$langs->trans("Browser").'</b>: '.$conf->browser->name.' ('.$_SERVER['HTTP_USER_AGENT'].')';
|
|
||||||
if (! empty($conf->browser->phone)) $htmltext.='<br><b>'.$langs->trans("Phone").'</b>: '.$conf->browser->phone;
|
|
||||||
|
|
||||||
if (! empty($_SESSION["disablemodules"])) $htmltext.='<br><b>'.$langs->trans("DisabledModules").'</b>: <br>'.join('<br>',explode(',',$_SESSION["disablemodules"]));
|
|
||||||
|
|
||||||
// print '<img class="login" border="0" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/logout.png"';
|
|
||||||
// print ' alt="'.$title.'" title="'.$title.'"';
|
|
||||||
// print '>';
|
|
||||||
$html=new Form($db);
|
|
||||||
print $html->textwithtooltip('',$htmltext,2,1,$text);
|
|
||||||
|
|
||||||
// Link to print main content area
|
|
||||||
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->browser->phone))
|
|
||||||
{
|
|
||||||
$text ='<a href="'.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].'&optioncss=print" target="_blank">';
|
|
||||||
$text.='<img class="printer" border="0" width="14" height="14" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/printer.png"';
|
|
||||||
$text.=' title="'.dol_escape_htmltag($langs->trans("PrintContentArea")).'" alt="'.dol_escape_htmltag($langs->trans("PrintContentArea")).'">';
|
|
||||||
$text.='</a>';
|
|
||||||
print $text;
|
|
||||||
}
|
|
||||||
|
|
||||||
print "\n</div>\n<!-- End top horizontal menu -->\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Show HTML header
|
* \brief Show HTML header
|
||||||
* \param head Optionnal head lines
|
* \param head Optionnal head lines
|
||||||
@ -881,7 +778,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
else print "<title>".$appli."</title>";
|
else print "<title>".$appli."</title>";
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
// Output style sheets
|
// Output style sheets (optioncss='print' or '')
|
||||||
print '<link rel="stylesheet" type="text/css" title="default" href="'.DOL_URL_ROOT.$conf->css.'?lang='.$langs->defaultlang.(! empty($_GET["optioncss"])?'&optioncss='.$_GET["optioncss"]:'').'">'."\n";
|
print '<link rel="stylesheet" type="text/css" title="default" href="'.DOL_URL_ROOT.$conf->css.'?lang='.$langs->defaultlang.(! empty($_GET["optioncss"])?'&optioncss='.$_GET["optioncss"]:'').'">'."\n";
|
||||||
// CSS forced by modules (relative url starting with /)
|
// CSS forced by modules (relative url starting with /)
|
||||||
if (is_array($conf->css_modules))
|
if (is_array($conf->css_modules))
|
||||||
@ -996,6 +893,109 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Show an HTML header + a BODY + The top menu bar
|
||||||
|
* \param head Lines in the HEAD
|
||||||
|
* \param title Title of web page
|
||||||
|
* \param target Target to use in menu links
|
||||||
|
* \param disablejs Do not output links to js (Ex: qd fonction utilisee par sous formulaire Ajax)
|
||||||
|
* \param disablehead Do not output head section
|
||||||
|
* \param arrayofjs Array of js files to add in header
|
||||||
|
* \param arrayofcss Array of css files to add in header
|
||||||
|
*/
|
||||||
|
function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='')
|
||||||
|
{
|
||||||
|
global $user, $conf, $langs, $db, $dolibarr_main_authentication;
|
||||||
|
|
||||||
|
if (! $conf->top_menu) $conf->top_menu ='eldy_backoffice.php';
|
||||||
|
if (! $conf->left_menu) $conf->left_menu='eldy_backoffice.php';
|
||||||
|
|
||||||
|
print '<body id="mainbody"><div id="dhtmltooltip"></div>';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Top menu
|
||||||
|
*/
|
||||||
|
print "\n".'<!-- Start top horizontal menu -->'."\n";
|
||||||
|
print '<div class="tmenu">'."\n";
|
||||||
|
|
||||||
|
// Load the top menu manager
|
||||||
|
$result=@include_once(DOL_DOCUMENT_ROOT ."/includes/menus/barre_top/".$conf->top_menu);
|
||||||
|
if (! $result) // If failed to include, we try with standard
|
||||||
|
{
|
||||||
|
$conf->top_menu='eldy_backoffice.php';
|
||||||
|
include_once(DOL_DOCUMENT_ROOT ."/includes/menus/barre_top/".$conf->top_menu);
|
||||||
|
}
|
||||||
|
$menutop = new MenuTop($db);
|
||||||
|
$menutop->atarget=$target;
|
||||||
|
|
||||||
|
// Affiche le menu
|
||||||
|
$menutop->showmenu();
|
||||||
|
|
||||||
|
// Link to login card
|
||||||
|
print '<a class="login" href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$user->id.'"';
|
||||||
|
print $menutop->atarget?(' target="'.$menutop->atarget.'"'):'';
|
||||||
|
print '>'.$user->login.'</a>';
|
||||||
|
|
||||||
|
// Link info
|
||||||
|
$htmltext=''; $text='';
|
||||||
|
if ($_SESSION["dol_authmode"] != 'forceuser'
|
||||||
|
&& $_SESSION["dol_authmode"] != 'http')
|
||||||
|
{
|
||||||
|
$htmltext=$langs->trans("Logout").'<br>';
|
||||||
|
$htmltext.="<br>";
|
||||||
|
|
||||||
|
$text.='<a href="'.DOL_URL_ROOT.'/user/logout.php"';
|
||||||
|
$text.=$menutop->atarget?(' target="'.$menutop->atarget.'"'):'';
|
||||||
|
$text.='>';
|
||||||
|
$text.='<img class="login" border="0" width="14" height="14" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/logout.png"';
|
||||||
|
$text.=' alt="'.dol_escape_htmltag($langs->trans("Logout")).'" title=""';
|
||||||
|
$text.='>';
|
||||||
|
$text.='</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$text.='<img class="login" border="0" width="14" height="14" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/logout.png"';
|
||||||
|
$text.=' alt="'.dol_escape_htmltag($langs->trans("Logout")).'" title=""';
|
||||||
|
$text.='>';
|
||||||
|
}
|
||||||
|
$htmltext.='<u>'.$langs->trans("User").'</u>';
|
||||||
|
$htmltext.='<br><b>'.$langs->trans("Name").'</b>: '.$user->fullname;
|
||||||
|
$htmltext.='<br><b>'.$langs->trans("Login").'</b>: '.$user->login;
|
||||||
|
$htmltext.='<br><b>'.$langs->trans("Administrator").'</b>: '.yn($user->admin);
|
||||||
|
$htmltext.='<br><b>'.$langs->trans("Type").'</b>: '.($user->societe_id?$langs->trans("External"):$langs->trans("Internal"));
|
||||||
|
$htmltext.='<br>';
|
||||||
|
$htmltext.='<br><u>'.$langs->trans("Connection").'</u>';
|
||||||
|
if ($conf->global->MAIN_MODULE_MULTICOMPANY) $htmltext.='<br><b>'.$langs->trans("ConnectedOnMultiCompany").'</b>: '.$conf->entity.' (user entity '.$user->entity.')';
|
||||||
|
$htmltext.='<br><b>'.$langs->trans("ConnectedSince").'</b>: '.dol_print_date($user->datelastlogin,"dayhour");
|
||||||
|
$htmltext.='<br><b>'.$langs->trans("PreviousConnexion").'</b>: '.dol_print_date($user->datepreviouslogin,"dayhour");
|
||||||
|
$htmltext.='<br><b>'.$langs->trans("AuthenticationMode").'</b>: '.$_SESSION["dol_authmode"];
|
||||||
|
$htmltext.='<br><b>'.$langs->trans("CurrentTheme").'</b>: '.$conf->theme;
|
||||||
|
$htmltext.='<br><b>'.$langs->trans("CurrentUserLanguage").'</b>: '.$langs->getDefaultLang();
|
||||||
|
$htmltext.='<br><b>'.$langs->trans("Browser").'</b>: '.$conf->browser->name.' ('.$_SERVER['HTTP_USER_AGENT'].')';
|
||||||
|
if (! empty($conf->browser->phone)) $htmltext.='<br><b>'.$langs->trans("Phone").'</b>: '.$conf->browser->phone;
|
||||||
|
|
||||||
|
if (! empty($_SESSION["disablemodules"])) $htmltext.='<br><b>'.$langs->trans("DisabledModules").'</b>: <br>'.join('<br>',explode(',',$_SESSION["disablemodules"]));
|
||||||
|
|
||||||
|
// print '<img class="login" border="0" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/logout.png"';
|
||||||
|
// print ' alt="'.$title.'" title="'.$title.'"';
|
||||||
|
// print '>';
|
||||||
|
$html=new Form($db);
|
||||||
|
print $html->textwithtooltip('',$htmltext,2,1,$text);
|
||||||
|
|
||||||
|
// Link to print main content area
|
||||||
|
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->browser->phone))
|
||||||
|
{
|
||||||
|
$text ='<a href="'.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].'&optioncss=print" target="_blank">';
|
||||||
|
$text.='<img class="printer" border="0" width="14" height="14" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/printer.png"';
|
||||||
|
$text.=' title="'.dol_escape_htmltag($langs->trans("PrintContentArea")).'" alt="'.dol_escape_htmltag($langs->trans("PrintContentArea")).'">';
|
||||||
|
$text.='</a>';
|
||||||
|
print $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
print "\n</div>\n<!-- End top horizontal menu -->\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Show left menu bar
|
* \brief Show left menu bar
|
||||||
* \param menu_array Table menu entries
|
* \param menu_array Table menu entries
|
||||||
|
|||||||
@ -367,20 +367,20 @@ a.tmenusel:active
|
|||||||
width:40px;
|
width:40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.tmenu {
|
ul.tmenu { /* t r b l */
|
||||||
padding: 0px 0px 10px 0px;
|
padding: 0px 0px 10px 0px;
|
||||||
margin: 3px 0px 0px 6px;
|
margin: 0px 0px 0px 6px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
li.tmenu {
|
li.tmenu {
|
||||||
|
<?php print $minwidthtmenu?'width: '.$minwidthtmenu.'px;':''; ?>
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: bottom;
|
||||||
float: <?php print $left; ?>;
|
float: <?php print $left; ?>;
|
||||||
padding-left:5px;
|
height: <?php print $heightmenu; ?>px;
|
||||||
padding-right:5px;
|
|
||||||
padding-top: 2px;
|
|
||||||
height: 18px;
|
|
||||||
position:relative;
|
position:relative;
|
||||||
display: block;
|
display: block;
|
||||||
padding: 0px 0px 0px 0px;
|
padding: 2px 5px 0px 5px;
|
||||||
margin: 0px 0px 0px 0px;
|
margin: 0px 0px 0px 0px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user