Task2pdf icon indicating copy to clipboard operation
Task2pdf copied to clipboard

Smal feature request for the local task menu

Open JustFxDev opened this issue 2 years ago • 3 comments

Hi creecros,

i wonder if it is possible to have another entry in the local menu of a task. The option to print to pdf directly without the need to open the task first and select this option in the sidebar?

grafik

JustFxDev avatar Jan 07 '23 11:01 JustFxDev

it's definitely possible. just add it to one of the task dropdown hooks in Plugin.php

i.e. $this->template->hook->attach('template:task:dropdown:after-send-mail', 'task2pdf:print');

https://docs.kanboard.org/v1/plugins/hooks/

I'm not sure I would wait on me to ever get around to it though.

creecros avatar Jan 07 '23 13:01 creecros

Hi creecros,

thanks for your immediate response. Great.

Unfortunately that hook seams to have no affect. I tried further with

$this->template->hook->attach('template:task:dropdown:before-actions', 'task2pdf:print');

This leads to

grafik

This works, but looks funny. Is there a limit for the menu entries? Can one have a submenu? Or remove other entries?

Cheers, Fx

JustFxDev avatar Jan 07 '23 19:01 JustFxDev

might need to make a template that more closely matches that dropdown and then hook that instead. it's all in the html.

creecros avatar Jan 07 '23 20:01 creecros