Class: Redmine::Hook::ViewListener
- Includes:
- ActionController::UrlWriter, ActionView::Helpers::AssetTagHelper, ActionView::Helpers::FormHelper, ActionView::Helpers::FormOptionsHelper, ActionView::Helpers::FormTagHelper, ActionView::Helpers::JavaScriptHelper, ActionView::Helpers::NumberHelper, ActionView::Helpers::PrototypeHelper, ActionView::Helpers::TagHelper, ActionView::Helpers::TextHelper, ActionView::Helpers::UrlHelper, ApplicationHelper, ERB::Util
- Defined in:
- lib/redmine/hook.rb
Overview
Listener class used for views hooks. Listeners that inherit this class will include various helpers by default.
Constant Summary
Constants included from ApplicationHelper
ApplicationHelper::HEADING_RE, ApplicationHelper::TOC_RE
Class Method Summary collapse
-
.default_url_options ⇒ Object
Default to creating links using only the path.
-
.render_on(hook, options = {}) ⇒ Object
Helper method to directly render a partial using the context:.
Methods included from ApplicationHelper
#accesskey, #api_meta, #authoring, #authorize_for, #avatar, #back_url_hidden_field_tag, #body_css_classes, #breadcrumb, #calendar_for, #check_all_links, #checked_image, #content_for, #context_menu, #context_menu_link, #current_theme, #due_date_distance_in_words, #favicon, #format_activity_day, #format_activity_description, #format_activity_title, #format_version_name, #has_content?, #heads_for_theme, #html_hours, #html_title, #image_to_function, #include_calendar_headers_tags, #include_in_api_response?, #javascript_heads, #label_tag_for, #labelled_tabular_form_for, #lang_options_for_select, #link_to_attachment, #link_to_if_authorized, #link_to_issue, #link_to_message, #link_to_project, #link_to_remote_if_authorized, #link_to_revision, #link_to_user, #other_formats_links, #page_header_title, #pagination_links_full, #parse_headings, #parse_inline_attachments, #parse_non_pre_blocks, #parse_redmine_links, #parse_wiki_links, #path_to_stylesheet, #per_page_links, #principals_check_box_tags, #progress_bar, #project_nested_ul, #project_tree, #project_tree_options_for_select, #prompt_to_remote, #render_flash_messages, #render_page_hierarchy, #render_project_jump_box, #render_tabs, #reorder_links, #replace_toc, #simple_format_without_paragraph, #stylesheet_path, #syntax_highlight, #textilizable, #time_tag, #to_path_param, #toggle_link, #truncate_lines, #truncate_single_line
Methods included from I18n
#current_language, #day_name, #find_language, #format_date, #format_time, included, #l, #l_hours, #l_or_humanize, #ll, #month_name, #set_language_if_valid, #valid_languages
Methods included from WikiFormatting::Macros::Definitions
#exec_macro, #extract_macro_options
Methods inherited from Listener
Class Method Details
.default_url_options ⇒ Object
Default to creating links using only the path. Subclasses can change this default as needed
101 102 103 |
# File 'lib/redmine/hook.rb', line 101 def self. {:only_path => true } end |
.render_on(hook, options = {}) ⇒ Object
Helper method to directly render a partial using the context:
class MyHook < Redmine::Hook::ViewListener
render_on :view_issues_show_details_bottom, :partial => "show_more_data"
end
111 112 113 114 115 |
# File 'lib/redmine/hook.rb', line 111 def self.render_on(hook, ={}) define_method hook do |context| context[:controller].send(:render_to_string, {:locals => context}.merge()) end end |