From df0ef9efe5384ec4e4b20d6200b8aadb65f53af4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Jan 2009 00:47:23 +0000 Subject: [PATCH] New: Can add a bookmark on all dolibarr pages. --- .settings/org.eclipse.core.resources.prefs | 4 +- ChangeLog | 1 + bookmarks.patch | 190 +++++ htdocs/bookmarks/bookmarks.lib.php | 69 ++ htdocs/bookmarks/fiche.php | 6 +- htdocs/comm/index.php | 712 ++++++++---------- .../menus/barre_left/eldy_backoffice.php | 8 - .../menus/barre_left/eldy_frontoffice.php | 8 - .../menus/barre_top/eldy_backoffice.php | 3 +- .../menus/barre_top/eldy_frontoffice.php | 3 +- htdocs/includes/menus/barre_top/rodolphe.php | 3 +- htdocs/includes/menus/init_menu_auguria.sql | 3 - htdocs/langs/en_US/bookmarks.lang | 4 + htdocs/langs/fr_FR/bookmarks.lang | 4 + htdocs/lib/company.lib.php | 8 - htdocs/lib/product.lib.php | 8 - htdocs/main.inc.php | 15 + htdocs/pre.inc.php | 9 +- 18 files changed, 627 insertions(+), 431 deletions(-) create mode 100644 bookmarks.patch create mode 100644 htdocs/bookmarks/bookmarks.lib.php create mode 100644 htdocs/langs/en_US/bookmarks.lang create mode 100644 htdocs/langs/fr_FR/bookmarks.lang diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index 641597d3667..36f3a7e2b0c 100644 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -1,4 +1,4 @@ -#Thu Jan 22 02:05:11 CET 2009 +#Fri Jan 23 00:49:24 CET 2009 eclipse.preferences.version=1 encoding//dev/initdemo/initdemo.sql=UTF-8 encoding//dev/skeletons/modMyModule.class.php=ISO-8859-1 @@ -176,6 +176,7 @@ encoding//htdocs/langs/en_US/admin.lang=UTF-8 encoding//htdocs/langs/en_US/agenda.lang=UTF-8 encoding//htdocs/langs/en_US/banks.lang=UTF-8 encoding//htdocs/langs/en_US/bills.lang=UTF-8 +encoding//htdocs/langs/en_US/bookmarks.lang=UTF-8 encoding//htdocs/langs/en_US/boxes.lang=UTF-8 encoding//htdocs/langs/en_US/categories.lang=UTF-8 encoding//htdocs/langs/en_US/commercial.lang=UTF-8 @@ -284,6 +285,7 @@ encoding//htdocs/langs/fr_FR/admin.lang=UTF-8 encoding//htdocs/langs/fr_FR/agenda.lang=UTF-8 encoding//htdocs/langs/fr_FR/banks.lang=UTF-8 encoding//htdocs/langs/fr_FR/bills.lang=UTF-8 +encoding//htdocs/langs/fr_FR/bookmarks.lang=UTF-8 encoding//htdocs/langs/fr_FR/boxes.lang=UTF-8 encoding//htdocs/langs/fr_FR/categories.lang=UTF-8 encoding//htdocs/langs/fr_FR/commercial.lang=UTF-8 diff --git a/ChangeLog b/ChangeLog index 267663801c3..05ef62e7491 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ English Dolibarr changelog ***** Changelog for 2.5.1 compared to 2.5 ***** For users: +- New: Can add bookmarks on all pages. - New: Enhance bank transactions reportings. - New: When creating a contact from a third party, informations from third party card are automatically suggested. diff --git a/bookmarks.patch b/bookmarks.patch new file mode 100644 index 00000000000..65d5ad1996d --- /dev/null +++ b/bookmarks.patch @@ -0,0 +1,190 @@ +diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/htdocs/bookmarks/fonctions.inc.php /var/www/html/dolibarr_dev/htdocs/bookmarks/fonctions.inc.php +--- /var/www/html/dolibarr/htdocs/bookmarks/fonctions.inc.php 1970-01-01 01:00:00.000000000 +0100 ++++ /var/www/html/dolibarr_dev/htdocs/bookmarks/fonctions.inc.php 2009-01-21 22:41:44.000000000 +0100 +@@ -0,0 +1,51 @@ ++load("bookmarks"); ++ ++ $ret = ''; ++ $ret .= '
'; ++ ++ $ret .= ''; ++ ++ $ret .= ''; ++ ++ $ret .= '
'; ++ ++ return $ret; ++ } ++ ++?> +\ Pas de fin de ligne à la fin du fichier. +diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/htdocs/langs/fr_FR/bookmarks.lang /var/www/html/dolibarr_dev/htdocs/langs/fr_FR/bookmarks.lang +--- /var/www/html/dolibarr/htdocs/langs/fr_FR/bookmarks.lang 1970-01-01 01:00:00.000000000 +0100 ++++ /var/www/html/dolibarr_dev/htdocs/langs/fr_FR/bookmarks.lang 2009-01-21 22:14:05.000000000 +0100 +@@ -0,0 +1,4 @@ ++# Dolibarr language file - fr_FR - marque pages ++CHARSET=ISO-8859-1 ++Bookm=Marque pages ++NewBookmark=Nouveau marque page +\ Pas de fin de ligne à la fin du fichier. +diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/htdocs/main.inc.php /var/www/html/dolibarr_dev/htdocs/main.inc.php +--- /var/www/html/dolibarr/htdocs/main.inc.php 2009-01-21 17:09:23.000000000 +0100 ++++ /var/www/html/dolibarr_dev/htdocs/main.inc.php 2009-01-21 21:01:39.000000000 +0100 +@@ -886,6 +886,15 @@ + img_object($langs->trans("List"),'user').' '.$langs->trans("Members"), 'member', 'sall'); + } + ++ // Zone d'affichage permanente des marque pages ++ if ($conf->bookmark->enabled && $conf->global->MAIN_PERMANENT_BOOKMARKS && $user->rights->bookmark->lire) ++ { ++ include_once (DOL_DOCUMENT_ROOT.'/bookmarks/fonctions.inc.php'); ++ $langs->load("bookmarks"); ++ ++ $ret.=printBookmarksList($db, $langs); ++ } ++ + if ($ret) + { + print "\n"; +@@ -901,7 +910,7 @@ + { + print $form_search; + } +- ++ + // Lien vers l'aide en ligne (uniquement si langue fr_FR) + if ($helppagename) + { +diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/output.patch /var/www/html/dolibarr_dev/output.patch +--- /var/www/html/dolibarr/output.patch 1970-01-01 01:00:00.000000000 +0100 ++++ /var/www/html/dolibarr_dev/output.patch 2009-01-21 22:41:47.000000000 +0100 +@@ -0,0 +1,93 @@ ++diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/htdocs/bookmarks/fonctions.inc.php /var/www/html/dolibarr_dev/htdocs/bookmarks/fonctions.inc.php ++--- /var/www/html/dolibarr/htdocs/bookmarks/fonctions.inc.php 1970-01-01 01:00:00.000000000 +0100 +++++ /var/www/html/dolibarr_dev/htdocs/bookmarks/fonctions.inc.php 2009-01-21 22:41:44.000000000 +0100 ++@@ -0,0 +1,51 @@ +++load("bookmarks"); +++ +++ $ret = ''; +++ $ret .= '
'; +++ +++ $ret .= ''; +++ +++ $ret .= ''; +++ +++ $ret .= '
'; +++ +++ return $ret; +++ } +++ +++?> ++\ Pas de fin de ligne à la fin du fichier. ++diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/htdocs/langs/fr_FR/bookmarks.lang /var/www/html/dolibarr_dev/htdocs/langs/fr_FR/bookmarks.lang ++--- /var/www/html/dolibarr/htdocs/langs/fr_FR/bookmarks.lang 1970-01-01 01:00:00.000000000 +0100 +++++ /var/www/html/dolibarr_dev/htdocs/langs/fr_FR/bookmarks.lang 2009-01-21 22:14:05.000000000 +0100 ++@@ -0,0 +1,4 @@ +++# Dolibarr language file - fr_FR - marque pages +++CHARSET=ISO-8859-1 +++Bookm=Marque pages +++NewBookmark=Nouveau marque page ++\ Pas de fin de ligne à la fin du fichier. ++diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/htdocs/main.inc.php /var/www/html/dolibarr_dev/htdocs/main.inc.php ++--- /var/www/html/dolibarr/htdocs/main.inc.php 2009-01-21 17:09:23.000000000 +0100 +++++ /var/www/html/dolibarr_dev/htdocs/main.inc.php 2009-01-21 21:01:39.000000000 +0100 ++@@ -886,6 +886,15 @@ ++ img_object($langs->trans("List"),'user').' '.$langs->trans("Members"), 'member', 'sall'); ++ } ++ +++ // Zone d'affichage permanente des marque pages +++ if ($conf->bookmark->enabled && $conf->global->MAIN_PERMANENT_BOOKMARKS && $user->rights->bookmark->lire) +++ { +++ include_once (DOL_DOCUMENT_ROOT.'/bookmarks/fonctions.inc.php'); +++ $langs->load("bookmarks"); +++ +++ $ret.=printBookmarksList($db, $langs); +++ } +++ ++ if ($ret) ++ { ++ print "\n"; ++@@ -901,7 +910,7 @@ ++ { ++ print $form_search; ++ } ++- +++ ++ // Lien vers l'aide en ligne (uniquement si langue fr_FR) ++ if ($helppagename) ++ { diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php new file mode 100644 index 00000000000..d4bf707d0dd --- /dev/null +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -0,0 +1,69 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \file htdocs/bookmarks.lib.php + * \ingroup bookmarks + * \brief File with library for bookmark module + * \version $Id$ + */ + +function printBookmarksList ($aDb, $aLangs) +{ + global $conf; + + $db = $aDb; + $langs = $aLangs; + + require_once(DOL_DOCUMENT_ROOT."/bookmarks/bookmark.class.php"); + + $bookm = new Bookmark($db); + + $langs->load("bookmarks"); + + $url= $_SERVER["PHP_SELF"].(! empty($_SERVER["QUERY_STRING"])?'?'.$_SERVER["QUERY_STRING"]:''); + + $ret = ''; + // Menu bookmark + $ret.= ''; + // Menu New bookmark + $ret.= ''; + // Menu with all bookmarks + if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU)) + { + $sql = "SELECT rowid, title, url FROM ".MAIN_DB_PREFIX."bookmark"; + if ( $resql = $db->query($sql) ) { + while ( $obj = $db->fetch_object($resql) ) { + $ret.=''; + } + + } else { + + dolibarr_print_error($db); + } + } + + $ret .= ''; + + return $ret; +} + +?> diff --git a/htdocs/bookmarks/fiche.php b/htdocs/bookmarks/fiche.php index 066635d6874..cba62ef7f86 100644 --- a/htdocs/bookmarks/fiche.php +++ b/htdocs/bookmarks/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2008 Laurent Destailleur + * Copyright (C) 2005-2009 Laurent Destailleur * * 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 @@ -24,7 +24,7 @@ * \version $Id$ */ - + require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/bookmarks/bookmark.class.php"); @@ -87,7 +87,7 @@ if ($action == 'add' || $action == 'addproduct') $res=$bookmark->create(); if ($res > 0) { - $urlsource=isset($_GET["urlsource"])?$_GET["urlsource"]:DOL_URL_ROOT.'/bookmarks/liste.php'; + $urlsource=isset($_GET["urlsource"])?$_GET["urlsource"]:DOL_URL_ROOT.'/bookmarks/liste.php'; header("Location: ".$urlsource); exit; } diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 935e8304aa7..d2286ed3c97 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -19,12 +19,12 @@ */ /** - \file htdocs/comm/index.php - \ingroup commercial - \brief Page acceuil de la zone commercial cliente - \version $Id$ -*/ - + \file htdocs/comm/index.php + \ingroup commercial + \brief Page acceuil de la zone commercial cliente + \version $Id$ + */ + require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/client.class.php"); @@ -34,25 +34,25 @@ require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php"); if (!$user->rights->societe->lire) - accessforbidden(); - +accessforbidden(); + $langs->load("commercial"); $langs->load("orders"); -// S�curit� acc�s client +// S�curit� acc�s clien $socid=''; if ($_GET["socid"]) { $socid=$_GET["socid"]; } -if ($user->societe_id > 0) +if ($user->societe_id > 0) { - $action = ''; - $socid = $user->societe_id; + $action = ''; + $socid = $user->societe_id; } $max=5; if ($conf->propal->enabled) $propalstatic=new Propal($db); - + /* @@ -61,22 +61,22 @@ if ($conf->propal->enabled) $propalstatic=new Propal($db); if (isset($_GET["action"]) && $_GET["action"] == 'add_bookmark') { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE fk_soc = ".$_GET["socid"]." AND fk_user=".$user->id; - if (! $db->query($sql) ) - { - dolibarr_print_error($db); - } - $sql = "INSERT INTO ".MAIN_DB_PREFIX."bookmark (fk_soc, dateb, fk_user) VALUES (".$_GET["socid"].", ".$db->idate(mktime()).",".$user->id.");"; - if (! $db->query($sql) ) - { - dolibarr_print_error($db); - } + $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE fk_soc = ".$_GET["socid"]." AND fk_user=".$user->id; + if (! $db->query($sql) ) + { + dolibarr_print_error($db); + } + $sql = "INSERT INTO ".MAIN_DB_PREFIX."bookmark (fk_soc, dateb, fk_user) VALUES (".$_GET["socid"].", ".$db->idate(mktime()).",".$user->id.");"; + if (! $db->query($sql) ) + { + dolibarr_print_error($db); + } } if (isset($_GET["action"]) && $_GET["action"] == 'del_bookmark') { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE rowid=".$_GET["bid"]; - $result = $db->query($sql); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE rowid=".$_GET["bid"]; + $result = $db->query($sql); } @@ -98,17 +98,17 @@ print ''; // Recherche Propal if ($conf->propal->enabled && $user->rights->propale->lire) { - $var=false; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "
'.$langs->trans("SearchAProposal").'
'.$langs->trans("Ref").':
'.$langs->trans("Other").':
\n"; - print "
\n"; + $var=false; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "
'.$langs->trans("SearchAProposal").'
'.$langs->trans("Ref").':
'.$langs->trans("Other").':
\n"; + print "
\n"; } /* @@ -116,17 +116,17 @@ if ($conf->propal->enabled && $user->rights->propale->lire) */ if ($conf->contrat->enabled && $user->rights->contrat->lire) { - $var=false; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "
'.$langs->trans("SearchAContract").'
'.$langs->trans("Ref").':
'.$langs->trans("Other").':
\n"; - print "
"; + $var=false; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "
'.$langs->trans("SearchAContract").'
'.$langs->trans("Ref").':
'.$langs->trans("Other").':
\n"; + print "
"; } /* @@ -134,49 +134,49 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire) */ if ($conf->propal->enabled && $user->rights->propale->lire) { - $sql = "SELECT p.rowid, p.ref, p.total_ht, s.rowid as socid, s.nom"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; - $sql.= " FROM ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE p.fk_statut = 0 and p.fk_soc = s.rowid"; - if ($socid) - { - $sql .= " AND s.rowid = ".$socid; - } - if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - - $resql=$db->query($sql); - if ($resql) - { - $total = 0; - $num = $db->num_rows($resql); - if ($num > 0) - { - print ''; - print ""; - print ""; + $sql = "SELECT p.rowid, p.ref, p.total_ht, s.rowid as socid, s.nom"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; + $sql.= " FROM ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."societe as s"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql.= " WHERE p.fk_statut = 0 and p.fk_soc = s.rowid"; + if ($socid) + { + $sql .= " AND s.rowid = ".$socid; + } + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - $i = 0; - $var=true; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $var=!$var; - print ''; - print ''; - print ''; - $i++; - $total += $obj->price; - } - if ($total>0) - { - $var=!$var; - print '"; - } - print "
".$langs->trans("ProposalsDraft")."
'."rowid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref.''.dolibarr_trunc($obj->nom,18).''.price($obj->total_ht).'
'.$langs->trans("Total").''.price($total)."

"; - } - $db->free($resql); - } + $resql=$db->query($sql); + if ($resql) + { + $total = 0; + $num = $db->num_rows($resql); + if ($num > 0) + { + print ''; + print ""; + print ""; + + $i = 0; + $var=true; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $var=!$var; + print ''; + print ''; + print ''; + $i++; + $total += $obj->price; + } + if ($total>0) + { + $var=!$var; + print '"; + } + print "
".$langs->trans("ProposalsDraft")."
'."rowid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref.''.dolibarr_trunc($obj->nom,18).''.price($obj->total_ht).'
'.$langs->trans("Total").''.price($total)."

"; + } + $db->free($resql); + } } @@ -185,95 +185,49 @@ if ($conf->propal->enabled && $user->rights->propale->lire) */ if ($conf->commande->enabled && $user->rights->commande->lire) { - $langs->load("orders"); - $sql = "SELECT c.rowid, c.ref, c.total_ttc, s.nom, s.rowid as socid"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; - $sql.= " FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE c.fk_soc = s.rowid AND c.fk_statut = 0"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($socid) - { - $sql .= " AND c.fk_soc = ".$socid; - } + $langs->load("orders"); + $sql = "SELECT c.rowid, c.ref, c.total_ttc, s.nom, s.rowid as socid"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; + $sql.= " FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql.= " WHERE c.fk_soc = s.rowid AND c.fk_statut = 0"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($socid) + { + $sql .= " AND c.fk_soc = ".$socid; + } - $resql = $db->query($sql); - if ($resql) - { - $total = 0; - $num = $db->num_rows($resql); - if ($num) - { - print ''; - print ''; - print ''; + $resql = $db->query($sql); + if ($resql) + { + $total = 0; + $num = $db->num_rows($resql); + if ($num) + { + print '
'.$langs->trans("DraftOrders").'
'; + print ''; + print ''; - $i = 0; - $var = true; - while ($i < $num) - { - $var=!$var; - $obj = $db->fetch_object($resql); - print ''; - print ''; - print ''; - $i++; - $total += $obj->total_ttc; - } - if ($total>0) - { - $var=!$var; - print '"; - } - print "
'.$langs->trans("DraftOrders").'
'.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.''.dolibarr_trunc($obj->nom,18).''.price($obj->total_ttc).'
'.$langs->trans("Total").''.price($total)."

"; - } - } -} - -/* - * Bookmark - */ - if ($conf->bookmark->enabled) - { - $sql = "SELECT s.rowid, s.nom,b.rowid as bid"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."bookmark as b"; - $sql .= " WHERE b.fk_soc = s.rowid AND b.fk_user = ".$user->id; - if ($socid) - { - $sql .= " AND s.rowid = ".$socid; - } - $sql .= " ORDER BY lower(s.nom) ASC"; - - if ( $db->query($sql) ) - { - $num = $db->num_rows(); - - if ($num) - { - - $i = 0; - - print ''; - print ""; - print ""; - print "\n"; - $var=true; - - while ($i < $num) - { - $obj = $db->fetch_object(); - $var = !$var; - print ""; - print ''; - print ''; - print ''; - $i++; - } - print '
".$langs->trans("Bookmarks")."
'.$obj->nom.''; - print img_delete(); - print '
'; - } - } + $i = 0; + $var = true; + while ($i < $num) + { + $var=!$var; + $obj = $db->fetch_object($resql); + print ''.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.''; + print ''.dolibarr_trunc($obj->nom,18).''; + print ''.price($obj->total_ttc).''; + $i++; + $total += $obj->total_ttc; + } + if ($total>0) + { + $var=!$var; + print ''.$langs->trans("Total").''.price($total).""; + } + print "
"; + } + } } print ''; @@ -300,58 +254,58 @@ if ($user->rights->agenda->myactions->read) */ if ($user->rights->societe->lire) { - $sql = "SELECT s.rowid,s.nom,s.client,".$db->pdate("datec")." as datec"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; - $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE s.client in (1,2)"; - if ($socid) - { - $sql .= " AND s.rowid = $socid"; - } - if (!$user->rights->societe->client->voir && !$socid) //restriction - { - $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - } - $sql .= " ORDER BY s.datec DESC"; - $sql .= $db->plimit($max, 0); - - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - if ($num) - { - $langs->load("boxes"); - - print ''; - print ''; - print ''; - - $i = 0; - $var=false; - while ($i < $num) - { - $objp = $db->fetch_object($resql); - print ""; - print ""; + print ''; + $i++; + $var=!$var; + + } + print "
'.$langs->trans("BoxTitleLastCustomersOrProspects",$max).'
"; + $sql = "SELECT s.rowid,s.nom,s.client,".$db->pdate("datec")." as datec"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; + $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql.= " WHERE s.client in (1,2)"; + if ($socid) + { + $sql .= " AND s.rowid = $socid"; + } + if (!$user->rights->societe->client->voir && !$socid) //restriction + { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + } + $sql .= " ORDER BY s.datec DESC"; + $sql .= $db->plimit($max, 0); + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + if ($num) + { + $langs->load("boxes"); + + print ''; + print ''; + print ''; + + $i = 0; + $var=false; + while ($i < $num) + { + $objp = $db->fetch_object($resql); + print ""; + print ""; if ($objp->client == 2) print "rowid."\">".img_object($langs->trans("ShowCustomer"),"company")." ".$objp->nom.""; - print '"; - print '"; - print ''; - $i++; - $var=!$var; - - } - print "
'.$langs->trans("BoxTitleLastCustomersOrProspects",$max).'
"; if ($objp->client == 1) print "rowid."\">".img_object($langs->trans("ShowCustomer"),"company")." ".$objp->nom."'; + print ''; if ($objp->client == 1) print $langs->trans("Customer"); if ($objp->client == 2) print $langs->trans("Prospect"); print "'.dolibarr_print_date($objp->datec,'day')."

"; - - $db->free($resql); - } - } + print '
'.dolibarr_print_date($objp->datec,'day')."

"; + + $db->free($resql); + } + } } @@ -361,53 +315,53 @@ if ($user->rights->societe->lire) */ if ($conf->contrat->enabled && $user->rights->contrat->lire && 0) // \todo A REFAIRE DEPUIS NOUVEAU CONTRAT { - $langs->load("contracts"); - - $sql = "SELECT s.nom, s.rowid, c.statut, c.rowid as contratid, p.ref, c.mise_en_service as datemes, c.fin_validite as datefin, c.date_cloture as dateclo"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."product as p"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE c.fk_soc = s.rowid and c.fk_product = p.rowid"; - if ($socid) - { - $sql .= " AND s.rowid = ".$socid; - } - if (!$user->rights->societe->client->voir && !$socid) //restriction - { - $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - } - $sql .= " ORDER BY c.tms DESC"; - $sql .= $db->plimit(5, 0); - - if ( $db->query($sql) ) - { - $num = $db->num_rows(); - - if ($num > 0) + $langs->load("contracts"); + + $sql = "SELECT s.nom, s.rowid, c.statut, c.rowid as contratid, p.ref, c.mise_en_service as datemes, c.fin_validite as datefin, c.date_cloture as dateclo"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."product as p"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE c.fk_soc = s.rowid and c.fk_product = p.rowid"; + if ($socid) { + $sql .= " AND s.rowid = ".$socid; + } + if (!$user->rights->societe->client->voir && !$socid) //restriction + { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + } + $sql .= " ORDER BY c.tms DESC"; + $sql .= $db->plimit(5, 0); + + if ( $db->query($sql) ) + { + $num = $db->num_rows(); + + if ($num > 0) + { print ''; print ''; $i = 0; - - $staticcontrat=new Contrat($db); - + + $staticcontrat=new Contrat($db); + $var=false; while ($i < $num) - { - $obj = $db->fetch_object(); - print ""; - print "\n"; - print "\n"; - $var=!$var; - $i++; - } + { + $obj = $db->fetch_object(); + print ""; + print "\n"; + print "\n"; + $var=!$var; + $i++; + } print "
'.$langs->trans("LastContracts",5).'
contratid."\">".img_object($langs->trans("ShowContract","contract"))." ".$obj->ref."rowid."\">".img_object($langs->trans("ShowCompany","company"))." ".$obj->nom."".$staticcontrat->LibStatut($obj->statut,3)."
contratid."\">".img_object($langs->trans("ShowContract","contract"))." ".$obj->ref."rowid."\">".img_object($langs->trans("ShowCompany","company"))." ".$obj->nom."".$staticcontrat->LibStatut($obj->statut,3)."

"; + } + } + else + { + dolibarr_print_error($db); } - } - else - { - dolibarr_print_error($db); - } } /* @@ -416,75 +370,75 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire && 0) // \todo A REF */ if ($conf->propal->enabled && $user->rights->propale->lire) { - $langs->load("propal"); - - $now=gmmktime(); - - $sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, ".$db->pdate("p.datep")." as dp"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE p.fk_soc = s.rowid AND p.fk_statut = 1"; - if ($socid) $sql .= " AND s.rowid = ".$socid; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - $sql .= " ORDER BY p.rowid DESC"; - - $result=$db->query($sql); - if ($result) - { - $total = 0; - $num = $db->num_rows($result); - $i = 0; - if ($num > 0) - { - $var=true; + $langs->load("propal"); - print ''; - print ''; - while ($i < $num) - { - $obj = $db->fetch_object($result); - $var=!$var; - print ""; - print '"; - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - $i++; - $total += $obj->total_ttc; - } - if ($total>0) { - print '"; - } - print "
'.$langs->trans("ProposalsOpened").'
'; - - $propalstatic->id=$obj->propalid; - $propalstatic->ref=$obj->ref; - - print ''; - print ''; - print ''; - print '
'; - print $propalstatic->getNomUrl(1); - print ''; - if ($obj->dp < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late")); - print ''; - $filename=sanitizeFileName($obj->ref); - $filedir=$conf->propal->dir_output . '/' . sanitizeFileName($obj->ref); - $urlsource=$_SERVER['PHP_SELF'].'?propalid='.$obj->propalid; - $formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1); - print '
'; - - print "
rowid."\">".img_object($langs->trans("ShowCompany"),"company")." ".dolibarr_trunc($obj->nom,44).""; - print dolibarr_print_date($obj->dp,'day')."".price($obj->total_ttc)."".$propalstatic->LibStatut($obj->fk_statut,3)."
'.$langs->trans("Total")."".price($total)." 

"; - } - } - else - { - dolibarr_print_error($db); - } + $now=gmmktime(); + + $sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, ".$db->pdate("p.datep")." as dp"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE p.fk_soc = s.rowid AND p.fk_statut = 1"; + if ($socid) $sql .= " AND s.rowid = ".$socid; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + $sql .= " ORDER BY p.rowid DESC"; + + $result=$db->query($sql); + if ($result) + { + $total = 0; + $num = $db->num_rows($result); + $i = 0; + if ($num > 0) + { + $var=true; + + print ''; + print ''; + while ($i < $num) + { + $obj = $db->fetch_object($result); + $var=!$var; + print ""; + print '"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + $i++; + $total += $obj->total_ttc; + } + if ($total>0) { + print '"; + } + print "
'.$langs->trans("ProposalsOpened").'
'; + + $propalstatic->id=$obj->propalid; + $propalstatic->ref=$obj->ref; + + print ''; + print ''; + print ''; + print '
'; + print $propalstatic->getNomUrl(1); + print ''; + if ($obj->dp < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late")); + print ''; + $filename=sanitizeFileName($obj->ref); + $filedir=$conf->propal->dir_output . '/' . sanitizeFileName($obj->ref); + $urlsource=$_SERVER['PHP_SELF'].'?propalid='.$obj->propalid; + $formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1); + print '
'; + + print "
rowid."\">".img_object($langs->trans("ShowCompany"),"company")." ".dolibarr_trunc($obj->nom,44).""; + print dolibarr_print_date($obj->dp,'day')."".price($obj->total_ttc)."".$propalstatic->LibStatut($obj->fk_statut,3)."
'.$langs->trans("Total")."".price($total)." 

"; + } + } + else + { + dolibarr_print_error($db); + } } /* @@ -494,67 +448,67 @@ if ($conf->propal->enabled && $user->rights->propale->lire) if ($conf->propal->enabled && $user->rights->propale->lire) { - $NBMAX=5; - + $NBMAX=5; + $sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total_ht, p.ref, p.fk_statut, ".$db->pdate("p.datep")." as dp"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE p.fk_soc = s.rowid AND p.fk_statut > 1"; if ($socid) - { - $sql .= " AND s.rowid = ".$socid; + { + $sql .= " AND s.rowid = ".$socid; } if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql .= " ORDER BY p.rowid DESC"; $sql .= $db->plimit($NBMAX, 0); - + if ( $db->query($sql) ) { $num = $db->num_rows(); - - $i = 0; - print ''; - print ''; - $var=False; - while ($i < $num) - { - $objp = $db->fetch_object(); - print ""; - print ''; - - print ''; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - $i++; - $var=!$var; - - } - - print "
'.$langs->trans("LastClosedProposals",$NBMAX).'
'; - - $propalstatic->id=$objp->propalid; - $propalstatic->ref=$objp->ref; - - print ''; - print ''; - print ''; - print '
'; - print $propalstatic->getNomUrl(1); - print ''; - print ' '; - print ''; - $filename=sanitizeFileName($objp->ref); - $filedir=$conf->propal->dir_output . '/' . sanitizeFileName($objp->ref); - $urlsource=$_SERVER['PHP_SELF'].'?propalid='.$objp->propalid; - $formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1); - print '
'; - - print '
'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44).'"; - print dolibarr_print_date($objp->dp,'day')."".price($objp->total_ht)."".$propalstatic->LibStatut($objp->fk_statut,3)."
"; - $db->free(); + + $i = 0; + print ''; + print ''; + $var=False; + while ($i < $num) + { + $objp = $db->fetch_object(); + print ""; + print ''; + + print ''; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + $i++; + $var=!$var; + + } + + print "
'.$langs->trans("LastClosedProposals",$NBMAX).'
'; + + $propalstatic->id=$objp->propalid; + $propalstatic->ref=$objp->ref; + + print ''; + print ''; + print ''; + print '
'; + print $propalstatic->getNomUrl(1); + print ''; + print ' '; + print ''; + $filename=sanitizeFileName($objp->ref); + $filedir=$conf->propal->dir_output . '/' . sanitizeFileName($objp->ref); + $urlsource=$_SERVER['PHP_SELF'].'?propalid='.$objp->propalid; + $formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1); + print '
'; + + print '
'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44).'"; + print dolibarr_print_date($objp->dp,'day')."".price($objp->total_ht)."".$propalstatic->LibStatut($objp->fk_statut,3)."
"; + $db->free(); } } @@ -563,7 +517,7 @@ print ''; print ''; $db->close(); - + llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php index d52da976707..ca742a24240 100644 --- a/htdocs/includes/menus/barre_left/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php @@ -798,14 +798,6 @@ class MenuLeft { $newmenu->add_submenu(DOL_URL_ROOT."/comm/mailing/liste.php?leftmenu=mailing", $langs->trans("List"), 1, $user->rights->mailing->lire); } - if (! empty($conf->bookmark->enabled)) - { - $langs->load("other"); - $newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/liste.php?leftmenu=bookmarks", $langs->trans("Bookmarks"), 0, $user->rights->bookmark->lire); - $newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/fiche.php?action=create", $langs->trans("NewBookmark"), 1, $user->rights->bookmark->creer); - $newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("List"), 1, $user->rights->bookmark->lire); - } - if (! empty($conf->export->enabled)) { $langs->load("exports"); diff --git a/htdocs/includes/menus/barre_left/eldy_frontoffice.php b/htdocs/includes/menus/barre_left/eldy_frontoffice.php index d410821233f..92dcb89292a 100644 --- a/htdocs/includes/menus/barre_left/eldy_frontoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_frontoffice.php @@ -768,14 +768,6 @@ class MenuLeft { */ } - if ($conf->bookmark->enabled) - { - $langs->load("other"); - $newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/liste.php?leftmenu=bookmarks", $langs->trans("Bookmarks"), 0, $user->rights->bookmark->lire); - $newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/fiche.php?action=create", $langs->trans("NewBookmark"), 1, $user->rights->bookmark->creer); - $newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("List"), 1, $user->rights->bookmark->lire); - } - if ($conf->export->enabled) { $langs->load("exports"); diff --git a/htdocs/includes/menus/barre_top/eldy_backoffice.php b/htdocs/includes/menus/barre_top/eldy_backoffice.php index 38e6b8fb167..1ba5cea8f29 100644 --- a/htdocs/includes/menus/barre_top/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_top/eldy_backoffice.php @@ -231,8 +231,7 @@ class MenuTop { } // Tools - if ($conf->mailing->enabled || $conf->export->enabled || $conf->bookmark->enabled - || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN) + if ($conf->mailing->enabled || $conf->export->enabled || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN) { $langs->load("other"); diff --git a/htdocs/includes/menus/barre_top/eldy_frontoffice.php b/htdocs/includes/menus/barre_top/eldy_frontoffice.php index 682c1a63b5b..4972621ffda 100644 --- a/htdocs/includes/menus/barre_top/eldy_frontoffice.php +++ b/htdocs/includes/menus/barre_top/eldy_frontoffice.php @@ -231,8 +231,7 @@ class MenuTop { } // Tools - if ($conf->mailing->enabled || $conf->export->enabled || $conf->bookmark->enabled - || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN) + if ($conf->mailing->enabled || $conf->export->enabled || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN) { $langs->load("other"); diff --git a/htdocs/includes/menus/barre_top/rodolphe.php b/htdocs/includes/menus/barre_top/rodolphe.php index c6a7c5cc429..68c457cfa27 100644 --- a/htdocs/includes/menus/barre_top/rodolphe.php +++ b/htdocs/includes/menus/barre_top/rodolphe.php @@ -231,8 +231,7 @@ class MenuTop { } // Tools - if ($conf->mailing->enabled || $conf->export->enabled || $conf->bookmark->enabled - || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN) + if ($conf->mailing->enabled || $conf->export->enabled || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN) { $langs->load("other"); diff --git a/htdocs/includes/menus/init_menu_auguria.sql b/htdocs/includes/menus/init_menu_auguria.sql index eb6f6ae8ba2..d2710fa0aa0 100644 --- a/htdocs/includes/menus/init_menu_auguria.sql +++ b/htdocs/includes/menus/init_menu_auguria.sql @@ -262,9 +262,6 @@ insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 3900__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/comm/mailing/index.php?leftmenu=mailing', 'EMailings', 0, 'mails', '$user->rights->mailing->lire', '', 0, 0); insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 3901__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/fiche.php?leftmenu=mailing&action=create', 'NewMailing', 1, 'mails', '$user->rights->mailing->creer', '', 0, 0); insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 3902__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/liste.php?leftmenu=mailing', 'List', 1, 'mails', '$user->rights->mailing->lire', '', 0, 1); -insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4000__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/bookmarks/liste.php?leftmenu=bookmarks', 'Bookmarks', 0, 'other', '$user->rights->bookmark->lire', '', 2, 1); -insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4001__+MAX_llx_menu__, 'tools', '', 4000__+MAX_llx_menu__, '/bookmarks/fiche.php?action=create', 'NewBookmark', 1, 'other', '$user->rights->bookmark->creer', '', 2, 0); -insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4002__+MAX_llx_menu__, 'tools', '', 4000__+MAX_llx_menu__, '/bookmarks/liste.php', 'List', 1, 'other', '$user->rights->bookmark->lire', '', 2, 1); insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4100__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/exports/index.php?leftmenu=export', 'FormatedExport', 0, 'exports', '$user->rights->export->lire', '', 2, 2); insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4101__+MAX_llx_menu__, 'tools', '', 4100__+MAX_llx_menu__, '/exports/export.php?leftmenu=export', 'NewExport', 1, 'exports', '$user->rights->export->creer', '', 2, 0); insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4130__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/admin/import/index.php?leftmenu=import', 'FormatedImport', 0, 'exports', '$user->rights->import->lire', '', 2, 2); diff --git a/htdocs/langs/en_US/bookmarks.lang b/htdocs/langs/en_US/bookmarks.lang new file mode 100644 index 00000000000..9d82e083589 --- /dev/null +++ b/htdocs/langs/en_US/bookmarks.lang @@ -0,0 +1,4 @@ +# Dolibarr language file - en_US - marque pages +CHARSET=UTF-8 +Bookm=Bookmarks +NewBookmark=New bookmark \ No newline at end of file diff --git a/htdocs/langs/fr_FR/bookmarks.lang b/htdocs/langs/fr_FR/bookmarks.lang new file mode 100644 index 00000000000..2190b5754cc --- /dev/null +++ b/htdocs/langs/fr_FR/bookmarks.lang @@ -0,0 +1,4 @@ +# Dolibarr language file - fr_FR - marque pages +CHARSET=UTF-8 +Bookm=Marque pages +NewBookmark=Nouveau marque page \ No newline at end of file diff --git a/htdocs/lib/company.lib.php b/htdocs/lib/company.lib.php index 61bbe0f2d94..d1295284375 100644 --- a/htdocs/lib/company.lib.php +++ b/htdocs/lib/company.lib.php @@ -120,14 +120,6 @@ function societe_prepare_head($objsoc) $h++; } - if ($conf->bookmark->enabled && $user->rights->bookmark->creer) - { - $head[$h][0] = DOL_URL_ROOT."/bookmarks/fiche.php?action=add&socid=".$objsoc->id."&urlsource=".$_SERVER["PHP_SELF"]."?socid=".$objsoc->id; - $head[$h][1] = img_object($langs->trans("BookmarkThisPage"),'bookmark'); - $head[$h][2] = 'image'; - $h++; - } - return $head; } diff --git a/htdocs/lib/product.lib.php b/htdocs/lib/product.lib.php index 95584bc708a..10659142e29 100644 --- a/htdocs/lib/product.lib.php +++ b/htdocs/lib/product.lib.php @@ -143,14 +143,6 @@ function product_prepare_head($product, $user) } } - if ($conf->bookmark->enabled && $user->rights->bookmark->creer) - { - $head[$h][0] = DOL_URL_ROOT."/bookmarks/fiche.php?action=addproduct&id=".$product->id."&urlsource=".$_SERVER["PHP_SELF"]."?id=".$product->id; - $head[$h][1] = img_object($langs->trans("BookmarkThisPage"),'bookmark'); - $head[$h][2] = 'image'; - $h++; - } - return $head; } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 07982c2f5a0..b0d0f78ae25 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -901,6 +901,21 @@ function left_menu($menu_array, $helppagename='', $form_search='') { print $form_search; } + + // Zone d'affichage permanente des marque pages + if ($conf->bookmark->enabled && $user->rights->bookmark->lire) + { + include_once (DOL_DOCUMENT_ROOT.'/bookmarks/bookmarks.lib.php'); + $langs->load("bookmarks"); + + $ret=printBookmarksList($db, $langs); + print "\n"; + print "\n"; + print '
'."\n"; + print $ret; + print '
'."\n"; + print "\n"; + } // Lien vers l'aide en ligne (uniquement si langue fr_FR) if ($helppagename) diff --git a/htdocs/pre.inc.php b/htdocs/pre.inc.php index 5acdb96f3a0..4a22fa7cae9 100644 --- a/htdocs/pre.inc.php +++ b/htdocs/pre.inc.php @@ -1,6 +1,6 @@ - * Copyright (C) 2003 Éric Seigne + * Copyright (C) 2003 �ric Seigne * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Guillaume Delecourt @@ -142,7 +142,7 @@ function llxHeader($head = "") if (! empty($conf->telephonie->enabled)) { - $menu->add(DOL_URL_ROOT."/telephonie/index.php", "Téléphonie"); + $menu->add(DOL_URL_ROOT."/telephonie/index.php", "T�l�phonie"); } if (! empty($conf->don->enabled)) @@ -173,11 +173,6 @@ function llxHeader($head = "") $menu->add(DOL_URL_ROOT."/postnuke/articles/index.php", "Editorial"); } - if (! empty($conf->bookmark->enabled) && $user->rights->bookmark->lire) - { - $menu->add(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("Bookmarks")); - } - if (! empty($conf->export->enabled)) { $langs->load("exports");