Sha256: 81785b797180cd674967c4ce0ba24b0dd02bbde836e3dbb4ffd1b44dcec8d6cf
Contents?: true
Size: 1.86 KB
Versions: 1
Compression:
Stored size: 1.86 KB
Contents
<%% if not request.xhr? %> <table class="ajax-scaffold" cellpadding="0" cellspacing="0"> <tbody> <%% end %> <tr id="<%%= element_row_id(@options) %>" class="<%%= @options[:action] %>" <%%= "style=\"display:none;\"" if request.xhr? %>> <td id="<%%= element_cell_id(@options) %>" colspan="<%%= num_columns %>"> <%%= form_remote_tag :url => @options.merge(:controller => '<%= controller_file_path %>'), :loading => "Element.show('#{loading_indicator_id(@options)}');", :html => { :href => url_for(@options.merge(:controller => '<%= controller_file_path %>')), :id => element_form_id(@options) } %> <%%= hidden_field_tag "scaffold_id", @options[:scaffold_id] %> <h4><%%= Inflector.titleize(@options[:action]) %> <%= Inflector.titleize(singular_name) %></h4> <%% if request.xhr? %> <div id="<%%= element_messages_id(@options) %>" class="messages-container"></div> <%% else %> <%%= render :partial => 'form_messages' %> <%% end %> <%%= render :partial => 'form' %> <p> <%%= submit_tag Inflector.titleize(@options[:action]), :class => "submit" %> <%% if request.xhr? %> <%% on_cancel = "Element.remove('#{element_row_id(@options)}');" %> <%% on_cancel += "Element.show('#{element_row_id(@view_options)}');" if @options[:action] == "update" %> <%% on_cancel += "AjaxScaffold.displayMessageIfEmpty('#{scaffold_tbody_id(@options)}','#{empty_message_id(@options)}');" if @options[:action] == "create" %> <%% end %> <%%= link_to_function "Cancel", on_cancel, :href => url_for(:controller => '<%= controller_file_path %>', :action => 'return_to_main') %> <%%= loading_indicator_tag @options %> </p> <%%= end_form_tag %> </td> </tr>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ajax_scaffold_generator-3.0.4 | templates/partial_new_edit.rhtml |