Nicolae Claudius
13 years ago
1 changed files with 20 additions and 0 deletions
@ -0,0 +1,20 @@
|
||||
<% |
||||
# hotfix for https://github.com/activescaffold/active_scaffold/issues/148 |
||||
# remove when fixed |
||||
|
||||
column_count = if nested? && params[:action] == 'index' |
||||
active_scaffold_config_for(nested.parent_model).list.columns.count + 1 |
||||
else |
||||
active_scaffold_config.list.columns.count + 1 |
||||
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), 'data-refresh' => (action_name == 'index' ? true : false)) -%> |
||||
<%= 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)}');") %> |
Loading…
Reference in new issue