Nicolae Claudius
13 years ago
4 changed files with 37 additions and 0 deletions
@ -0,0 +1,10 @@
|
||||
<% for name in [:info, :warning, :error] %> |
||||
<% if flash[name] %> |
||||
<div class="<%= "#{name}-message message" %>"> |
||||
<%= h flash[name] %> |
||||
<% if request.xhr? %> |
||||
<a href="#" onclick="ActiveScaffold.remove(this.parentNode); return false;" title="<%= as_(:close) %>"><%= as_(:close) %></a> |
||||
<% end %> |
||||
</div> |
||||
<% end %> |
||||
<% end %> |
@ -0,0 +1,11 @@
|
||||
<div class="main_container"> |
||||
<div class="sheet error-sheet"> |
||||
<% if request.xhr? %> |
||||
<br /> |
||||
<%= render(:partial => 'messages') %> |
||||
<br /> |
||||
<% else %> |
||||
<%= link_to 'Back', :back %> |
||||
<% end %> |
||||
</div> |
||||
</div> |
@ -0,0 +1,5 @@
|
||||
if controller.class.uses_active_scaffold? |
||||
form_selector = "#{element_form_id(:action => params[:action])}" |
||||
page << "var action_link = ActiveScaffold.find_action_link('#{form_selector}');" |
||||
page << "action_link.update_flash_messages('#{escape_javascript(render(:partial => 'messages').strip)}');" |
||||
end |
Loading…
Reference in new issue