Hey guys, I am trying to use some CSS magic to make priority labels easier to differentiate. I would like to change the color and style of the little P0, P1, P2, P3 label on the task based on the priority (not linked to task color itself) to make high priority tasks easy to find while still having the option to color a task for a different purpose, concept:
For stuff like this I think I need the priority to be an attribute of the “task-priority” element of the task, which it now is not. The P0, P1, P2, P3 part of the element is now just text, that I cannot use for conditional formatting as far as I know.
Anyone with some more experience than me who can help me in the right direction?
Possibly I have to make a plugin that changes this part of TaskHelper.php:
I dont believe there is a simple mechanism to just override a helper, so you will need to register your custom helper, and then override the templates that call the previous one, where you need it to call your helper.
register a helper: $this->helper->register('newTaskHelper', '\Kanboard\Plugin\MyPlugin\Helper\NewTaskHelper');
example, call your helper in a template: <?= $this->helper->newTaskHelper->renderMyFunction($variable1, $variable2) ?>
Couple things to keep in mind. When you override a template, any updates to that template in Kanboard, will no longer be within your template, unless you keep it up to date. Multiple plugins that override the same template, will not happen, only one template will win the override contest.
Going back to my previous suggestion, eliminates both problems.