New: Add weather on dashboard

This commit is contained in:
Laurent Destailleur 2010-11-13 16:59:53 +00:00
parent e3ed3516b1
commit aac8e6f437
8 changed files with 369 additions and 369 deletions

View File

@ -3,6 +3,7 @@ English Dolibarr ChangeLog
***** ChangeLog for 3.0 compared to 2.9 ***** ***** ChangeLog for 3.0 compared to 2.9 *****
For users: For users:
- New: Add a weather on dashboard
- New: Add a Paypal module - New: Add a Paypal module
- New: Can choose third party to use in point of sale module during logon. - New: Can choose third party to use in point of sale module during logon.
- New: A lot of enhancements into ECM module: - New: A lot of enhancements into ECM module:

View File

@ -280,6 +280,36 @@ else
} }
// Show logo for weather
print $langs->trans("DescWeather").'<br>';
$offset=0;
$cursor=10; // By default
//if (! empty($conf->global->MAIN_METEO_OFFSET)) $offset=$conf->global->MAIN_METEO_OFFSET;
//if (! empty($conf->global->MAIN_METEO_GAP)) $cursor=$conf->global->MAIN_METEO_GAP;
$level0=$offset; if (! empty($conf->global->MAIN_METEO_LEVEL0)) $level0=$conf->global->MAIN_METEO_LEVEL0;
$level1=$offset+1*$cursor; if (! empty($conf->global->MAIN_METEO_LEVEL1)) $level1=$conf->global->MAIN_METEO_LEVEL1;
$level2=$offset+2*$cursor; if (! empty($conf->global->MAIN_METEO_LEVEL2)) $level2=$conf->global->MAIN_METEO_LEVEL2;
$level3=$offset+3*$cursor; if (! empty($conf->global->MAIN_METEO_LEVEL3)) $level3=$conf->global->MAIN_METEO_LEVEL3;
$text=''; $options='height="64px"';
print '<table>';
print '<tr><td>';
print img_picto_common($text,'weather/weather-clear.png',$options);
print '</td><td><= '.$level0.'</td></tr>';
print '<tr><td>';
print img_picto_common($text,'weather/weather-few-clouds.png',$options);
print '</td><td><= '.$level1.'</td></tr>';
print '<tr><td>';
print img_picto_common($text,'weather/weather-clouds.png',$options);
print '</td><td><= '.$level2.'</td></tr>';
print '<tr><td>';
print img_picto_common($text,'weather/weather-many-clouds.png',$options);
print '</td><td><= '.$level3.'</td></tr>';
print '<tr><td>';
print img_picto_common($text,'weather/weather-storm.png',$options);
print '</td><td>> '.$level3.'</td></tr>';
$db->close(); $db->close();

View File

