Feature #2649

Need @controller context in plugin hook(view_layouts_base_html_head and view_layouts_base_body_bottom)

Added by Chaoqun Zou almost 9 years ago. Updated almost 9 years ago.

Status:ClosedStart date:2009-02-02
Priority:NormalDue date:
Assignee:Eric Davis% Done:

0%

Category:Plugin API
Target version:0.8.2
Resolution:Fixed

Description

Since there is some need to add plugin's css style into redmine's page, I think it is a good place to add it in the plugin hook of view_layouts_base_html_head.

But I need to know the controller name and action name before doing this, because only a few pages need plugin's css code.

Example:
Add plugin's activity into redmine's activity page need an additional css code.

It's simple to implement, just modify two lines in base.rhtml:

ln17: <%= call_hook :view_layouts_base_html_head, :controller => @controller >
ln64: <
= call_hook :view_layouts_base_body_bottom, :controller => @controller %>


Related issues

Duplicated by Redmine - Feature #2542: Plugin hooks should have access to the "request" variable Closed 2009-01-19

History

#1 Updated by Thomas Löber almost 9 years ago

This relates to #2542 where "controller" and "request" are added to every hook call.

#2 Updated by Eric Davis almost 9 years ago

  • Status changed from New to Resolved
  • Target version set to 0.8.2

As of r2491, the current controller and request values are added to the context.

#3 Updated by Jean-Philippe Lang almost 9 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Fixed

Merged in 0.8-stable in r2558.

Also available in: Atom PDF