From 8668e7157abf295f67691ace5458afbe6024909c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Thu, 3 Oct 2019 21:00:59 +0200 Subject: [PATCH] Add bookmark fa-icon --- htdocs/core/boxes/box_bookmarks.php | 6 +++--- htdocs/core/lib/functions.lib.php | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/core/boxes/box_bookmarks.php b/htdocs/core/boxes/box_bookmarks.php index 5d4f51840fa..eec82f0e091 100644 --- a/htdocs/core/boxes/box_bookmarks.php +++ b/htdocs/core/boxes/box_bookmarks.php @@ -29,7 +29,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; class box_bookmarks extends ModeleBoxes { public $boxcode="bookmarks"; - public $boximg="object_bookmark"; + public $boximg="bookmark"; public $boxlabel="BoxMyLastBookmarks"; public $depends = array("bookmark"); @@ -77,12 +77,12 @@ class box_bookmarks extends ModeleBoxes 'sublink' => DOL_URL_ROOT.'/bookmarks/list.php', ); if ($user->rights->bookmark->creer) { - $this->info_box_head['subpicto']='object_bookmark'; + $this->info_box_head['subpicto']='bookmark'; $this->info_box_head['subtext']=$langs->trans("BookmarksManagement"); } else { - $this->info_box_head['subpicto']='object_bookmark'; + $this->info_box_head['subpicto']='bookmark'; $this->info_box_head['subtext']=$langs->trans("ListOfBookmark"); } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a8922ecfa6b..943c5778dce 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3026,7 +3026,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ //if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on'))) if (empty($srconly) && in_array($pictowithouttext, array( '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', - 'address', 'bank', 'building', 'cash-register', 'close_title', 'cubes', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'note', + 'address', 'bank', 'building', 'cash-register', 'close_title', 'cubes', 'delete', 'edit', 'ellipsis-h', 'bookmark', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'note', 'object_list','object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize', 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench', @@ -3043,7 +3043,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $arrayconvpictotofa = array( 'address'=> 'address-book', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt', 'project'=>'sitemap', 'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'generic'=>'folder-open', - 'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', + 'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'bookmark'=>'star', 'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil', 'filter'=>'filter', 'split'=>'code-fork', 'object_list'=>'list-alt','object_calendar'=>'calendar-alt', 'object_calendarweek'=>'calendar-week', 'object_calendarmonth'=>'calendar-alt', 'object_calendarday'=>'calendar-day', 'object_calendarperuser'=>'table', 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', 'title_agenda'=>'calendar-alt' @@ -3084,6 +3084,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ elseif ($pictowithouttext == 'grip_title' || $pictowithouttext == 'grip') { $fakey = 'fa-arrows-alt'; } + elseif ($pictowithouttext == 'bookmark') { + $fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext]; + $fa='far'; + } elseif ($pictowithouttext == 'listlight') { $fakey = 'fa-download'; $facolor = '#999';