Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smal feature request for the local task menu #28

Open
JustFxDev opened this issue Jan 7, 2023 · 3 comments
Open

Smal feature request for the local task menu #28

JustFxDev opened this issue Jan 7, 2023 · 3 comments

Comments

@JustFxDev
Copy link

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

@creecros
Copy link
Owner

creecros commented Jan 7, 2023

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.

@JustFxDev
Copy link
Author

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

@creecros
Copy link
Owner

creecros commented Jan 7, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants