From 7083a55e0333d717f0e25f79b740e79753a00105 Mon Sep 17 00:00:00 2001 From: tp_dhu Date: Thu, 27 Mar 2025 11:33:49 +0000 Subject: [PATCH] added a new fatfree extension to offer --- app/extensions/IconsHelper.php | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/app/extensions/IconsHelper.php b/app/extensions/IconsHelper.php index c733ffb..e4d77ed 100644 --- a/app/extensions/IconsHelper.php +++ b/app/extensions/IconsHelper.php @@ -3,16 +3,23 @@ class IconsHelper extends \Prefab { static public $status_icons = [ - 'New' => ['fas fa-plus-circle has-text-warning', "πŸ†•"], - 'In Progress' => ['fas fa-repeat has-text-link', "πŸ”„"], - 'On Hold' => ['fas fa-pause-circle has-text-danger',"⏸️"], - 'Completed' => ['fas fa-check-circle has-text-success', "βœ…"] + 'New' => ['fas fa-circle-dot has-text-success', "πŸ†•"], + 'In Progress' => ['fas fa-circle-play has-text-link', "πŸ”„"], + 'On Hold' => ['fas fa-pause-circle has-text-warning',"⏸️"], + 'Completed' => ['fas fa-check-circle has-text-danger', "βœ…"] ]; static public $priority_icons = [ - 'Low' => ['fas fa-arrow-down',"🟒"], - 'Medium' => ['fas fa-minus', "🟑"], - 'High' => ['fas fa-arrow-up', "πŸ”΄"] + 'Low' => ['fas fa-circle-down',"🟒"], + 'Medium' => ['fas fa-circle-dot', "🟑"], + 'High' => ['fas fa-circle-up', "πŸ”΄"] + ]; + + static public $priority_colors = [ + 'Low' => 'success', + 'Medium' => 'warning', + 'High' => 'danger', + '' => 'info' ]; static public function icons($node){ @@ -38,13 +45,21 @@ class IconsHelper extends \Prefab { break; case 'priority': $icon_class = IconsHelper::$priority_icons[$value] ?? ['fas fa-question-circle', "πŸ”²"]; + $icon_color = IconsHelper::$priority_colors[$value] ?? 'info'; break; default: $icon_class = 'fas fa-question-circle'; } + if($type == 'priority'){ + // return '

' + return ' + + '; + } else { + return ''; + } return ''.$icon_class[1].''; - return ''; }