Sha256: 8ed20a93b1327fd62ba702a9703f15d55753df778b68e91040d0c6c991d3783b
Contents?: true
Size: 1.39 KB
Versions: 97
Compression:
Stored size: 1.39 KB
Contents
<% record_column = column readonly = (@record.readonly? or not @record.authorized_for?(:action => :update)) action = @record.new_record? ? :create : (readonly ? :read : nil) show_actions = false -%> <ol class="association-record <%= 'association-record-new' if @record.new_record? -%> <%= 'locked' if locked -%>"> <% active_scaffold_config_for(@record.class).subform.columns.each :for => @record, :action => action, :flatten => true do |column| %> <% next unless in_subform?(column, parent_record) show_actions = true column = column.clone column.form_ui ||= :select if column.association -%> <li class="form-element <%= 'required' if column.required? %>"> <% unless readonly -%> <%= render :partial => form_partial_for_column(column), :locals => { :column => column, :scope => scope } -%> <% else -%> <p><%= get_column_value(@record, column) -%></p> <% end -%> </li> <% end -%> <% if show_actions -%> <li class="actions"> <%= link_to_function as_(:remove), '$(this).up(".association-record").remove()', { :class => "destroy" } if record_column.plural_association? and (@record.authorized_for?(:action => :destroy) or not [:destroy, :delete_all].include?(record_column.association.options[:dependent])) %> <% unless @record.new_record? %> <input type="hidden" name="<%= "record#{scope}[id]" -%>" value="<%= @record.id -%>" /> <% end -%> </li> <% end -%> </ol>
Version data entries
97 entries across 97 versions & 2 rubygems