Patch #6050
closed
Add plugin hooks to view_issues sidebar rendering...
Added by Nick Peelman over 14 years ago.
Updated almost 8 years ago.
Description
After updating from 0.9 to 1.0 and noticing that Watchers had been moved to the sidebar, I got excited, thinking that plugins would get similar capabilities, and would be able to take advantage of the sidebar more (which often seems like wasted spaceā¦).
At the risk of making it overly complex, it would be awesome if that sidebar had a few hooks that could be used by plugins to add their content. I whipped out a patch that would add one for the top, bottom, and essentially the middle (after the sidebar partial, before Watchers). Diff attached.
Files
- Category changed from Issues to Plugin API
- Estimated time deleted (
0.50 h)
The sidebar already has a hook that works on every page in Redmine with a sidebar: :view_layouts_base_sidebar
. Could that work for you?
I think it would be nice to have them inside the context of the current issue, thereby you can just use the hook shorthand to call a partial, and you only need view code, with minimal logic. Using the base sidebar hook, you would have to fetch the current issue yourself (if you can do that, i don't know what the base_sidebar hook context is like).
Eric Davis wrote:
The sidebar already has a hook that works on every page in Redmine with a sidebar: :view_layouts_base_sidebar
. Could that work for you?
Nick Peelman:
I understand. It's just each hook has to be maintained and if we want to rearrange how Redmine's code is laid out, it's more difficult to maintain backwards compatibility if there are various hooks around.
Nobody said designing an extensible plugin architecture was easy :)
- Category changed from Plugin API to Hook requests
Redmine 3.3 has the following hooks in the sidebar.
- :view_issues_sidebar_issues_bottom
- :view_issues_sidebar_planning_bottom
- :view_issues_sidebar_queries_bottom
Maybe :view_issues_sidebar_queries_bottom is equivalent to :view_issues_show_sidebar_before_watchers in the patch.
- Status changed from New to Resolved
It would seem this is resolved in newer versions of Redmine.
- Status changed from Resolved to Closed
Closing this as it's deemed resolved by the initial author.
Also available in: Atom
PDF