ajax_scaffold_generator 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/templates/partial_item.rhtml +4 -4
- data/templates/view_edit.rhtml +3 -3
- data/templates/view_list.rhtml +2 -2
- data/templates/view_new.rhtml +3 -3
- metadata +2 -2
@@ -8,20 +8,20 @@
|
|
8
8
|
<div>
|
9
9
|
<%%= loading_indicator_tag '<%= singular_name %>', "edit-#{<%= singular_name %>.id}" %>
|
10
10
|
<%%= link_to_remote "Edit",
|
11
|
-
{ :url => { :controller => '<%=
|
11
|
+
{ :url => { :controller => '<%= controller_file_name %>', :action => 'edit', :id => <%= singular_name %> },
|
12
12
|
:loading => "AjaxScaffold.editOnLoading(request,'<%= singular_name %>', #{<%= singular_name %>.id});",
|
13
13
|
:success => "AjaxScaffold.editOnSuccess(request,'<%= singular_name %>', #{<%= singular_name %>.id});",
|
14
14
|
:failure => "AjaxScaffold.editOnFailure(request,'<%= singular_name %>', #{<%= singular_name %>.id});",
|
15
15
|
:post => true },
|
16
|
-
{ :href => url_for( :controller => '<%=
|
16
|
+
{ :href => url_for( :controller => '<%= controller_file_name %>', :action => 'edit', :id => <%= singular_name %> ) } %>
|
17
17
|
<%%= link_to_remote "Delete",
|
18
|
-
{ :url => { :controller => '<%=
|
18
|
+
{ :url => { :controller => '<%= controller_file_name %>',:action => 'destroy', :id => <%= singular_name %> },
|
19
19
|
:confirm => 'Are you sure?',
|
20
20
|
:loading => "AjaxScaffold.deleteOnLoading('<%= singular_name %>', #{<%= singular_name %>.id});",
|
21
21
|
:success => "AjaxScaffold.deleteOnSuccess('<%= singular_name %>', #{<%= singular_name %>.id});",
|
22
22
|
:failure => "AjaxScaffold.deleteOnFailure('<%= singular_name %>', #{<%= singular_name %>.id});",
|
23
23
|
:post => true },
|
24
|
-
{ :href => url_for(:controller => '<%=
|
24
|
+
{ :href => url_for(:controller => '<%= controller_file_name %>', :action => 'destroy', :id => <%= singular_name %>) } %>
|
25
25
|
</div>
|
26
26
|
</td>
|
27
27
|
</tr>
|
data/templates/view_edit.rhtml
CHANGED
@@ -4,11 +4,11 @@
|
|
4
4
|
<%% end %>
|
5
5
|
<tr id="<%%= "edit-<%= singular_name %>-#{@<%= singular_name %>.id}" %>" class="edit" <%%= "style=\"display: none;\"" if request.xhr? %> >
|
6
6
|
<td colspan="<%%= num_columns %>">
|
7
|
-
<%%= form_remote_tag :url => { :controller => '<%=
|
7
|
+
<%%= form_remote_tag :url => { :controller => '<%= controller_file_name %>', :action => 'update', :id => @<%= singular_name %> },
|
8
8
|
:loading => "AjaxScaffold.updateOnLoading(request,'<%= singular_name %>',#{@<%= singular_name %>.id});",
|
9
9
|
:success => "AjaxScaffold.updateOnSuccess(request,'<%= singular_name %>',#{@<%= singular_name %>.id});",
|
10
10
|
:failure => "AjaxScaffold.updateOnFailure(request,'<%= singular_name %>',#{@<%= singular_name %>.id});",
|
11
|
-
:html => { :action => url_for(:controller => '<%=
|
11
|
+
:html => { :action => url_for(:controller => '<%= controller_file_name %>', :action => 'update', :id => @<%= singular_name %>),
|
12
12
|
:id => "edit-<%= singular_name %>-#{@<%= singular_name %>.id}-form" } %>
|
13
13
|
<h4>Edit <%= Inflector.titleize(singular_name) %></h4>
|
14
14
|
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<p>
|
25
25
|
<%%= submit_tag "Update", :class => "submit" %>
|
26
26
|
<%%= link_to_function "Cancel", "AjaxScaffold.updateOnCancel('<%= singular_name %>',#{@<%= singular_name %>.id});",
|
27
|
-
:href => url_for(:controller => '<%=
|
27
|
+
:href => url_for(:controller => '<%= controller_file_name %>', :action => 'return_to_main') %>
|
28
28
|
<%%= loading_indicator_tag '<%= singular_name %>', "update-#{@<%= singular_name %>.id}" %>
|
29
29
|
</p>
|
30
30
|
<%%= end_form_tag %>
|
data/templates/view_list.rhtml
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
<div class="actions">
|
6
6
|
<%%= loading_indicator_tag '<%= singular_name %>', "new" %>
|
7
7
|
<%%= link_to_remote "Create New",
|
8
|
-
{ :url => { :controller => '<%=
|
8
|
+
{ :url => { :controller => '<%= controller_file_name %>', :action => 'new' },
|
9
9
|
:loading => "AjaxScaffold.newOnLoading(request,'<%= singular_name %>');",
|
10
10
|
:success => "AjaxScaffold.newOnSuccess(request,'<%= singular_name %>');",
|
11
11
|
:failure => "AjaxScaffold.newOnFailure(request,'<%= singular_name %>');" },
|
12
|
-
{ :href => url_for(:controller => '<%=
|
12
|
+
{ :href => url_for(:controller => '<%= controller_file_name %>', :action => 'new'),
|
13
13
|
:class => "create" } %>
|
14
14
|
|
15
15
|
</div>
|
data/templates/view_new.rhtml
CHANGED
@@ -4,11 +4,11 @@
|
|
4
4
|
<%% end %>
|
5
5
|
<tr id="create-<%= singular_name %>-<%%= @temp_id %>" class="create" <%%= "style=\"display: none;\"" if request.xhr? %>>
|
6
6
|
<td colspan="<%%= num_columns %>">
|
7
|
-
<%%= form_remote_tag :url => { :controller => '<%=
|
7
|
+
<%%= form_remote_tag :url => { :controller => '<%= controller_file_name %>', :action => 'create' },
|
8
8
|
:loading => "AjaxScaffold.createOnLoading(request,'<%= singular_name %>',#{@temp_id});",
|
9
9
|
:success => "AjaxScaffold.createOnSuccess(request,'<%= singular_name %>',#{@temp_id});",
|
10
10
|
:failure => "AjaxScaffold.createOnFailure(request,'<%= singular_name %>',#{@temp_id});",
|
11
|
-
:html => { :action => url_for(:controller => '<%=
|
11
|
+
:html => { :action => url_for(:controller => '<%= controller_file_name %>', :action => 'create'),
|
12
12
|
:id => "create-<%= singular_name %>-#{@temp_id}-form" } %>
|
13
13
|
|
14
14
|
<h4>New <%= Inflector.titleize(singular_name) %></h4>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<p>
|
26
26
|
<%%= submit_tag "Create", :class => "submit" %>
|
27
27
|
<%%= link_to_function "Cancel", "AjaxScaffold.createOnCancel('<%= singular_name %>',#{@temp_id});",
|
28
|
-
:href => url_for(:controller => '<%=
|
28
|
+
:href => url_for(:controller => '<%= controller_file_name %>', :action => 'return_to_main') %>
|
29
29
|
<%%= loading_indicator_tag '<%= singular_name %>', "create-#{@temp_id}" %>
|
30
30
|
</p>
|
31
31
|
<%%= end_form_tag %>
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: ajax_scaffold_generator
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 2.2.
|
7
|
-
date: 2006-03-
|
6
|
+
version: 2.2.1
|
7
|
+
date: 2006-03-07 00:00:00 -05:00
|
8
8
|
summary: Ajax scaffold generator is a rails generator for ajaxified scaffolds
|
9
9
|
require_paths:
|
10
10
|
- lib
|