Class: Redmine::FieldFormat::TextFormat
Overview
Instance Method Summary
collapse
-
#bulk_edit_tag(view, tag_id, tag_name, custom_field, objects, value, options = {}) ⇒ Object
-
#edit_tag(view, tag_id, tag_name, custom_value, options = {}) ⇒ Object
-
#formatted_value(view, custom_field, value, customized = nil, html = false) ⇒ Object
-
#query_filter_options(custom_field, query) ⇒ Object
Methods inherited from Unbounded
#validate_single_value
Methods inherited from Base
#after_save_custom_value, #before_custom_field_save, #cast_custom_value, #cast_single_value, #cast_value, field_attributes, #formatted_custom_value, #group_statement, #join_for_order_statement, #label, #name, #order_statement, #possible_custom_value_options, #possible_values_options, #set_custom_field_value, #target_class, #validate_custom_field, #validate_custom_value, #validate_single_value, #value_from_keyword
#uri_with_safe_scheme?
Methods included from I18n
#current_language, #day_letter, #day_name, #find_language, #format_date, #format_hours, #format_time, #l, #l_hours, #l_hours_short, #l_or_humanize, #languages_options, #ll, #lu, #month_name, #set_language_if_valid, #valid_languages
Instance Method Details
#bulk_edit_tag(view, tag_id, tag_name, custom_field, objects, value, options = {}) ⇒ Object
418
419
420
421
422
|
# File 'lib/redmine/field_format.rb', line 418
def bulk_edit_tag(view, tag_id, tag_name, custom_field, objects, value, options={})
view.text_area_tag(tag_name, value, options.merge(:id => tag_id, :rows => 8)) +
'<br />'.html_safe +
bulk_clear_tag(view, tag_id, tag_name, custom_field, value)
end
|
#edit_tag(view, tag_id, tag_name, custom_value, options = {}) ⇒ Object
414
415
416
|
# File 'lib/redmine/field_format.rb', line 414
def edit_tag(view, tag_id, tag_name, custom_value, options={})
view.text_area_tag(tag_name, custom_value.value, options.merge(:id => tag_id, :rows => 8))
end
|
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
|
# File 'lib/redmine/field_format.rb', line 398
def formatted_value(view, custom_field, value, customized=nil, html=false)
if html
if value.present?
if custom_field.text_formatting == 'full'
view.textilizable(value, :object => customized)
else
view.simple_format(html_escape(value))
end
else
''
end
else
value.to_s
end
end
|
#query_filter_options(custom_field, query) ⇒ Object
424
425
426
|
# File 'lib/redmine/field_format.rb', line 424
def query_filter_options(custom_field, query)
{:type => :text}
end
|