# HG changeset patch # User Chris Cannam # Date 1371566016 -3600 # Node ID 12556ba57d179ce114d2d1d52443c84d9bd6b207 # Parent 18052001fe119a4f6421c4548c7da0c40ec2bf9b Fix stylesheet inclusion in repo checkout partial diff -r 18052001fe11 -r 12556ba57d17 plugins/redmine_checkout/app/views/redmine_checkout_hooks/_view_repositories_show_contextual.html.erb --- a/plugins/redmine_checkout/app/views/redmine_checkout_hooks/_view_repositories_show_contextual.html.erb Tue Jun 18 14:53:53 2013 +0100 +++ b/plugins/redmine_checkout/app/views/redmine_checkout_hooks/_view_repositories_show_contextual.html.erb Tue Jun 18 15:33:36 2013 +0100 @@ -1,3 +1,8 @@ + +<% content_for :header_tags do %> + <%= stylesheet_link_tag 'checkout', :plugin => 'redmine_checkout' %> +<% end %> +
<% if repository.checkout_description.present? %>
<%= textilizable repository.checkout_description %>
@@ -39,8 +44,3 @@ <% end %>
- -<% content_for :header_tags do %> - <%= stylesheet_link_tag 'checkout', :plugin => 'redmine_checkout' %> - <%= javascript_include_tag 'checkout', :plugin => 'redmine_checkout' %> -<% end %> diff -r 18052001fe11 -r 12556ba57d17 plugins/redmine_checkout/lib/checkout/repository_hooks.rb --- a/plugins/redmine_checkout/lib/checkout/repository_hooks.rb Tue Jun 18 14:53:53 2013 +0100 +++ b/plugins/redmine_checkout/lib/checkout/repository_hooks.rb Tue Jun 18 15:33:36 2013 +0100 @@ -27,8 +27,14 @@ }) options = {:partial => "redmine_checkout_hooks/view_repositories_show_contextual"} - context[:controller].send(:render_to_string, {:locals => context}.merge(options)) + + # cc: cribbed from + # http://www.redmine.org/projects/redmine/repository/revisions/9785/diff/trunk/lib/redmine/hook.rb + # for http://www.redmine.org/issues/11105 (formerly used + # render_to_string on this controller, wasn't working for + # :header_tags) + context[:hook_caller].send(:render, {:locals => context}.merge(options)) end end end -end \ No newline at end of file +end