Patch #6050

Add plugin hooks to view_issues sidebar rendering...

Added by Nick Peelman about 7 years ago. Updated 10 months ago.

Status:ClosedStart date:2010-08-06
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Hook requests
Target version:-

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.

view_issues_show_sidebar_hooks.diff Magnifier - Adding plugin hooks to view_issues_show sidebar (954 Bytes) Nick Peelman, 2010-08-06 00:46

History

#1 Updated by Eric Davis about 7 years ago

  • Category changed from Issues to Plugin API
  • Estimated time deleted (0.50)

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?

#2 Updated by Nick Peelman about 7 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?

#3 Updated by Eric Davis about 7 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.

#4 Updated by Nick Peelman about 7 years ago

Nobody said designing an extensible plugin architecture was easy :)

#5 Updated by Go MAEDA 10 months ago

  • Category changed from Plugin API to Hook requests

#6 Updated by Go MAEDA 10 months 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.

#7 Updated by Nick Peelman 10 months ago

  • Status changed from New to Resolved

It would seem this is resolved in newer versions of Redmine.

#8 Updated by Jan from Planio www.plan.io 10 months ago

  • Status changed from Resolved to Closed

Closing this as it's deemed resolved by the initial author.

Also available in: Atom PDF