Sha256: a4295333bb11a5f97afc3f46ad72ce7f1f6b517cd169da7190dfbd7b1a661425

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

<%
  column_count ||= begin
    config = if nested? and (nested.singular_association? || action_name == 'index')
      active_scaffold_config_for(nested.parent_model)
    else
      active_scaffold_config
    end
    # increment in 1 for self-associations, parent_model config will have constraints too
    config.list.columns.count + 1 + (config == active_scaffold_config ? 1 : 0)
  end
%>
<%# nested_id, allows us to remove a nested scaffold programmatically %>
<tr class="inline-adapter" id="<%= element_row_id :action => :nested %>">
  <td colspan="<%= column_count %>" class="inline-adapter-cell">
    <div class="<%= "#{params[:action]}-view" if params[:action] %> <%= "#{nested? ? nested.name : id_from_controller(params[:controller])}-view" %> view">
      <%= link_to(as_(:close), '', :class => 'inline-adapter-close as_cancel', :remote => true, :title => as_(:close)) -%>
      <%= payload -%>
    </div>
  </td>
</tr>
<%= javascript_tag("var action_link = ActiveScaffold.ActionLink.get('#{element_row_id(:action => :nested)}'); if (action_link) action_link.update_flash_messages('#{escape_javascript(render(:partial => 'messages').strip)}');") %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_scaffold-3.2.16 frontends/default/views/_list_inline_adapter.html.erb