Suite outil edition menus
This commit is contained in:
parent
910f6b6200
commit
76e1069e77
@ -400,20 +400,27 @@ class Conf
|
|||||||
if (! $this->global->MAIN_THEME) $this->global->MAIN_THEME="eldy";
|
if (! $this->global->MAIN_THEME) $this->global->MAIN_THEME="eldy";
|
||||||
$this->theme=$this->global->MAIN_THEME;
|
$this->theme=$this->global->MAIN_THEME;
|
||||||
$this->css = "theme/".$this->theme."/".$this->theme.".css";
|
$this->css = "theme/".$this->theme."/".$this->theme.".css";
|
||||||
|
|
||||||
// $this->email_from = email pour envoi par Dolibarr des mails auto (notifications, ...)
|
// $this->email_from = email pour envoi par dolibarr des mails automatiques
|
||||||
$this->notification->email_from="dolibarr-robot@domain.com";
|
$this->email_from = "dolibarr-robot@domain.com";
|
||||||
if (defined('NOTIFICATION_EMAIL_FROM'))
|
if ($conf->global->MAIN_MAIL_EMAIL_FROM)
|
||||||
{
|
{
|
||||||
$this->notification->email_from=NOTIFICATION_EMAIL_FROM;
|
$this->email_from = $conf->global->MAIN_MAIL_EMAIL_FROM;
|
||||||
|
}
|
||||||
|
|
||||||
|
// $this->notification->email_from = email pour envoi par Dolibarr des notifications
|
||||||
|
$this->notification->email_from=$conf->global->MAIN_MAIL_EMAIL_FROM;
|
||||||
|
if ($conf->global->NOTIFICATION_EMAIL_FROM)
|
||||||
|
{
|
||||||
|
$this->mailing->email_from=$conf->global->NOTIFICATION_EMAIL_FROM;
|
||||||
}
|
}
|
||||||
|
|
||||||
// $this->mailing->email_from = email pour envoi par Dolibarr des mailings
|
// $this->mailing->email_from = email pour envoi par Dolibarr des mailings
|
||||||
if (defined('MAILING_EMAIL_FROM'))
|
$this->mailing->email_from=$conf->global->MAIN_MAIL_EMAIL_FROM;
|
||||||
|
if ($conf->global->MAILING_EMAIL_FROM)
|
||||||
{
|
{
|
||||||
$this->mailing->email_from=MAILING_EMAIL_FROM;
|
$this->mailing->email_from=$conf->global->MAILING_EMAIL_FROM;
|
||||||
}
|
}
|
||||||
else $this->mailing->email_from=$this->email_from;
|
|
||||||
|
|
||||||
// $this->adherent->email_resil, ...
|
// $this->adherent->email_resil, ...
|
||||||
if (defined("MAIN_MAIL_RESIL"))
|
if (defined("MAIN_MAIL_RESIL"))
|
||||||
|
|||||||
@ -491,7 +491,7 @@ class Form
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Retourne la liste déroulante des menus disponibles
|
* \brief Retourne la liste déroulante des menus disponibles (eldy_backoffice, ...)
|
||||||
* \param selected Menu pré-sélectionnée
|
* \param selected Menu pré-sélectionnée
|
||||||
* \param htmlname Nom de la zone select
|
* \param htmlname Nom de la zone select
|
||||||
* \param dirmenu Repértoire à scanner
|
* \param dirmenu Repértoire à scanner
|
||||||
@ -549,12 +549,55 @@ class Form
|
|||||||
print '</select>';
|
print '</select>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* \brief Retourne la liste déroulante des menus disponibles (eldy)
|
||||||
|
* \param selected Menu pré-sélectionnée
|
||||||
|
* \param htmlname Nom de la zone select
|
||||||
|
* \param dirmenu Repértoire à scanner
|
||||||
|
*/
|
||||||
|
function select_menu_families($selected='',$htmlname,$dirmenu)
|
||||||
|
{
|
||||||
|
global $langs,$conf;
|
||||||
|
|
||||||
|
$menuarray=array();
|
||||||
|
$handle=opendir($dirmenu);
|
||||||
|
while (($file = readdir($handle))!==false)
|
||||||
|
{
|
||||||
|
if (is_file($dirmenu."/".$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
|
||||||
|
{
|
||||||
|
$filelib=eregi_replace('(_backoffice|_frontoffice)?\.php$','',$file);
|
||||||
|
if (eregi('^default',$filelib)) continue;
|
||||||
|
if (eregi('^empty',$filelib)) continue;
|
||||||
|
|
||||||
|
$menuarray[$filelib]=1;
|
||||||
|
}
|
||||||
|
$menuarray['all']=1;
|
||||||
|
}
|
||||||
|
ksort($menuarray);
|
||||||
|
|
||||||
|
// Affichage liste deroulante des menus
|
||||||
|
print '<select class="flat" name="'.$htmlname.'">';
|
||||||
|
$oldprefix='';
|
||||||
|
foreach ($menuarray as $key => $val)
|
||||||
|
{
|
||||||
|
$tab=split('_',$key);
|
||||||
|
$newprefix=$tab[0];
|
||||||
|
print '<option value="'.$key.'"';
|
||||||
|
if ($key == $selected)
|
||||||
|
{
|
||||||
|
print ' selected="true"';
|
||||||
|
}
|
||||||
|
print '>'.$key.'</option>'."\n";
|
||||||
|
}
|
||||||
|
print '</select>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
* \brief Retourne la liste des types de comptes financiers
|
* \brief Retourne la liste des types de comptes financiers
|
||||||
* \param selected Type pré-sélectionné
|
* \param selected Type pré-sélectionné
|
||||||
* \param htmlname Nom champ formulaire
|
* \param htmlname Nom champ formulaire
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function select_type_comptes_financiers($selected=1,$htmlname='type')
|
function select_type_comptes_financiers($selected=1,$htmlname='type')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|||||||
@ -134,6 +134,7 @@ class MenuLeft {
|
|||||||
|
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/triggers.php", $langs->trans("Triggers"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/triggers.php", $langs->trans("Triggers"));
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/perms.php", $langs->trans("Security"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/perms.php", $langs->trans("Security"));
|
||||||
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/mails.php", $langs->trans("EMails"));
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/dict.php", $langs->trans("DictionnarySetup"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/dict.php", $langs->trans("DictionnarySetup"));
|
||||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/const.php", $langs->trans("OtherSetup"));
|
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/const.php", $langs->trans("OtherSetup"));
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user