Suite outil edition menus

This commit is contained in:
Laurent Destailleur
2007-06-11 07:29:37 +00:00
parent 910f6b6200
commit 76e1069e77
3 changed files with 62 additions and 11 deletions

View File

@@ -400,20 +400,27 @@ class Conf
if (! $this->global->MAIN_THEME) $this->global->MAIN_THEME="eldy";
$this->theme=$this->global->MAIN_THEME;
$this->css = "theme/".$this->theme."/".$this->theme.".css";
// $this->email_from = email pour envoi par Dolibarr des mails auto (notifications, ...)
$this->notification->email_from="dolibarr-robot@domain.com";
if (defined('NOTIFICATION_EMAIL_FROM'))
// $this->email_from = email pour envoi par dolibarr des mails automatiques
$this->email_from = "dolibarr-robot@domain.com";
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
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, ...
if (defined("MAIN_MAIL_RESIL"))

View File

@@ -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<70>-s<>lectionn<6E>e
* \param htmlname Nom de la zone select
* \param dirmenu Rep<65>rtoire <20> scanner
@@ -549,12 +549,55 @@ class Form
print '</select>';
}
/**
/**
* \brief Retourne la liste d<>roulante des menus disponibles (eldy)
* \param selected Menu pr<70>-s<>lectionn<6E>e
* \param htmlname Nom de la zone select
* \param dirmenu Rep<65>rtoire <20> 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
* \param selected Type pr<70>-s<>lectionn<6E>
* \param htmlname Nom champ formulaire
*/
function select_type_comptes_financiers($selected=1,$htmlname='type')
{
global $langs;

View File

@@ -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/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/const.php", $langs->trans("OtherSetup"));