Enhancement in bookmark module
This commit is contained in:
parent
6254a6a217
commit
69d6ce7467
@ -43,12 +43,9 @@ function printBookmarksList ($aDb, $aLangs)
|
|||||||
$ret.= '<div class="menu_titre">';
|
$ret.= '<div class="menu_titre">';
|
||||||
$ret.= '<table class="nobordernopadding" width="100%"><tr class="no"><td>';
|
$ret.= '<table class="nobordernopadding" width="100%"><tr class="no"><td>';
|
||||||
$ret.= '<a class="vmenu" href="'.DOL_URL_ROOT.'/bookmarks/liste.php">'.$langs->trans('Bookm').'</a>';
|
$ret.= '<a class="vmenu" href="'.DOL_URL_ROOT.'/bookmarks/liste.php">'.$langs->trans('Bookm').'</a>';
|
||||||
// $ret.='</div>';
|
|
||||||
// Menu New bookmark
|
|
||||||
// $ret.= '<div class="menu_contenu">';
|
|
||||||
$ret.= '</td><td align="right">';
|
$ret.= '</td><td align="right">';
|
||||||
$ret.= '<a class="vsmenu" href="'.DOL_URL_ROOT.'/bookmarks/fiche.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url).'">';
|
$ret.= '<a class="vsmenu" href="'.DOL_URL_ROOT.'/bookmarks/fiche.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url).'">';
|
||||||
// $ret.= $langs->trans('NewBookmark');
|
//$ret.=img_picto($langs->trans('AddThisPageToBookmarks'),'edit_add').' ';
|
||||||
$ret.=img_object($langs->trans('AddThisPageToBookmarks'),'bookmark');
|
$ret.=img_object($langs->trans('AddThisPageToBookmarks'),'bookmark');
|
||||||
$ret.= '</a>';
|
$ret.= '</a>';
|
||||||
$ret.= '</td></tr></table>';
|
$ret.= '</td></tr></table>';
|
||||||
@ -57,15 +54,19 @@ function printBookmarksList ($aDb, $aLangs)
|
|||||||
if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU))
|
if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU))
|
||||||
{
|
{
|
||||||
$sql = "SELECT rowid, title, url FROM ".MAIN_DB_PREFIX."bookmark";
|
$sql = "SELECT rowid, title, url FROM ".MAIN_DB_PREFIX."bookmark";
|
||||||
if ( $resql = $db->query($sql) ) {
|
if ($resql = $db->query($sql) )
|
||||||
while ( $obj = $db->fetch_object($resql) ) {
|
{
|
||||||
|
$i=0;
|
||||||
|
while ($i < $conf->global->BOOKMARKS_SHOW_IN_MENU && $obj = $db->fetch_object($resql))
|
||||||
|
{
|
||||||
$ret.='<div class="menu_contenu"><a class="vsmenu" title="'.$obj->title.'" href="'.$obj->url.'">';
|
$ret.='<div class="menu_contenu"><a class="vsmenu" title="'.$obj->title.'" href="'.$obj->url.'">';
|
||||||
$ret.=' '.img_object($langs->trans("BookmarkThisPage"),'bookmark').' ';
|
$ret.=' '.img_object($langs->trans("BookmarkThisPage"),'bookmark').' ';
|
||||||
$ret.= dolibarr_trunc($obj->title, 30).'</a><br></div>';
|
$ret.= dolibarr_trunc($obj->title, 20).'</a><br></div>';
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
else
|
||||||
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* 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
|
||||||
|
|||||||
@ -911,7 +911,7 @@ function img_object($alt, $object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Affiche picto (fonction generique)
|
* \brief Show picto (generic function)
|
||||||
* \param alt Texte sur le alt de l'image
|
* \param alt Texte sur le alt de l'image
|
||||||
* \param picto Nom de l'image a afficher (Si pas d'extension, on met '.png')
|
* \param picto Nom de l'image a afficher (Si pas d'extension, on met '.png')
|
||||||
* \param options Attribut supplementaire a la balise img
|
* \param options Attribut supplementaire a la balise img
|
||||||
@ -927,12 +927,12 @@ function img_picto($alt, $picto, $options='', $pictoisfullpath=0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Affiche picto (fonction g<EFBFBD>n<EFBFBD>rique)
|
* \brief Show picto (generic function)
|
||||||
\param alt Texte sur le alt de l'image
|
* \param alt Texte sur le alt de l'image
|
||||||
\param picto Nom de l'image a afficher (Si pas d'extension, on met '.png')
|
* \param picto Nom de l'image a afficher (Si pas d'extension, on met '.png')
|
||||||
\param options Attribut supplementaire a la balise img
|
* \param options Attribut supplementaire a la balise img
|
||||||
\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)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user