Verified Commit 94aad523 authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: Feat(Tasks) - Enhances column class for tasks

Removes filter tasks method and simplifies the class
Showing with 5 additions and 11 deletions
+5 -11
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
/*! /*!
* \brief Column rendering Tasks * \brief Column rendering Tasks
* Important that a "query method" must be defined in order to have the listing
*/ */
class tasksColumn extends Column class tasksColumn extends Column
...@@ -33,7 +34,7 @@ class tasksColumn extends Column ...@@ -33,7 +34,7 @@ class tasksColumn extends Column
} else { } else {
switch ($this->attributes[0]) { switch ($this->attributes[0]) {
case 'TYPE': case 'TYPE':
return static::filterTypes($value, $entry['PROGRESS']); return static::filterTypes();
case 'TIMESTAMP': case 'TIMESTAMP':
return static::filterSchedule($value); return static::filterSchedule($value);
case 'STATUS': case 'STATUS':
...@@ -44,17 +45,10 @@ class tasksColumn extends Column ...@@ -44,17 +45,10 @@ class tasksColumn extends Column
} }
} }
static function filterTypes (string $name, string $targetdn, string $targettype): string static function filterTypes (): string
{ {
$text = ''; //A method retriving the type of the tasks.
if (!empty($name) && ($name != 'none')) { return '';
$text = $name;
}
if (!empty($targetdn) && !empty($targettype)) {
return objects::link($targetdn, $targettype, '', $text, TRUE);
} else {
return htmlescape($text);
}
} }
static function filterSchedule (string $stamp): string static function filterSchedule (string $stamp): string
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment