プロジェクト

全般

プロフィール

Vote #64572

完了

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

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Plugin API_20
対象バージョン:
開始日:
2009/02/02
期日:
進捗率:

0%

予定工数:
category_id:
20
version_id:
8
issue_org_id:
2649
author_id:
460
assigned_to_id:
5
comments:
3
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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 %>


journals

This relates to #2542 where "controller" and "request" are added to every hook call.
--------------------------------------------------------------------------------
As of r2491, the current @controller@ and @request@ values are added to the context.

--------------------------------------------------------------------------------
Merged in 0.8-stable in r2558.
--------------------------------------------------------------------------------


related_issues

duplicates,Closed,2542,Plugin hooks should have access to the "request" variable

Admin Redmine さんが4年以上前に更新

  • カテゴリPlugin API_20 にセット
  • 対象バージョン0.8.2_8 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0