Class: Redmine::FieldFormat::List
- Defined in:
- lib/redmine/field_format.rb
Direct Known Subclasses
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
- #query_filter_options(custom_field, query) ⇒ Object
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, #formatted_value, #group_statement, #join_for_order_statement, #label, #name, #order_statement, #possible_custom_value_options, #possible_values_options, #sanitize_html, #set_custom_field_value, #target_class, #validate_custom_field, #validate_custom_value, #validate_single_value, #value_from_keyword
Methods included from Helpers::URL
#uri_with_link_safe_scheme?, #uri_with_safe_scheme?
Methods included from I18n
#abbr_day_name, #current_language, #day_letter, #day_name, #find_language, #format_date, #format_hours, #format_time, included, #l, #l_hours, #l_hours_short, #l_or_humanize, #languages_options, #ll, #lu, #month_name, #normalize_float, #set_language_if_valid, #valid_languages
Instance Method Details
#bulk_edit_tag(view, tag_id, tag_name, custom_field, objects, value, options = {}) ⇒ Object
602 603 604 605 606 607 608 609 610 611 612 |
# File 'lib/redmine/field_format.rb', line 602 def bulk_edit_tag(view, tag_id, tag_name, custom_field, objects, value, ={}) opts = [] opts << [l(:label_no_change_option), ''] unless custom_field.multiple? opts << [l(:label_none), '__none__'] unless custom_field.is_required? opts += (custom_field, objects) view.select_tag( tag_name, view.(opts, value), .merge(:multiple => custom_field.multiple?) ) end |
#edit_tag(view, tag_id, tag_name, custom_value, options = {}) ⇒ Object
594 595 596 597 598 599 600 |
# File 'lib/redmine/field_format.rb', line 594 def edit_tag(view, tag_id, tag_name, custom_value, ={}) if custom_value.custom_field.edit_tag_style == 'check_box' check_box_edit_tag(view, tag_id, tag_name, custom_value, ) else select_edit_tag(view, tag_id, tag_name, custom_value, ) end end |
#query_filter_options(custom_field, query) ⇒ Object
614 615 616 617 618 619 |
# File 'lib/redmine/field_format.rb', line 614 def (custom_field, query) { :type => :list_optional, :values => lambda {query_filter_values(custom_field, query)} } end |