Class: AdditionalTags::Hooks::ViewHook
- Inherits:
-
Redmine::Hook::ViewListener
- Object
- Redmine::Hook::ViewListener
- AdditionalTags::Hooks::ViewHook
- Defined in:
- lib/additional_tags/hooks/view_hook.rb
Instance Method Summary collapse
- #controller_issues_bulk_edit_before_save(context = {}) ⇒ Object
- #controller_issues_edit_before_save(context = {}) ⇒ Object
-
#view_issue_pdf_fields(context = {}) ⇒ Object
this hook is missing in redmine core at the moment.
-
#view_wiki_pdf_buttom(context = {}) ⇒ Object
this hook is missing in redmine core at the moment.
Instance Method Details
#controller_issues_bulk_edit_before_save(context = {}) ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/additional_tags/hooks/view_hook.rb', line 28 def controller_issues_bulk_edit_before_save(context = {}) return unless AdditionalTags.setting? :active_issue_tags issue = context[:issue] params = context[:params] issue, params issue, params end |
#controller_issues_edit_before_save(context = {}) ⇒ Object
22 23 24 25 26 |
# File 'lib/additional_tags/hooks/view_hook.rb', line 22 def controller_issues_edit_before_save(context = {}) return unless AdditionalTags.setting? :active_issue_tags context[:issue], context[:params] end |
#view_issue_pdf_fields(context = {}) ⇒ Object
this hook is missing in redmine core at the moment
39 40 41 42 43 44 45 46 47 |
# File 'lib/additional_tags/hooks/view_hook.rb', line 39 def view_issue_pdf_fields(context = {}) issue = context[:issue] right = context[:right] if AdditionalTags.setting?(:active_issue_tags) && User.current.allowed_to?(:view_issue_tags, issue.project) right << [l(:field_tag_list), issue.tag_list] end end |
#view_wiki_pdf_buttom(context = {}) ⇒ Object
this hook is missing in redmine core at the moment
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/additional_tags/hooks/view_hook.rb', line 50 def view_wiki_pdf_buttom(context = {}) page = context[:page] pdf = context[:pdf] return if page.tag_list.blank? pdf.ln 5 pdf.SetFontStyle 'B', 9 pdf.RDMCell 190, 5, l(:field_tag_list), 'B' pdf.ln pdf.SetFontStyle '', 8 pdf.RDMCell 190, 5, page.tag_list.to_comma_list pdf.ln end |