Dodanie toolbara z przyciskami.
[redakcja.git] / redmine / redmine_publications / lib / issue_publication_hook.rb
1 # Provides a link to the document on the platform
2 class IssuesPublicationHook < Redmine::Hook::ViewListener
3   def view_issues_show_details_bottom(context)
4         result = "<tr><td><b>Source File(s):</b></td><td>"
5         names = context[:issue].source_files.map {|name| "<span>" + name + "</span>"} 
6         result << names.join(', ')
7         result + "</td></tr>"
8   end
9
10   def controller_issues_edit_before_save(context)
11         pub_field = context[:params][:issue_source_files]
12         context[:issue].source_files = pub_field
13   end
14
15   render_on :view_issues_form_details_bottom, :partial => 'issue_form_pub'
16 end