ajax-scaffold-generator 2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ <tr id="<%%= "edit-<%= singular_name %>-#{@<%= singular_name %>.id}" %>" class="edit" style="display: none;">
2
+ <td colspan="<%%= num_columns %>">
3
+ <%%= form_remote_tag :url => { :controller => '<%= controller_name %>', :action => 'update', :id => @<%= singular_name %> },
4
+ :loading => "AjaxScaffold.updateOnLoading(request,'<%= singular_name %>',#{@<%= singular_name %>.id});",
5
+ :success => "AjaxScaffold.updateOnSuccess(request,'<%= singular_name %>',#{@<%= singular_name %>.id});",
6
+ :failure => "AjaxScaffold.updateOnFailure(request,'<%= singular_name %>',#{@<%= singular_name %>.id});",
7
+ :complete => "AjaxScaffold.updateOnComplete(request,'<%= singular_name %>',#{@<%= singular_name %>.id});",
8
+ :html => { :id => "<%= singular_name %>-#{@<%= singular_name %>.id}-form" } %>
9
+ <h4>Edit <%= Inflector.titleize(singular_name) %></h4>
10
+
11
+ <div id="<%%= "update-<%= singular_name %>-#{@<%= singular_name %>.id}-errors" %>" style="display: none;" ></div>
12
+
13
+ <%%= render :partial => 'form' %>
14
+
15
+ <p>
16
+ <%%= submit_tag "Update", :class => "submit" %>
17
+ <%%= link_to_function "Cancel", "AjaxScaffold.updateOnCancel('<%= singular_name %>',#{@<%= singular_name %>.id});" %>
18
+ <%%= loading_indicator_tag '<%= singular_name %>', "update-#{@<%= singular_name %>.id}" %>
19
+ </p>
20
+ <%%= end_form_tag %>
21
+ </td>
22
+ </tr>
@@ -0,0 +1 @@
1
+ <%%= render_component :controller => '<%= singular_name %>', :action => 'list' %>
@@ -0,0 +1,53 @@
1
+ <div id="<%= singular_name %>-list-wrapper" class="list-wrapper">
2
+ <div id="<%= singular_name %>-list-header" class="list-header">
3
+ <h2><%= Inflector.titleize(plural_name) %></h2>
4
+
5
+ <div class="actions">
6
+ <%%= loading_indicator_tag '<%= singular_name %>', "new" %>
7
+ <%%= link_to_remote "Create New",
8
+ :url => { :controller => '<%= controller_name %>', :action => 'new' },
9
+ :loading => "AjaxScaffold.newOnLoading(request,'<%= singular_name %>');",
10
+ :success => "AjaxScaffold.newOnSuccess(request,'<%= singular_name %>');",
11
+ :failure => "AjaxScaffold.newOnFailure(request,'<%= singular_name %>');",
12
+ :complete => "AjaxScaffold.newOnComplete(request,'<%= singular_name %>');",
13
+ :class => "create" %>
14
+
15
+ </div>
16
+
17
+ </div>
18
+ <table id="<%= singular_name %>-list" class="list" cellpadding="0" cellspacing="0">
19
+ <thead>
20
+ <tr class="header">
21
+ <%% for column in <%= model_name %>.content_columns %>
22
+ <th><%%= column.human_name %></th>
23
+ <%% end %>
24
+ <th></th>
25
+ </tr>
26
+ </thead>
27
+ <tbody>
28
+ <tr id="<%= singular_name %>-error-message" class="error-message" style="display:none;">
29
+ <td colspan="<%%= num_columns - 1 %>">
30
+ <p>An error has occurred</p>
31
+ </td>
32
+ <td class="actions">
33
+ <%%= link_to_function "Close", "AjaxScaffold.hideError('<%= singular_name %>');" %>
34
+ </td>
35
+ </tr>
36
+ <tr id="<%= singular_name %>-empty-message" class="empty-message" <%%= " style=\"display:none;\" " if !@<%= plural_name %>.empty? %>>
37
+ <td colspan="<%%= num_columns %>">No Entries</td>
38
+ </tr>
39
+ </tbody>
40
+ <tbody id="<%= singular_name %>-list-body">
41
+ <%% if !@<%= plural_name %>.empty? %>
42
+ <%%= render :partial => '<%= singular_name %>', :collection => @<%= plural_name %> %>
43
+ <%% end %>
44
+ </tbody>
45
+ </table>
46
+ </div>
47
+
48
+ <script type="text/javascript">
49
+ <%% if !@<%= plural_name %>.empty? %>
50
+ AjaxScaffold.stripeTable('<%= singular_name %>');
51
+ <%% end %>
52
+ Rico.Corner.round('<%= singular_name %>-list-wrapper', {color: '#005CB8', bgColor: '#fff', compact: true});
53
+ </script>
@@ -0,0 +1,22 @@
1
+ <tr id="create-<%= singular_name %>-<%%= @temp_id %>" class="create" style="display: none;">
2
+ <td colspan="<%%= num_columns %>">
3
+ <%%= form_remote_tag :url => { :controller => '<%= controller_name %>', :action => 'create' },
4
+ :loading => "AjaxScaffold.createOnLoading(request,'<%= singular_name %>',#{@temp_id});",
5
+ :success => "AjaxScaffold.createOnSuccess(request,'<%= singular_name %>',#{@temp_id});",
6
+ :complete => "AjaxScaffold.createOnComplete(request,'<%= singular_name %>',#{@temp_id});",
7
+ :failure => "AjaxScaffold.createOnFailure(request,'<%= singular_name %>',#{@temp_id});" %>
8
+
9
+ <h4>New <%= Inflector.titleize(singular_name) %></h4>
10
+
11
+ <div id="<%%= "create-<%= singular_name %>-#{@temp_id}-errors" %>" style="display: none;" ></div>
12
+
13
+ <%%= render :partial => 'form' %>
14
+
15
+ <p>
16
+ <%%= submit_tag "Create", :class => "submit" %>
17
+ <%%= link_to_function "Cancel", "AjaxScaffold.createOnCancel('<%= singular_name %>',#{@temp_id});" %>
18
+ <%%= loading_indicator_tag '<%= singular_name %>', "create-#{@temp_id}" %>
19
+ </p>
20
+ <%%= end_form_tag %>
21
+ </td>
22
+ </tr>
metadata ADDED
@@ -0,0 +1,58 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.8.10
3
+ specification_version: 1
4
+ name: ajax-scaffold-generator
5
+ version: !ruby/object:Gem::Version
6
+ version: "2.0"
7
+ date: 2006-02-20
8
+ summary: Ajax scaffold generator is a rails generator for ajaxified scaffolds
9
+ require_paths:
10
+ - lib
11
+ email:
12
+ homepage:
13
+ rubyforge_project:
14
+ description: Ajax scaffold generator is a rails generator for ajaxified scaffolds
15
+ autorequire: rails_generator/generators/components/scaffold/scaffold_generator
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: false
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ -
22
+ - ">"
23
+ - !ruby/object:Gem::Version
24
+ version: 0.0.0
25
+ version:
26
+ platform: ruby
27
+ authors: []
28
+ files:
29
+ - README
30
+ - MIT-LICENSE
31
+ - ajax_scaffold_generator.rb
32
+ - templates/
33
+ - templates/view_new.rhtml
34
+ - templates/view_list.rhtml
35
+ - templates/view_index.rhtml
36
+ - templates/view_edit.rhtml
37
+ - templates/style.css
38
+ - templates/script.js
39
+ - templates/rico_corner.js
40
+ - templates/partial_item.rhtml
41
+ - templates/partial_form_errors.rhtml
42
+ - templates/layout.rhtml
43
+ - templates/indicator.gif
44
+ - templates/helper.rb
45
+ - templates/functional_test.rb
46
+ - templates/form_scaffolding.rhtml
47
+ - templates/form.rhtml
48
+ - templates/error.gif
49
+ - templates/controller.rb
50
+ - templates/add.gif
51
+ test_files: []
52
+ rdoc_options: []
53
+ extra_rdoc_files: []
54
+ executables: []
55
+ extensions: []
56
+ requirements:
57
+ - none
58
+ dependencies: []