Files
archived-redmine-issue-temp…/lib/issue_templates_issues_hook.rb
2012-03-12 20:36:16 +09:00

18 lines
650 B
Ruby

# To change this template, choose Tools | Templates
# and open the template in the editor.
class IssueTemplatesIssuesHook < Redmine::Hook::ViewListener
include IssuesHelper
def view_layouts_base_html_head(context = {})
o = stylesheet_link_tag('issue_templates', :plugin => 'redmine_issue_templates')
if context[:controller].class.name == 'IssuesController' and
context[:controller].action_name != 'index'
o << javascript_include_tag('issue_templates', :plugin => 'redmine_issue_templates')
end
return o
end
render_on :view_issues_form_details_top, :partial => 'issue_templates/issue_select_form'
end