@ -258,8 +258,12 @@ print '</td><td width="65%" valign="top" class="notopnoleftnoright">';
/* /*
* Dolibarr Working Board * Dolibarr Working Board with weather
*/ */
$showweather=1;
$rowspan=0;
$dashboardlines=array();
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("DolibarrWorkBoard").'</td>'; print '<td colspan="2">'.$langs->trans("DolibarrWorkBoard").'</td>';
@ -267,16 +271,15 @@ print '<td align="right">'.$langs->trans("Number").'</td>';
print '<td align="right">'.$langs->trans("Late").'</td>'; print '<td align="right">'.$langs->trans("Late").'</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td width="20">&nbsp;</td>'; print '<td width="20">&nbsp;</td>';
if ($showweather) print '<td width="80">&nbsp;</td>';
print '</tr>'; print '</tr>';
$nboflate=0;
$var=true;
// //
// Do not include sections without management permission // Do not include sections without management permission
// //
// Number actions to do (late) // Number of actions to do (late)
if ($conf->agenda->enabled && $user->rights->agenda->myactions->read) if ($conf->agenda->enabled && $user->rights->agenda->myactions->read)
{ {
include_once(DOL_DOCUMENT_ROOT."/comm/action/class/actioncomm.class.php"); include_once(DOL_DOCUMENT_ROOT."/comm/action/class/actioncomm.class.php");
@ -284,49 +287,27 @@ if ($conf->agenda->enabled && $user->rights->agenda->myactions->read)
$board->load_board($user); $board->load_board($user);
$board->warning_delay=$conf->actions->warning_delay/60/60/24; $board->warning_delay=$conf->actions->warning_delay/60/60/24;
$board->label=$langs->trans("ActionsToDo"); $board->label=$langs->trans("ActionsToDo");
$board->url=DOL_URL_ROOT.'/comm/action/listactions.php?status=todo&mainmenu=agenda';
$var=!$var; $board->img=img_object($langs->trans("Actions"),"task");
print '<tr '.$bc[$var].'><td width="16">'.img_object($langs->trans("Actions"),"task").'</td><td>'.$board->label.'</td>'; $rowspan++;
print '<td align="right"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=todo">'.$board->nbtodo.'</a></td>'; $dashboardlines[]=$board;
print '<td align="right">';
print '<a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=todo">';
print $board->nbtodolate;
print '</a></td><td nowrap align="right">';
print ' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')';
print '</td>';
print '<td>';
if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print '&nbsp;';
print '</td>';
print '</tr>';
print "\n";
} }
// Number customer orders a deal // Number of customer orders a deal
if ($conf->commande->enabled && $user->rights->commande->lire) if ($conf->commande->enabled && $user->rights->commande->lire)
{ {
include_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php"); include_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
$board=new Commande($db); $board=new Commande($db);
$board->load_board($user); $board->load_board($user);
$board->warning_delay=$conf->commande->traitement->warning_delay/60/60/24;
$var=!$var; $board->label=$langs->trans("OrdersToProcess");
print '<tr '.$bc[$var].'><td width="16">'.img_object($langs->trans("Orders"),"order").'</td><td>'.$langs->trans("OrdersToProcess").'</td>'; $board->url=DOL_URL_ROOT.'/commande/liste.php?viewstatut=-2';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/commande/liste.php?viewstatut=-2">'.$board->nbtodo.'</a></td>'; $board->img=img_object($langs->trans("Orders"),"order");
print '<td align="right">'; $rowspan++;
print '<a href="'.DOL_URL_ROOT.'/commande/liste.php?viewstatut=-2">'; $dashboardlines[]=$board;
print $board->nbtodolate;
print '</a></td><td nowrap align="right">';
print ' (>'.ceil($conf->commande->traitement->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '</td>';
print '<td>';
if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print '&nbsp;';
print '</td>';
print '</tr>';
print "\n";
} }
// Number propale open (expired) // Number of commercial proposals opened (expired)
if ($conf->propal->enabled && $user->rights->propale->lire) if ($conf->propal->enabled && $user->rights->propale->lire)
{ {
$langs->load("propal"); $langs->load("propal");
@ -334,24 +315,15 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
include_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php"); include_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
$board=new Propal($db); $board=new Propal($db);
$board->load_board($user,"opened"); $board->load_board($user,"opened");
$board->warning_delay=$conf->propal->cloture->warning_delay/60/60/24;
$var=!$var; $board->label=$langs->trans("PropalsToClose");
print '<tr '.$bc[$var].'><td width="16">'.img_object($langs->trans("Propals"),"propal").'</td><td>'.$langs->trans("PropalsToClose").'</td>'; $board->url=DOL_URL_ROOT.'/comm/propal.php?viewstatut=1';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/comm/propal.php?viewstatut=1">'.$board->nbtodo.'</a></td>'; $board->img=img_object($langs->trans("Propals"),"propal");
print '<td align="right">'; $rowspan++;
print '<a href="'.DOL_URL_ROOT.'/comm/propal.php?viewstatut=1">'; $dashboardlines[]=$board;
print $board->nbtodolate;
print '</a></td><td nowrap align="right">';
print ' (>'.ceil($conf->propal->cloture->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '</td>';
print '<td>';
if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print '&nbsp;';
print '</td>';
print '</tr>';
} }
// Number propale CLOSED signed (billed) // Number of commercial proposals CLOSED signed (billed)
if ($conf->propal->enabled && $user->rights->propale->lire) if ($conf->propal->enabled && $user->rights->propale->lire)
{ {
$langs->load("propal"); $langs->load("propal");
@ -359,25 +331,15 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
include_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php"); include_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
$board=new Propal($db); $board=new Propal($db);
$board->load_board($user,"signed"); $board->load_board($user,"signed");
$board->warning_delay=$conf->propal->facturation->warning_delay/60/60/24;
$var=!$var; $board->label=$langs->trans("PropalsToBill");
print '<tr '.$bc[$var].'><td width="16">'.img_object($langs->trans("Propals"),"propal").'</td><td>'.$langs->trans("PropalsToBill").'</td>'; $board->url=DOL_URL_ROOT.'/comm/propal.php?viewstatut=2';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/comm/propal.php?viewstatut=2">'.$board->nbtodo.'</a></td>'; $board->img=img_object($langs->trans("Propals"),"propal");
print '<td align="right">'; $rowspan++;
print '<a href="'.DOL_URL_ROOT.'/comm/propal.php?viewstatut=2">'; $dashboardlines[]=$board;
print $board->nbtodolate;
print '</a></td><td nowrap align="right">';
print ' (>'.ceil($conf->propal->facturation->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '</td>';
print '<td>';
if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print '&nbsp;';
print '</td>';
print '</tr>';
print "\n";
} }
// Number services is enabled (delayed) // Number of services enabled (delayed)
if ($conf->contrat->enabled && $user->rights->contrat->lire) if ($conf->contrat->enabled && $user->rights->contrat->lire)
{ {
$langs->load("contracts"); $langs->load("contracts");
@ -385,22 +347,12 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire)
include_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"); include_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php");
$board=new Contrat($db); $board=new Contrat($db);
$board->load_board($user,"inactives"); $board->load_board($user,"inactives");
$board->warning_delay=$conf->contrat->services->inactifs->warning_delay/60/60/24;
$var=!$var; $board->label=$langs->trans("BoardNotActivatedServices");
print '<tr '.$bc[$var].'><td width="16">'.img_object($langs->trans("Contract"),"contract").'</td><td>'.$langs->trans("BoardNotActivatedServices").'</td>'; $board->url=DOL_URL_ROOT.'/contrat/services.php?mainmenu=commercial&leftmenu=contracts&mode=0';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/contrat/services.php?mainmenu=commercial&leftmenu=contracts&mode=0">'.$board->nbtodo.'</a></td>'; $board->img=img_object($langs->trans("Contract"),"contract");
print '<td align="right">'; $rowspan++;
print '<a href="'.DOL_URL_ROOT.'/contrat/services.php?mainmenu=commercial&leftmenu=contracts&mode=0">'; $dashboardlines[]=$board;
print $board->nbtodolate;
print '</a></td><td nowrap align="right">';
print ' (>'.ceil($conf->contrat->services->inactifs->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '</td>';
print '<td>';
if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print '&nbsp;';
print '</td>';
print '</tr>';
print "\n";
} }
// Number of active services (expired) // Number of active services (expired)
@ -411,22 +363,12 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire)
include_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"); include_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php");
$board=new Contrat($db); $board=new Contrat($db);
$board->load_board($user,"expired"); $board->load_board($user,"expired");
$board->warning_delay=$conf->contrat->services->expires->warning_delay/60/60/24;
$var=!$var; $board->label=$langs->trans("BoardRunningServices");
print '<tr '.$bc[$var].'><td width="16">'.img_object($langs->trans("Contract"),"contract").'</td><td>'.$langs->trans("BoardRunningServices").'</td>'; $board->url=DOL_URL_ROOT.'/contrat/services.php?mainmenu=commercial&leftmenu=contracts&mode=4&filter=expired';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/contrat/services.php?mainmenu=commercial&leftmenu=contracts&mode=4&filter=expired">'.$board->nbtodo.'</a></td>'; $board->img=img_object($langs->trans("Contract"),"contract");
print '<td align="right">'; $rowspan++;
print '<a href="'.DOL_URL_ROOT.'/contrat/services.php?mainmenu=commercial&leftmenu=contracts&mode=4&filter=expired">'; $dashboardlines[]=$board;
print $board->nbtodolate;
print '</a></td><td nowrap align="right">';
print ' (>'.ceil($conf->contrat->services->expires->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '</td>';
print '<td>';
if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print '&nbsp;';
print '</td>';
print '</tr>';
print "\n";
} }
// Number of supplier invoices (has paid) // Number of supplier invoices (has paid)
@ -437,25 +379,15 @@ if ($conf->fournisseur->enabled && $conf->facture->enabled && $user->rights->fac
include_once(DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php"); include_once(DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php");
$board=new FactureFournisseur($db); $board=new FactureFournisseur($db);
$board->load_board($user); $board->load_board($user);
$board->warning_delay=$conf->facture->fournisseur->warning_delay/60/60/24;
$var=!$var; $board->label=$langs->trans("SupplierBillsToPay");
print '<tr '.$bc[$var].'><td width="16">'.img_object($langs->trans("Bills"),"bill").'</td><td>'.$langs->trans("SupplierBillsToPay").'</td>'; $board->url=DOL_URL_ROOT.'/fourn/facture/index.php?filtre=paye:0';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/fourn/facture/index.php?filtre=paye:0">'.$board->nbtodo.'</a></td>'; $board->img=img_object($langs->trans("Bills"),"bill");
print '<td align="right">'; $rowspan++;
print '<a href="'.DOL_URL_ROOT.'/fourn/facture/index.php?filtre=paye:0">'; $dashboardlines[]=$board;
print $board->nbtodolate;
print '</a></td><td nowrap align="right">';
print ' (>'.ceil($conf->facture->fournisseur->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '</td>';
print '<td>';
if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print '&nbsp;';
print '</td>';
print '</tr>';
print "\n";
} }
// Number invoices customers (has paid) // Number of invoices customers (has paid)
if ($conf->facture->enabled && $user->rights->facture->lire) if ($conf->facture->enabled && $user->rights->facture->lire)
{ {
$langs->load("bills"); $langs->load("bills");
@ -463,25 +395,15 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
include_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); include_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
$board=new Facture($db); $board=new Facture($db);
$board->load_board($user); $board->load_board($user);
$board->warning_delay=$conf->facture->client->warning_delay/60/60/24;
$var=!$var; $board->label=$langs->trans("CustomerBillsUnpaid");
print '<tr '.$bc[$var].'><td width="16">'.img_object($langs->trans("Bills"),"bill").'</td><td>'.$langs->trans("CustomerBillsUnpaid").'</td>'; $board->url=DOL_URL_ROOT.'/compta/facture/impayees.php';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/compta/facture/impayees.php">'.$board->nbtodo.'</a></td>'; $board->img=img_object($langs->trans("Bills"),"bill");
print '<td align="right">'; $rowspan++;
print '<a href="'.DOL_URL_ROOT.'/compta/facture/impayees.php">'; $dashboardlines[]=$board;
print $board->nbtodolate;
print '</a></td><td nowrap align="right">';
print ' (>'.ceil($conf->facture->client->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '</td>';
print '<td>';
if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print '&nbsp;';
print '</td>';
print '</tr>';
print "\n";
} }
// Number Scripture closer // Number of transactions to conciliate
if ($conf->banque->enabled && $user->rights->banque->lire && ! $user->societe_id) if ($conf->banque->enabled && $user->rights->banque->lire && ! $user->societe_id)
{ {
$langs->load("banks"); $langs->load("banks");
@ -489,25 +411,15 @@ if ($conf->banque->enabled && $user->rights->banque->lire && ! $user->societe_id
include_once(DOL_DOCUMENT_ROOT."/compta/bank/class/account.class.php"); include_once(DOL_DOCUMENT_ROOT."/compta/bank/class/account.class.php");
$board=new Account($db); $board=new Account($db);
$board->load_board($user); $board->load_board($user);
$board->warning_delay=$conf->bank->rappro->warning_delay/60/60/24;
$var=!$var; $board->label=$langs->trans("TransactionsToConciliate");
print '<tr '.$bc[$var].'><td width="16">'.img_object($langs->trans("TransactionsToConciliate"),"payment").'</td><td>'.$langs->trans("TransactionsToConciliate").'</td>'; $board->url=DOL_URL_ROOT.'/compta/bank/index.php?leftmenu=bank&mainmenu=bank';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/compta/bank/index.php?leftmenu=bank&mainmenu=bank">'.$board->nbtodo.'</a></td>'; $board->img=img_object($langs->trans("TransactionsToConciliate"),"payment");
print '<td align="right">'; $rowspan++;
print '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php?leftmenu=bank&mainmenu=bank">'; $dashboardlines[]=$board;
print $board->nbtodolate;
print '</a></td><td nowrap align="right">';
print ' (>'.ceil($conf->bank->rappro->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '</td>';
print '<td>';
if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print '&nbsp;';
print '</td>';
print '</tr>';
print "\n";
} }
// Number Scripture closer // Number of cheque to send
if ($conf->banque->enabled && $user->rights->banque->lire && ! $user->societe_id) if ($conf->banque->enabled && $user->rights->banque->lire && ! $user->societe_id)
{ {
$langs->load("banks"); $langs->load("banks");
@ -515,25 +427,15 @@ if ($conf->banque->enabled && $user->rights->banque->lire && ! $user->societe_id
include_once(DOL_DOCUMENT_ROOT."/compta/paiement/cheque/class/remisecheque.class.php"); include_once(DOL_DOCUMENT_ROOT."/compta/paiement/cheque/class/remisecheque.class.php");
$board=new RemiseCheque($db); $board=new RemiseCheque($db);
$board->load_board($user); $board->load_board($user);
$board->warning_delay=$conf->bank->cheque->warning_delay/60/60/24;
$var=!$var; $board->label=$langs->trans("BankChecksToReceipt");
print '<tr '.$bc[$var].'><td width="16">'.img_object($langs->trans("BankChecksToReceipt"),"payment").'</td><td>'.$langs->trans("BankChecksToReceipt").'</td>'; $board->url=DOL_URL_ROOT.'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=accountancy';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=accountancy">'.$board->nbtodo.'</a></td>'; $board->img=img_object($langs->trans("BankChecksToReceipt"),"payment");
print '<td align="right">'; $rowspan++;
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=accountancy">'; $dashboardlines[]=$board;
print $board->nbtodolate;
print '</a></td><td nowrap align="right">';
print ' (>'.ceil($conf->bank->cheque->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '</td>';
print '<td>';
if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print '&nbsp;';
print '</td>';
print '</tr>';
print "\n";
} }
// Participant Number valid (awaiting assessment) // Number of foundation members
if ($conf->adherent->enabled && $user->rights->adherent->lire && ! $user->societe_id) if ($conf->adherent->enabled && $user->rights->adherent->lire && ! $user->societe_id)
{ {
$langs->load("members"); $langs->load("members");
@ -541,35 +443,63 @@ if ($conf->adherent->enabled && $user->rights->adherent->lire && ! $user->societ
include_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php"); include_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php");
$board=new Adherent($db); $board=new Adherent($db);
$board->load_board($user); $board->load_board($user);
$board->warning_delay=$conf->adherent->cotisation->warning_delay/60/60/24;
$var=!$var; $board->label=$langs->trans("MembersWithSubscriptionToReceive");
print '<tr '.$bc[$var].'><td width="16">'.img_object($langs->trans("Members"),"user").'</td><td>'.$langs->trans("Members").'</td>'; $board->url=DOL_URL_ROOT.'/adherents/liste.php?mainmenu=members&statut=1';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/adherents/liste.php?mainmenu=members&statut=1">'.$board->nbtodo.'</a></td>'; $board->img=img_object($langs->trans("Members"),"user");
print '<td align="right">'; $rowspan++;
print '<a href="'.DOL_URL_ROOT.'/adherents/liste.php?mainmenu=members&statut=1">'; $dashboardlines[]=$board;
print $board->nbtodolate;
print '</a></td><td nowrap align="right">';
print ' (>'.ceil($conf->adherent->cotisation->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '</td>';
print '<td>';
if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print '&nbsp;';
print '</td>';
print '</tr>';
print "\n";
} }
print '</table>'; // Calculate total nb of late
$totallate=0;
if ($nboflate > 0) foreach($dashboardlines as $key => $board)
{ {
print '<br>'; if ($board->nbtodolate > 0) $totallate+=$board->nbtodolate;
//print '<table width="100%" class="border"><tr><td>';
print '<div class="warning">'.img_picto($langs->trans("Alert"),'warning').' '.$langs->trans("WarningYouHaveAtLeastOneTaskLate").'</div>';
//print '</td></tr></table>';
} }
print '</td></tr></table>'; // Show dashboard
$var=true;
foreach($dashboardlines as $key => $board)
{
$var=!$var;
print '<tr '.$bc[$var].'><td width="16">'.$board->img.'</td><td>'.$board->label.'</td>';
print '<td align="right"><a href="'.$board->url.'">'.$board->nbtodo.'</a></td>';
print '<td align="right">';
print '<a href="'.$board->url.'">';
print $board->nbtodolate;
print '</a></td>';
print '<td align="left">';
if ($board->nbtodolate > 0) print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning");
else print '&nbsp;';
print '</td>';
print '<td nowrap="nowrap" align="right">';
print ' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')';
print '</td>';
if ($showweather)
{
print '<td rowspan="'.$rowspan.'" width="80" style="border-left: 1px solid #DDDDDD" align="center">';
$text='';
if ($totallate > 0) $text=$langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate");
$options='height="64px"';
if ($rowspan <= 2) $options='height="24"'; // Weather logo is smaller if dashboard has few elements
else if ($rowspan <= 3) $options='height="48"'; // Weather logo is smaller if dashboard has few elements
print showWeather($totallate,$text,$options);
//print showWeather(0,'');
//print showWeather(40,$text);
print '</td>';
$showweather=0;
}
print '</tr>';
print "\n";
}
print '</table>'; // End table array
print '</td></tr></table>'; // End table left area
print '<br>'; print '<br>';
@ -619,4 +549,36 @@ if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING))
$db->close(); $db->close();
llxFooter('$Date$ - $Revision$'); llxFooter('$Date$ - $Revision$');
/**
* Show weather logo. Logo to show depends on $totallate and values for
* $conf->global->MAIN_METEO_OFFSET
* $conf->global->MAIN_METEO_GAP
* @param $totallate Nb of element late
* @param $text Text to show on logo
* @param $options More parameters on img tag
* @return string Return img tag of weather
*/
function showWeather($totallate,$text,$options)
{
global $conf;
$out='';
$offset=0;
$cursor=10; // By default
//if (! empty($conf->global->MAIN_METEO_OFFSET)) $offset=$conf->global->MAIN_METEO_OFFSET;
//if (! empty($conf->global->MAIN_METEO_GAP)) $cursor=$conf->global->MAIN_METEO_GAP;
$level0=$offset; if (! empty($conf->global->MAIN_METEO_LEVEL0)) $level0=$conf->global->MAIN_METEO_LEVEL0;
$level1=$offset+1*$cursor; if (! empty($conf->global->MAIN_METEO_LEVEL1)) $level1=$conf->global->MAIN_METEO_LEVEL1;
$level2=$offset+2*$cursor; if (! empty($conf->global->MAIN_METEO_LEVEL2)) $level2=$conf->global->MAIN_METEO_LEVEL2;
$level3=$offset+3*$cursor; if (! empty($conf->global->MAIN_METEO_LEVEL3)) $level3=$conf->global->MAIN_METEO_LEVEL3;
if ($totallate <= $level0) $out.=img_picto_common($text,'weather/weather-clear.png',$options);
if ($totallate > $level0 && $totallate <= $level1) $out.=img_picto_common($text,'weather/weather-few-clouds.png',$options);
if ($totallate > $level1 && $totallate <= $level2) $out.=img_picto_common($text,'weather/weather-clouds.png',$options);
if ($totallate > $level2 && $totallate <= $level3) $out.=img_picto_common($text,'weather/weather-many-clouds.png',$options);
if ($totallate > $level3) $out.=img_picto_common($text,'weather/weather-storm.png',$options);
return $out;
}
?> ?>

View File

@ -283,6 +283,7 @@ ListOfDirectoriesForModelGenODT=List of directories containing templates files w
NumberOfModelFilesFound=Number of ODT templates files found in those directories NumberOfModelFilesFound=Number of ODT templates files found in those directories
ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir
FirstnameNamePosition=Position of firstname/name FirstnameNamePosition=Position of firstname/name
DescWeather=The following pictures will be shown on dashboard when number of late actions reach the following values:
# Modules # Modules
Module0Name=Users & groups Module0Name=Users & groups

View File

@ -1,163 +1,164 @@
# Dolibarr language file - en_US - members # Dolibarr language file - en_US - members
CHARSET=UTF-8 CHARSET=UTF-8
MembersArea=Members area MembersArea=Members area
PublicMembersArea=Public members area PublicMembersArea=Public members area
MemberCard=Member card MemberCard=Member card
SubscriptionCard=Subscription card SubscriptionCard=Subscription card
Member=Member Member=Member
Members=Members Members=Members
MemberAccount=Member login MemberAccount=Member login
ShowMember=Show member card ShowMember=Show member card
UserNotLinkedToMember=User not linked to a member UserNotLinkedToMember=User not linked to a member
MembersTickets=Members Tickets MembersTickets=Members Tickets
FundationMembers=Foundation members FundationMembers=Foundation members
Attributs=Attributes Attributs=Attributes
ErrorMemberTypeNotDefined=Member type not defined ErrorMemberTypeNotDefined=Member type not defined
ListOfPublicMembers=List of public members ListOfPublicMembers=List of public members
ListOfValidatedPublicMembers=List of validated public members ListOfValidatedPublicMembers=List of validated public members
ErrorThisMemberIsNotPublic=This member is not public ErrorThisMemberIsNotPublic=This member is not public
ErrorMemberIsAlreadyLinkedToThisThirdParty=Another member (name: <b>%s</b>, login: <b>%s</b>) is already linked to a third party <b>%s</b>. Remove this link first because a third party can't be linked to only a member (and vice versa). ErrorMemberIsAlreadyLinkedToThisThirdParty=Another member (name: <b>%s</b>, login: <b>%s</b>) is already linked to a third party <b>%s</b>. Remove this link first because a third party can't be linked to only a member (and vice versa).
ErrorUserPermissionAllowsToLinksToItselfOnly=For security reasons, you must be granted permissions to edit all users to be able to link a member to a user that is not yours. ErrorUserPermissionAllowsToLinksToItselfOnly=For security reasons, you must be granted permissions to edit all users to be able to link a member to a user that is not yours.
ThisIsContentOfYourCard=This is details of your card ThisIsContentOfYourCard=This is details of your card
CardContent=Content of your member card CardContent=Content of your member card
SetLinkToUser=Link to a Dolibarr user SetLinkToUser=Link to a Dolibarr user
SetLinkToThirdParty=Link to a Dolibarr third party SetLinkToThirdParty=Link to a Dolibarr third party
MembersCards=Members business cards MembersCards=Members business cards
MembersList=List of members MembersList=List of members
MembersListToValid=List of draft members (to be validated) MembersListToValid=List of draft members (to be validated)
MembersListValid=List of valid members MembersListValid=List of valid members
MembersListUpToDate=List of valid members with up to date subscription MembersListUpToDate=List of valid members with up to date subscription
MembersListNotUpToDate=List of valid members with subscription out of date MembersListNotUpToDate=List of valid members with subscription out of date
MembersListResiliated=List of resiliated members MembersListResiliated=List of resiliated members
MembersListQualified=List of qualified members MembersListQualified=List of qualified members
MenuMembersToValidate=Draft members MenuMembersToValidate=Draft members
MenuMembersValidated=Validated members MenuMembersValidated=Validated members
MenuMembersUpToDate=Up to date members MenuMembersUpToDate=Up to date members
MenuMembersNotUpToDate=Out of date members MenuMembersNotUpToDate=Out of date members
MenuMembersResiliated=Resiliated members MenuMembersResiliated=Resiliated members
DateAbonment=Subscription date MembersWithSubscriptionToReceive=Members with subscription to receive
DateSubscription=Subscription date DateAbonment=Subscription date
DateNextSubscription=Next subscription DateSubscription=Subscription date
DateEndSubscription=Subscription end date DateNextSubscription=Next subscription
EndSubscription=End subscription DateEndSubscription=Subscription end date
SubscriptionId=Subscription id EndSubscription=End subscription
MemberId=Member id SubscriptionId=Subscription id
NewMember=New member MemberId=Member id
NewType=New member type NewMember=New member
MemberType=Member type NewType=New member type
MemberTypeId=Member type id MemberType=Member type
MemberTypeLabel=Member type label MemberTypeId=Member type id
MembersTypes=Members types MemberTypeLabel=Member type label
MembersAttributes=Members attributes MembersTypes=Members types
SearchAMember=Search a member MembersAttributes=Members attributes
MemberStatusDraft=Draft (needs to be validated) SearchAMember=Search a member
MemberStatusDraftShort=Draft MemberStatusDraft=Draft (needs to be validated)
MemberStatusActive=Validated (waiting subscription) MemberStatusDraftShort=Draft
MemberStatusActiveShort=Validated MemberStatusActive=Validated (waiting subscription)
MemberStatusActiveLate=subscription expired MemberStatusActiveShort=Validated
MemberStatusActiveLateShort=Expired MemberStatusActiveLate=subscription expired
MemberStatusPaid=Subscription up to date MemberStatusActiveLateShort=Expired
MemberStatusPaidShort=Up to date MemberStatusPaid=Subscription up to date
MemberStatusResiliated=Resiliated member MemberStatusPaidShort=Up to date
MemberStatusResiliatedShort=Resiliated MemberStatusResiliated=Resiliated member
MembersStatusToValid=Draft members MemberStatusResiliatedShort=Resiliated
MembersStatusToValidShort=Draft members MembersStatusToValid=Draft members
MembersStatusValidated=Validated members MembersStatusToValidShort=Draft members
MembersStatusPaid=Subscription up to date MembersStatusValidated=Validated members
MembersStatusPaidShort=Up to date MembersStatusPaid=Subscription up to date
MembersStatusNotPaid=Subscription out of date MembersStatusPaidShort=Up to date
MembersStatusNotPaidShort=Out of date MembersStatusNotPaid=Subscription out of date
MembersStatusResiliated=Resiliated members MembersStatusNotPaidShort=Out of date
MembersStatusResiliatedShort=Resiliated members MembersStatusResiliated=Resiliated members
NewCotisation=New contribution MembersStatusResiliatedShort=Resiliated members
PaymentSubscription=New contribution payment NewCotisation=New contribution
EditMember=Edit member PaymentSubscription=New contribution payment
SubscriptionEndDate=Subscription's end date EditMember=Edit member
NewAttribute=New attribute SubscriptionEndDate=Subscription's end date
AttributeCode=Attribute code NewAttribute=New attribute
OptionalFieldsSetup=Optional fields setup AttributeCode=Attribute code
MembersTypeSetup=Members type setup OptionalFieldsSetup=Optional fields setup
NewSubscription=New subscription MembersTypeSetup=Members type setup
Subscription=Subscription NewSubscription=New subscription
Subscriptions=Subscriptions Subscription=Subscription
SubscriptionLate=Late Subscriptions=Subscriptions
SubscriptionNotReceived=Subscription never received SubscriptionLate=Late
SubscriptionLateShort=Late SubscriptionNotReceived=Subscription never received
SubscriptionNotReceivedShort=Never received SubscriptionLateShort=Late
ListOfSubscriptions=List of subscriptions SubscriptionNotReceivedShort=Never received
SendCardByMail=Send card by Email ListOfSubscriptions=List of subscriptions
AddMember=Add member SendCardByMail=Send card by Email
MemberType=Member type AddMember=Add member
NoTypeDefinedGoToSetup=No member types defined. Go to setup - Members types MemberType=Member type
NewMemberType=New member type NoTypeDefinedGoToSetup=No member types defined. Go to setup - Members types
WelcomeEMail=Welcome e-mail NewMemberType=New member type
SubscriptionRequired=Subscription required WelcomeEMail=Welcome e-mail
EditType=Edit member type SubscriptionRequired=Subscription required
DeleteType=Delete EditType=Edit member type
VoteAllowed=Vote allowed DeleteType=Delete
Physical=Physical VoteAllowed=Vote allowed
Moral=Moral Physical=Physical
MorPhy=Moral/Physical Moral=Moral
Reenable=Reenable MorPhy=Moral/Physical
ResiliateMember=Resiliate a member Reenable=Reenable
ConfirmResiliateMember=Are you sure you want to resiliate this member ? ResiliateMember=Resiliate a member
DeleteMember=Delete a member ConfirmResiliateMember=Are you sure you want to resiliate this member ?
ConfirmDeleteMember=Are you sure you want to delete this member (Deleting a member will delete all his subscriptions) ? DeleteMember=Delete a member
DeleteSubscription=Delete a subscription ConfirmDeleteMember=Are you sure you want to delete this member (Deleting a member will delete all his subscriptions) ?
ConfirmDeleteSubscription=Are you sure you want to delete this subscription ? DeleteSubscription=Delete a subscription
Filehtpasswd=htpasswd file ConfirmDeleteSubscription=Are you sure you want to delete this subscription ?
ValidateMember=Validate a member Filehtpasswd=htpasswd file
ConfirmValidateMember=Are you sure you want to validate this member ? ValidateMember=Validate a member
FollowingLinksArePublic=The following links are open pages not protected by any Dolibarr permission. They are not formated pages, provided as example to show how to list members database. ConfirmValidateMember=Are you sure you want to validate this member ?
PublicMemberList=Public member list FollowingLinksArePublic=The following links are open pages not protected by any Dolibarr permission. They are not formated pages, provided as example to show how to list members database.
BlankSubscriptionForm=Subscription form PublicMemberList=Public member list
MemberPublicLinks=Public links/pages BlankSubscriptionForm=Subscription form
ExportDataset_member_1=Members and subscriptions MemberPublicLinks=Public links/pages
ImportDataset_member_1=Members ExportDataset_member_1=Members and subscriptions
LastMembers=Last %s members ImportDataset_member_1=Members
LastMembersModified=Last %s modified members LastMembers=Last %s members
AttributeName=Attribute name LastMembersModified=Last %s modified members
FieldEdition=% field edition AttributeName=Attribute name
AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space FieldEdition=% field edition
String=String AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space
Text=Text String=String
Int=Int Text=Text
Date=Date Int=Int
DateAndTime=Date and time Date=Date
PublicMemberCard=Member public card DateAndTime=Date and time
MemberNotOrNoMoreExpectedToSubscribe=Member not or no more expected to subscribe PublicMemberCard=Member public card
AddSubscription=Add subscription MemberNotOrNoMoreExpectedToSubscribe=Member not or no more expected to subscribe
ShowSubscription=Show subscription AddSubscription=Add subscription
MemberModifiedInDolibarr=Member modified in Dolibarr ShowSubscription=Show subscription
SendAnEMailToMember=Send information email to member MemberModifiedInDolibarr=Member modified in Dolibarr
DescADHERENT_AUTOREGISTER_MAIL_SUBJECT=EMail subject for member autosubscription SendAnEMailToMember=Send information email to member
DescADHERENT_AUTOREGISTER_MAIL=EMail for member autosubscription DescADHERENT_AUTOREGISTER_MAIL_SUBJECT=EMail subject for member autosubscription
DescADHERENT_MAIL_VALID_SUBJECT=EMail subject for member validation DescADHERENT_AUTOREGISTER_MAIL=EMail for member autosubscription
DescADHERENT_MAIL_VALID=EMail for member validation DescADHERENT_MAIL_VALID_SUBJECT=EMail subject for member validation
DescADHERENT_MAIL_COTIS_SUBJECT=EMail subject for subscription DescADHERENT_MAIL_VALID=EMail for member validation
DescADHERENT_MAIL_COTIS=EMail for subscription DescADHERENT_MAIL_COTIS_SUBJECT=EMail subject for subscription
DescADHERENT_MAIL_RESIL_SUBJECT=EMail subject for member resiliation DescADHERENT_MAIL_COTIS=EMail for subscription
DescADHERENT_MAIL_RESIL=EMail for member resiliation DescADHERENT_MAIL_RESIL_SUBJECT=EMail subject for member resiliation
DescADHERENT_MAIL_FROM=Sender EMail for automatic emails DescADHERENT_MAIL_RESIL=EMail for member resiliation
DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_MAIL_FROM=Sender EMail for automatic emails
DescADHERENT_CARD_TYPE=Format of cards page DescADHERENT_ETIQUETTE_TYPE=Format of labels page
DescADHERENT_CARD_HEADER_TEXT=Text printed on top of member cards DescADHERENT_CARD_TYPE=Format of cards page
DescADHERENT_CARD_TEXT=Text printed on member cards (align on left) DescADHERENT_CARD_HEADER_TEXT=Text printed on top of member cards
DescADHERENT_CARD_TEXT_RIGHT=Text printed on member cards (align on right) DescADHERENT_CARD_TEXT=Text printed on member cards (align on left)
DescADHERENT_CARD_FOOTER_TEXT=Text printed on bottom of member cards DescADHERENT_CARD_TEXT_RIGHT=Text printed on member cards (align on right)
DescADHERENT_MAILMAN_LISTS=List(s) for automatic insription of new members (separated by a comma) DescADHERENT_CARD_FOOTER_TEXT=Text printed on bottom of member cards
ShowTypeCard=Show type '%s' DescADHERENT_MAILMAN_LISTS=List(s) for automatic insription of new members (separated by a comma)
HTPasswordExport=htpassword file generation ShowTypeCard=Show type '%s'
NoThirdPartyAssociatedToMember=No third party associated to this member HTPasswordExport=htpassword file generation
ThirdPartyDolibarr=Dolibarr third party NoThirdPartyAssociatedToMember=No third party associated to this member
MembersAndSubscriptions= Members and Suscriptions ThirdPartyDolibarr=Dolibarr third party
MoreActions=Complementary action on recording MembersAndSubscriptions= Members and Suscriptions
MoreActionBankDirect=Create a direct transaction record on account MoreActions=Complementary action on recording
MoreActionBankViaInvoice=Create an invoice and payment on account MoreActionBankDirect=Create a direct transaction record on account
MoreActionInvoiceOnly=Create an invoice with no payment MoreActionBankViaInvoice=Create an invoice and payment on account
LinkToGeneratedPages=Generate visit cards MoreActionInvoiceOnly=Create an invoice with no payment
LinkToGeneratedPagesDesc=This screen allows you to generate PDF files with business cards for all your members or a particular member. LinkToGeneratedPages=Generate visit cards
DocForAllMembersCards=Generate business cards for all members (Format for output actually setup : <b>%s</b>) LinkToGeneratedPagesDesc=This screen allows you to generate PDF files with business cards for all your members or a particular member.
DocForOneMemberCards=Generate business cards for a particular member (Format for output actually setup: <b>%s</b>) DocForAllMembersCards=Generate business cards for all members (Format for output actually setup : <b>%s</b>)
DocForLabels=Generate address sheets (Format for output actually setup: <b>%s</b>) DocForOneMemberCards=Generate business cards for a particular member (Format for output actually setup: <b>%s</b>)
DocForLabels=Generate address sheets (Format for output actually setup: <b>%s</b>)
SubscriptionPayment=Subscription payment SubscriptionPayment=Subscription payment

View File

@ -285,6 +285,7 @@ ExampleOfDirectoriesForModelGen=Exemples de syntaxe:<br>c:\mydir<br>/home/mydir<
FollowingSubstitutionKeysCanBeUsed=En plaçant les tags suivant dans le modèle, vous obtiendrez une subsitution avec la valeur personnalisée lors de la génération du document: FollowingSubstitutionKeysCanBeUsed=En plaçant les tags suivant dans le modèle, vous obtiendrez une subsitution avec la valeur personnalisée lors de la génération du document:
FullListOnOnlineDocumentation=Liste complète des tags disponibles sur la documentation utilisateur du module Tiers sur le wiki http://wiki.dolibarr.org FullListOnOnlineDocumentation=Liste complète des tags disponibles sur la documentation utilisateur du module Tiers sur le wiki http://wiki.dolibarr.org
FirstnameNamePosition=Ordre affichage prénom/nom FirstnameNamePosition=Ordre affichage prénom/nom
DescWeather=Les graphiques suivant seront affichées sur le tableau de bord si le nombre d'éléments en retard atteints ces valeurs:
# Modules= undefined # Modules= undefined
Module0Name= Utilisateurs & groupes Module0Name= Utilisateurs & groupes

View File

@ -35,6 +35,7 @@ MenuMembersValidated=Adhérents valides
MenuMembersUpToDate=Adhérents à jour MenuMembersUpToDate=Adhérents à jour
MenuMembersNotUpToDate=Adhérents non à jour MenuMembersNotUpToDate=Adhérents non à jour
MenuMembersResiliated=Adhérents résiliés MenuMembersResiliated=Adhérents résiliés
MembersWithSubscriptionToReceive=Adhérents avec cotisation à recevoir
DateAbonment=Date adhésion DateAbonment=Date adhésion
DateSubscription=Date adhésion DateSubscription=Date adhésion
DateNextSubscription=Date prochaine adhésion DateNextSubscription=Date prochaine adhésion

View File

@ -1110,12 +1110,15 @@ function img_object($alt, $object, $cssclass='')
} }
/** /**
* \brief Show picto (generic function) * Show picto (generic function)
* \param alt Text on alt and title of image * @param alt Text on alt and title of image
* \param picto Name of image file to show (I no extension provided, we use '.png') * @param picto Name of image file to show (If no extension provided, we use '.png'). Image must be stored into img directory.
* \param options Attribut supplementaire a la balise img * Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img
* \param pictoisfullpath If 1, image path is a full path * Example: picto.png@mymodule if picto.png is stored into htdocs/mymodule/img
* \return string Retourne tag img * Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1)
* @param options Add more attribute on img tag
* @param pictoisfullpath If 1, image path is a full path
* @return string Retourne tag img
*/ */
function img_picto($alt, $picto, $options='', $pictoisfullpath=0) function img_picto($alt, $picto, $options='', $pictoisfullpath=0)
{ {
@ -1135,12 +1138,12 @@ function img_picto($alt, $picto, $options='', $pictoisfullpath=0)
} }
/** /**
* \brief Show picto (generic function) * Show picto (generic function)
* \param alt Text on alt and title of image * @param alt Text on alt and title of image
* \param picto Nom de l'image a afficher (Si pas d'extension, on met '.png') * @param picto Name of image file to show (If no extension provided, we use '.png'). Image must be stored into htdocs/theme/common directory.
* \param options Attribut supplementaire a la balise img * @param options Add more attribute on img tag
* \param pictoisfullpath If 1, image path is a full path * @param pictoisfullpath If 1, image path is a full path
* \return string Retourne tag img * @return string Retourne tag img
*/ */
function img_picto_common($alt, $picto, $options='', $pictoisfullpath=0) function img_picto_common($alt, $picto, $options='', $pictoisfullpath=0)
{ {