Redmine - Extending context menu

I want to extend the functionality of the context menu of a Redmine plugin. I found the context menu view I want to modify. However I feel lost. I am new to Redmine api. I want to be able to select some items and make a function to only show these items. My question is how to get the selected items. Are they stored inthe session or..? Any documentation you can point me to regarding context menu will be of great help aswell. Thank you for your time!

Upvotes: 2

Views: 452

Answers (1)

Aleksandar Pavić
Aleksandar Pavić

Reputation: 3440

You should use view hooks to extend view-related elements.

For your particular case, view hook is:

:view_issues_context_menu_start 

or

:view_issues_context_menu_end

To see a full list of hooks, go to: http://www.redmine.org/projects/redmine/wiki/Hooks_List#View-hooks

But sometimes that list is not updated, so the most reliable way to find hooks is to find call_hook in source files, so you can use grep from command console like this:

grep -r call_hook *    # list of source lines with hook calls

Upvotes: 0

Related Questions