New: Can add a bookmark on all dolibarr pages.
This commit is contained in:
parent
7855cf7086
commit
df0ef9efe5
@ -1,4 +1,4 @@
|
|||||||
#Thu Jan 22 02:05:11 CET 2009
|
#Fri Jan 23 00:49:24 CET 2009
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
encoding//dev/initdemo/initdemo.sql=UTF-8
|
encoding//dev/initdemo/initdemo.sql=UTF-8
|
||||||
encoding//dev/skeletons/modMyModule.class.php=ISO-8859-1
|
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/agenda.lang=UTF-8
|
||||||
encoding//htdocs/langs/en_US/banks.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/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/boxes.lang=UTF-8
|
||||||
encoding//htdocs/langs/en_US/categories.lang=UTF-8
|
encoding//htdocs/langs/en_US/categories.lang=UTF-8
|
||||||
encoding//htdocs/langs/en_US/commercial.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/agenda.lang=UTF-8
|
||||||
encoding//htdocs/langs/fr_FR/banks.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/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/boxes.lang=UTF-8
|
||||||
encoding//htdocs/langs/fr_FR/categories.lang=UTF-8
|
encoding//htdocs/langs/fr_FR/categories.lang=UTF-8
|
||||||
encoding//htdocs/langs/fr_FR/commercial.lang=UTF-8
|
encoding//htdocs/langs/fr_FR/commercial.lang=UTF-8
|
||||||
|
|||||||
@ -3,6 +3,7 @@ English Dolibarr changelog
|
|||||||
***** Changelog for 2.5.1 compared to 2.5 *****
|
***** Changelog for 2.5.1 compared to 2.5 *****
|
||||||
|
|
||||||
For users:
|
For users:
|
||||||
|
- New: Can add bookmarks on all pages.
|
||||||
- New: Enhance bank transactions reportings.
|
- New: Enhance bank transactions reportings.
|
||||||
- New: When creating a contact from a third party, informations from third party card
|
- New: When creating a contact from a third party, informations from third party card
|
||||||
are automatically suggested.
|
are automatically suggested.
|
||||||
|
|||||||
190
bookmarks.patch
Normal file
190
bookmarks.patch
Normal file
@ -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 @@
|
||||||
|
+<?php
|
||||||
|
+
|
||||||
|
+ function printBookmarksList ($aDb, $aLangs) {
|
||||||
|
+ $db = $aDb;
|
||||||
|
+ $langs = $aLangs;
|
||||||
|
+
|
||||||
|
+ require_once(DOL_DOCUMENT_ROOT."/bookmarks/bookmark.class.php");
|
||||||
|
+
|
||||||
|
+ $bookm = new Bookmark($db);
|
||||||
|
+
|
||||||
|
+ $langs->load("bookmarks");
|
||||||
|
+
|
||||||
|
+ $ret = '';
|
||||||
|
+ $ret .= '<div class="blockvmenupair">';
|
||||||
|
+
|
||||||
|
+ $ret .= '<div class="menu_titre">';
|
||||||
|
+ $ret .= '<a class="vsmenu" href="'.DOL_URL_ROOT.'/bookmarks/liste.php">'.$langs->trans('Bookm').'</a>';
|
||||||
|
+ $ret .= '<a class="vsmenu"" href="'.DOL_URL_ROOT.'/bookmarks/fiche.php?action=create"><img style="border: none; position: relative;" src="'.DOL_URL_ROOT.'/bookmarks/add.png" alt="'.$langs->trans('NewBookmark').'" title="'.$langs->trans('NewBookmark').'" /></a>';
|
||||||
|
+ $ret .= '</div>';
|
||||||
|
+
|
||||||
|
+ $ret .= '<div class="menu_contenu">';
|
||||||
|
+
|
||||||
|
+ $sql = "
|
||||||
|
+ SELECT rowid FROM ".MAIN_DB_PREFIX."bookmark
|
||||||
|
+ WHERE true
|
||||||
|
+ ;";
|
||||||
|
+
|
||||||
|
+ if ( $resql = $db->query($sql) ) {
|
||||||
|
+
|
||||||
|
+ while ( $obj = $db->fetch_object($resql) ) {
|
||||||
|
+
|
||||||
|
+ $bookm->fetch($obj->rowid);
|
||||||
|
+
|
||||||
|
+ $ret .='<a class="vsmenu" title="'.$bookm->title.'" href="'.$bookm->url.'">'.dolibarr_trunc($bookm->title, 30).'</a><br />';
|
||||||
|
+
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ } else {
|
||||||
|
+
|
||||||
|
+ dolibarr_print_error($db);
|
||||||
|
+
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ $ret .= '</div>';
|
||||||
|
+
|
||||||
|
+ $ret .= '<div class="menu_fin"></div></div>';
|
||||||
|
+
|
||||||
|
+ 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 @@
|
||||||
|
++<?php
|
||||||
|
++
|
||||||
|
++ function printBookmarksList ($aDb, $aLangs) {
|
||||||
|
++ $db = $aDb;
|
||||||
|
++ $langs = $aLangs;
|
||||||
|
++
|
||||||
|
++ require_once(DOL_DOCUMENT_ROOT."/bookmarks/bookmark.class.php");
|
||||||
|
++
|
||||||
|
++ $bookm = new Bookmark($db);
|
||||||
|
++
|
||||||
|
++ $langs->load("bookmarks");
|
||||||
|
++
|
||||||
|
++ $ret = '';
|
||||||
|
++ $ret .= '<div class="blockvmenupair">';
|
||||||
|
++
|
||||||
|
++ $ret .= '<div class="menu_titre">';
|
||||||
|
++ $ret .= '<a class="vsmenu" href="'.DOL_URL_ROOT.'/bookmarks/liste.php">'.$langs->trans('Bookm').'</a>';
|
||||||
|
++ $ret .= '<a class="vsmenu"" href="'.DOL_URL_ROOT.'/bookmarks/fiche.php?action=create"><img style="border: none; position: relative;" src="'.DOL_URL_ROOT.'/bookmarks/add.png" alt="'.$langs->trans('NewBookmark').'" title="'.$langs->trans('NewBookmark').'" /></a>';
|
||||||
|
++ $ret .= '</div>';
|
||||||
|
++
|
||||||
|
++ $ret .= '<div class="menu_contenu">';
|
||||||
|
++
|
||||||
|
++ $sql = "
|
||||||
|
++ SELECT rowid FROM ".MAIN_DB_PREFIX."bookmark
|
||||||
|
++ WHERE true
|
||||||
|
++ ;";
|
||||||
|
++
|
||||||
|
++ if ( $resql = $db->query($sql) ) {
|
||||||
|
++
|
||||||
|
++ while ( $obj = $db->fetch_object($resql) ) {
|
||||||
|
++
|
||||||
|
++ $bookm->fetch($obj->rowid);
|
||||||
|
++
|
||||||
|
++ $ret .='<a class="vsmenu" title="'.$bookm->title.'" href="'.$bookm->url.'">'.dolibarr_trunc($bookm->title, 30).'</a><br />';
|
||||||
|
++
|
||||||
|
++ }
|
||||||
|
++
|
||||||
|
++ } else {
|
||||||
|
++
|
||||||
|
++ dolibarr_print_error($db);
|
||||||
|
++
|
||||||
|
++ }
|
||||||
|
++
|
||||||
|
++ $ret .= '</div>';
|
||||||
|
++
|
||||||
|
++ $ret .= '<div class="menu_fin"></div></div>';
|
||||||
|
++
|
||||||
|
++ 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)
|
||||||
|
+ {
|
||||||
69
htdocs/bookmarks/bookmarks.lib.php
Normal file
69
htdocs/bookmarks/bookmarks.lib.php
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
*
|
||||||
|
* 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.= '<div class="menu_titre"><a class="vmenu" href="'.DOL_URL_ROOT.'/bookmarks/liste.php">'.$langs->trans('Bookm').'</a></div>';
|
||||||
|
// Menu New bookmark
|
||||||
|
$ret.= '<div class="menu_contenu"><a class="vsmenu" href="'.DOL_URL_ROOT.'/bookmarks/fiche.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url).'">';
|
||||||
|
$ret.= $langs->trans('NewBookmark').'</a><br></div>';
|
||||||
|
// 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.='<div class="menu_contenu"><a class="vsmenu" title="'.$obj->title.'" href="'.$obj->url.'">';
|
||||||
|
$ret.=' '.img_object($langs->trans("BookmarkThisPage"),'bookmark').' ';
|
||||||
|
$ret.= dolibarr_trunc($obj->title, 30).'</a><br></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
dolibarr_print_error($db);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$ret .= '<div class="menu_fin"></div>';
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -39,7 +39,7 @@ if (!$user->rights->societe->lire)
|
|||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
// S<>curit<69> acc<63>s client
|
// S<>curit<69> acc<63>s clien
|
||||||
$socid='';
|
$socid='';
|
||||||
if ($_GET["socid"]) { $socid=$_GET["socid"]; }
|
if ($_GET["socid"]) { $socid=$_GET["socid"]; }
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
@ -230,52 +230,6 @@ if ($conf->commande->enabled && $user->rights->commande->lire)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* 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 '<table class="noborder" width="100%">';
|
|
||||||
print "<tr class=\"liste_titre\">";
|
|
||||||
print "<td colspan=\"2\">".$langs->trans("Bookmarks")."</td>";
|
|
||||||
print "</tr>\n";
|
|
||||||
$var=true;
|
|
||||||
|
|
||||||
while ($i < $num)
|
|
||||||
{
|
|
||||||
$obj = $db->fetch_object();
|
|
||||||
$var = !$var;
|
|
||||||
print "<tr $bc[$var]>";
|
|
||||||
print '<td><a href="fiche.php?socid='.$obj->rowid.'">'.$obj->nom.'</a></td>';
|
|
||||||
print '<td align="right"><a href="index.php?action=del_bookmark&bid='.$obj->bid.'">';
|
|
||||||
print img_delete();
|
|
||||||
print '</a></td>';
|
|
||||||
print '</tr>';
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
print '</table>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
$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))
|
if (! empty($conf->export->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("exports");
|
$langs->load("exports");
|
||||||
|
|||||||
@ -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)
|
if ($conf->export->enabled)
|
||||||
{
|
{
|
||||||
$langs->load("exports");
|
$langs->load("exports");
|
||||||
|
|||||||
@ -231,8 +231,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Tools
|
// Tools
|
||||||
if ($conf->mailing->enabled || $conf->export->enabled || $conf->bookmark->enabled
|
if ($conf->mailing->enabled || $conf->export->enabled || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN)
|
||||||
|| $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN)
|
|
||||||
{
|
{
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|
||||||
|
|||||||
@ -231,8 +231,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Tools
|
// Tools
|
||||||
if ($conf->mailing->enabled || $conf->export->enabled || $conf->bookmark->enabled
|
if ($conf->mailing->enabled || $conf->export->enabled || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN)
|
||||||
|| $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN)
|
|
||||||
{
|
{
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|
||||||
|
|||||||
@ -231,8 +231,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Tools
|
// Tools
|
||||||
if ($conf->mailing->enabled || $conf->export->enabled || $conf->bookmark->enabled
|
if ($conf->mailing->enabled || $conf->export->enabled || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN)
|
||||||
|| $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN)
|
|
||||||
{
|
{
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|
||||||
|
|||||||
@ -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', 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', 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', 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', 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', 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);
|
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);
|
||||||
|
|||||||
4
htdocs/langs/en_US/bookmarks.lang
Normal file
4
htdocs/langs/en_US/bookmarks.lang
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Dolibarr language file - en_US - marque pages
|
||||||
|
CHARSET=UTF-8
|
||||||
|
Bookm=Bookmarks
|
||||||
|
NewBookmark=New bookmark
|
||||||
4
htdocs/langs/fr_FR/bookmarks.lang
Normal file
4
htdocs/langs/fr_FR/bookmarks.lang
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Dolibarr language file - fr_FR - marque pages
|
||||||
|
CHARSET=UTF-8
|
||||||
|
Bookm=Marque pages
|
||||||
|
NewBookmark=Nouveau marque page
|
||||||
@ -120,14 +120,6 @@ function societe_prepare_head($objsoc)
|
|||||||
$h++;
|
$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;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -902,6 +902,21 @@ function left_menu($menu_array, $helppagename='', $form_search='')
|
|||||||
print $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 "<!-- Begin Bookmarks -->\n";
|
||||||
|
print '<div class="blockvmenupair">'."\n";
|
||||||
|
print $ret;
|
||||||
|
print '</div>'."\n";
|
||||||
|
print "<!-- End Bookmarks -->\n";
|
||||||
|
}
|
||||||
|
|
||||||
// Lien vers l'aide en ligne (uniquement si langue fr_FR)
|
// Lien vers l'aide en ligne (uniquement si langue fr_FR)
|
||||||
if ($helppagename)
|
if ($helppagename)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Éric Seigne <erics@rycks.com>
|
* Copyright (C) 2003 <EFBFBD>ric Seigne <erics@rycks.com>
|
||||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be>
|
* Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be>
|
||||||
@ -142,7 +142,7 @@ function llxHeader($head = "")
|
|||||||
|
|
||||||
if (! empty($conf->telephonie->enabled))
|
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<EFBFBD>l<EFBFBD>phonie");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->don->enabled))
|
if (! empty($conf->don->enabled))
|
||||||
@ -173,11 +173,6 @@ function llxHeader($head = "")
|
|||||||
$menu->add(DOL_URL_ROOT."/postnuke/articles/index.php", "Editorial");
|
$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))
|
if (! empty($conf->export->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("exports");
|
$langs->load("exports");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user