Sha256: 4139a8bf7e6a7af3e06294ac64556c7bd6d135d27715d2296160a02e179fc688

Contents?: true

Size: 1.37 KB

Versions: 7

Compression:

Stored size: 1.37 KB

Contents

%div{ data: { controller: "#{@resource.class.name.underscore.gsub('_', '-').gsub('/', '--')}-form" } }
  - @resource.class.resource_field_groups.select{ |x| x.editable }.each do |rfg|
    %h3= resource_field_group_label(@resource.class, rfg.key) unless rfg.key == :default
    - rfg.sections.each do |section|
      .row
        - section.fields.each do |field|
          - label = field_label_for(@resource.class, field.sym)
          %div{ class: section.column_class }
            - if association?(field)
              - collection = collection_for(field)
              - if one_through?(field)
                = @f.input        field.sym, label: label, collection: [collection].flatten, disabled: !field.editable, input_html: { data: association_data_hash_for(field) }, selected: collection
              - else
                = @f.association  field.sym, label: label, collection: [collection].flatten, disabled: !field.editable, input_html: { data: association_data_hash_for(field) }
            - elsif boolean?(field)
              = @f.input field.sym, label: label, disabled: !field.editable, as: field.type.to_sym, input_html: { data: input_data_hash_for(field) }
            - else 
              = @f.input field.sym, label: label, disabled: !field.editable, as: field.type.to_sym, picker_options: input_picker_options_for(field), input_html: { rows: 10, data: input_data_hash_for(field) }

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
five-two-nw-olivander-0.2.0.40 app/components/olivander/components/resource_form_component.html.haml
five-two-nw-olivander-0.2.0.39 app/components/olivander/components/resource_form_component.html.haml
five-two-nw-olivander-0.2.0.38 app/components/olivander/components/resource_form_component.html.haml
five-two-nw-olivander-0.2.0.37 app/components/olivander/components/resource_form_component.html.haml
five-two-nw-olivander-0.2.0.36 app/components/olivander/components/resource_form_component.html.haml
five-two-nw-olivander-0.2.0.35 app/components/olivander/components/resource_form_component.html.haml
five-two-nw-olivander-0.2.0.34 app/components/olivander/components/resource_form_component.html.haml