Project

General

Profile

Actions

Patch #6050

closed

Add plugin hooks to view_issues sidebar rendering...

Added by Nick Peelman over 13 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Hook requests
Target version:
-
Start date:
2010-08-06
Due date:
% Done:

0%

Estimated time:

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

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

Updated by Eric Davis over 13 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?

Actions #2

Updated by Nick Peelman over 13 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?

Actions #3

Updated by Eric Davis over 13 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.

Actions #4

Updated by Nick Peelman over 13 years ago

Nobody said designing an extensible plugin architecture was easy :)

Actions #5

Updated by Go MAEDA over 7 years ago

  • Category changed from Plugin API to Hook requests
Actions #6

Updated by Go MAEDA over 7 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.

Actions #7

Updated by Nick Peelman over 7 years ago

  • Status changed from New to Resolved

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

Actions #8

Updated by Jan from Planio www.plan.io over 7 years ago

  • Status changed from Resolved to Closed

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

Actions

Also available in: Atom PDF