Skip to content

Commit

Permalink
Add bookmark fa-icon
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed Oct 3, 2019
1 parent d0840b0 commit 8668e71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions htdocs/core/boxes/box_bookmarks.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
class box_bookmarks extends ModeleBoxes
{
public $boxcode="bookmarks";
public $boximg="object_bookmark";
public $boximg="bookmark";
public $boxlabel="BoxMyLastBookmarks";
public $depends = array("bookmark");

Expand Down Expand Up @@ -77,12 +77,12 @@ public function loadBox($max = 5)
'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");
}

Expand Down
8 changes: 6 additions & 2 deletions htdocs/core/lib/functions.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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'
Expand Down Expand Up @@ -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';
Expand Down

0 comments on commit 8668e71

Please sign in to comment.