Patch #6050
closedAdd plugin hooks to view_issues sidebar rendering...
0%
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
Updated by Eric Davis over 14 years ago
- 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?
Updated by Nick Peelman over 14 years ago
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?
Updated by Eric Davis over 14 years ago
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.
Updated by Nick Peelman over 14 years ago
Nobody said designing an extensible plugin architecture was easy :)
Updated by Go MAEDA almost 8 years ago
- Category changed from Plugin API to Hook requests
Updated by Go MAEDA almost 8 years ago
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.
Updated by Nick Peelman almost 8 years ago
- Status changed from New to Resolved
It would seem this is resolved in newer versions of Redmine.
Updated by Jan from Planio www.plan.io almost 8 years ago
- Status changed from Resolved to Closed
Closing this as it's deemed resolved by the initial author.