Sha256: 37cf0fe1234d9952ae2586cf4a0a701f35e27031c7ff62b2b58bd75fd52f7ab3
Contents?: true
Size: 1.82 KB
Versions: 6
Compression:
Stored size: 1.82 KB
Contents
<% column = if render_field.is_a? ActiveScaffold::DataStructures::Column render_field else active_scaffold_config.columns[render_field] end return unless @main_columns.include? column.name @rendered ||= Set.new return if @rendered.include? column.name @rendered << column.name if @form_action == :field_search form_ui = column.search_ui else renders_as = column_renders_as(column) form_ui = column.form_ui end column_css_class = column.css_class unless column.css_class.nil? || column.css_class.is_a?(Proc) options = {field_class: "#{column.name}-input", hidden: form_ui == :hidden} options[:subform_class] = "#{column.name}-sub-form" if column.association options[:attrs] = if renders_as == :subform active_scaffold_subform_attributes(column, column_css_class) else {class: "form-element #{:required if column.required?(@form_action)} #{column.form_ui} #{column_css_class}", id: ''} end html = if scope readonly = @record.readonly? || !@record.authorized_for?(:crud_type => :update) crud_type = @record.new_record? ? :create : (readonly ? :read : :update) # subform.columns.to_a.include? so it doesn't check inside subgroups active_scaffold_render_subform_column(column, scope, crud_type, readonly, !active_scaffold_config.subform.columns.to_a.include?(column.name), @record) elsif @form_action == :field_search search_attribute(column, @record) else render_column(column, @record, renders_as, scope) end -%> ActiveScaffold.render_form_field('<%= source_id %>','<%= escape_javascript(html) %>', <%= options.to_json.html_safe %>); <%if column.update_columns && !column.update_columns.empty?%> <%= render(partial: "render_field", collection: column.update_columns, locals: {source_id: source_id, scope: scope})%> <%end%>
Version data entries
6 entries across 6 versions & 1 rubygems