Sha256: 24231fb69adc34764fefeb3c2c42739beaf60f97f11a3fb4b76fed229a4dfa90
Contents?: true
Size: 1.6 KB
Versions: 6
Compression:
Stored size: 1.6 KB
Contents
<% scope ||= nil subsection_id ||= nil tab_value ||= nil tabbed_by ||= nil tab_id ||= nil show_unauthorized_columns = active_scaffold_config.send(form_action).show_unauthorized_columns if active_scaffold_config.actions.include? form_action %> <ol class="form" <%= "id=#{subsection_id}" unless subsection_id.nil? %> <%= 'style="display: none;"'.html_safe if columns.collapsed %>> <% columns.each_column(for: @record, crud_type: (:read if show_unauthorized_columns)) do |column| %> <% column_css_class = column.css_class unless column.css_class.nil? || column.css_class.is_a?(Proc) %> <% renders_as = column_renders_as(column) %> <% authorized = show_unauthorized_columns || renders_as == :subsection ? @record.authorized_for?(crud_type: form_action, column: column.name) : true %> <% if renders_as == :subsection || renders_as == :tabbed -%> <% next unless authorized %> <li class="sub-section <%= column_css_class %>"> <%= render_subsection(column, @record, scope, form_action) %> </li> <% elsif renders_as == :subform and authorized -%> <%= content_tag :li, active_scaffold_subform_attributes(column, column_css_class, tab_id: tab_id) do %> <%= render_column(column, @record, renders_as, scope, tabbed_by: (column.options[:tabbed_by] || tabbed_by if tabbed_by), tab_value: tab_value, tab_id: tab_id) %> <% end %> <% else -%> <li class="form-element <%= 'required' if column.required?(action_for_validation?(@record)) %> <%= column.form_ui %> <%= column_css_class %>"> <%= render_column(column, @record, renders_as, scope, only_value: !authorized) %> </li> <% end -%> <% end -%> </ol>
Version data entries
6 entries across 6 versions & 1 rubygems