ajax_scaffold_generator 2.2.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,36 +0,0 @@
1
- <%% if not request.xhr? %>
2
- <table class="ajax-scaffold" cellpadding="0" cellspacing="0">
3
- <tbody>
4
- <%% end %>
5
- <tr id="<%%= "edit-<%= singular_name %>-#{@<%= singular_name %>.id}" %>" class="edit" <%%= "style=\"display: none;\"" if request.xhr? %> >
6
- <td colspan="<%%= num_columns %>">
7
- <%%= form_remote_tag :url => { :controller => '<%= controller_file_name %>', :action => 'update', :id => @<%= singular_name %> },
8
- :loading => "AjaxScaffold.updateOnLoading(request,'<%= singular_name %>',#{@<%= singular_name %>.id});",
9
- :success => "AjaxScaffold.updateOnSuccess(request,'<%= singular_name %>',#{@<%= singular_name %>.id});",
10
- :failure => "AjaxScaffold.updateOnFailure(request,'<%= singular_name %>',#{@<%= singular_name %>.id});",
11
- :html => { :action => url_for(:controller => '<%= controller_file_name %>', :action => 'update', :id => @<%= singular_name %>),
12
- :id => "edit-<%= singular_name %>-#{@<%= singular_name %>.id}-form" } %>
13
- <h4>Edit <%= Inflector.titleize(singular_name) %></h4>
14
-
15
- <%% # Its actually okay to leave both of these elements (ex: form_errors will only generate HTML when in fallback mode) %>
16
- <%% if request.xhr? %>
17
- <div id="<%%= "update-<%= singular_name %>-#{@<%= singular_name %>.id}-errors" %>" style="display: none;" ></div>
18
- <%% else %>
19
- <%%= render :partial => 'form_errors' %>
20
- <%% end %>
21
-
22
- <%%= render :partial => 'form' %>
23
-
24
- <p>
25
- <%%= submit_tag "Update", :class => "submit" %>
26
- <%%= link_to_function "Cancel", "AjaxScaffold.updateOnCancel('<%= singular_name %>',#{@<%= singular_name %>.id});",
27
- :href => url_for(:controller => '<%= controller_file_name %>', :action => 'return_to_main') %>
28
- <%%= loading_indicator_tag '<%= singular_name %>', "update-#{@<%= singular_name %>.id}" %>
29
- </p>
30
- <%%= end_form_tag %>
31
- </td>
32
- </tr>
33
- <%% if not request.xhr? %>
34
- </tbody>
35
- </table>
36
- <%% end %>
@@ -1 +0,0 @@
1
- <%%= render_component :controller => '<%= Inflector.underscore(controller_name) %>', :action => 'list' %>
@@ -1,33 +0,0 @@
1
- <%% if not request.xhr? %>
2
- <table class="ajax-scaffold" cellpadding="0" cellspacing="0">
3
- <tbody>
4
- <%% end %>
5
- <tr id="create-<%= singular_name %>-<%%= @temp_id %>" class="create" <%%= "style=\"display: none;\"" if request.xhr? %>>
6
- <td colspan="<%%= num_columns %>">
7
- <%%= form_remote_tag :url => { :controller => '<%= controller_file_name %>', :action => 'create' },
8
- :loading => "AjaxScaffold.createOnLoading(request,'<%= singular_name %>',#{@temp_id});",
9
- :success => "AjaxScaffold.createOnSuccess(request,'<%= singular_name %>',#{@temp_id});",
10
- :failure => "AjaxScaffold.createOnFailure(request,'<%= singular_name %>',#{@temp_id});",
11
- :html => { :action => url_for(:controller => '<%= controller_file_name %>', :action => 'create'),
12
- :id => "create-<%= singular_name %>-#{@temp_id}-form" } %>
13
-
14
- <h4>New <%= Inflector.titleize(singular_name) %></h4>
15
-
16
- <%% # Its actually okay to leave both of these elements (ex: form_errors will only generate HTML when in fallback mode) %>
17
- <%% if request.xhr? %>
18
- <div id="<%%= "create-<%= singular_name %>-#{@temp_id}-errors" %>" style="display: none;" ></div>
19
- <%% else %>
20
- <%%= render :partial => 'form_errors' %>
21
- <%% end %>
22
-
23
- <%%= render :partial => 'form' %>
24
-
25
- <p>
26
- <%%= submit_tag "Create", :class => "submit" %>
27
- <%%= link_to_function "Cancel", "AjaxScaffold.createOnCancel('<%= singular_name %>',#{@temp_id});",
28
- :href => url_for(:controller => '<%= controller_file_name %>', :action => 'return_to_main') %>
29
- <%%= loading_indicator_tag '<%= singular_name %>', "create-#{@temp_id}" %>
30
- </p>
31
- <%%= end_form_tag %>
32
- </td>
33
- </tr>