dust-generators 0.2.8 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dust/version.rb +2 -2
- data/lib/generators/dust/albums/templates/app/views/albums/show.html.haml +1 -1
- data/lib/generators/dust/scaffold/scaffold_generator.rb +24 -24
- data/lib/generators/dust/scaffold/templates/actions/create.rb +1 -1
- data/lib/generators/dust/scaffold/templates/actions/destroy.rb +2 -2
- data/lib/generators/dust/scaffold/templates/actions/edit.rb +1 -1
- data/lib/generators/dust/scaffold/templates/actions/index.rb +1 -1
- data/lib/generators/dust/scaffold/templates/actions/new.rb +1 -1
- data/lib/generators/dust/scaffold/templates/actions/show.rb +1 -1
- data/lib/generators/dust/scaffold/templates/actions/update.rb +2 -2
- data/lib/generators/dust/scaffold/templates/controller.rb +3 -2
- data/lib/generators/dust/scaffold/templates/migration.rb +2 -2
- data/lib/generators/dust/scaffold/templates/model.rb +13 -11
- data/lib/generators/dust/scaffold/templates/view_controller.rb +8 -6
- data/lib/generators/dust/scaffold/templates/views/front_end/haml/index.html.haml +6 -5
- data/lib/generators/dust/scaffold/templates/views/front_end/haml/show.html.haml +11 -11
- data/lib/generators/dust/scaffold/templates/views/haml/_form.html.haml +1 -1
- data/lib/generators/dust/scaffold/templates/views/haml/_search.html.haml +1 -1
- data/lib/generators/dust/scaffold/templates/views/haml/index.html.haml +2 -2
- data/lib/generators/dust/scaffold/templates/views/haml/show.html.haml +1 -1
- metadata +49 -174
- data/rails_generators/dust_albums/USAGE +0 -6
- data/rails_generators/dust_albums/dust_albums_generator.rb +0 -196
- data/rails_generators/dust_albums/templates/README +0 -5
- data/rails_generators/dust_albums/templates/app/controllers/albums_controller.rb +0 -56
- data/rails_generators/dust_albums/templates/app/controllers/photos_controller.rb +0 -89
- data/rails_generators/dust_albums/templates/app/controllers/view_albums_controller.rb +0 -17
- data/rails_generators/dust_albums/templates/app/helpers/albums_helper.rb +0 -2
- data/rails_generators/dust_albums/templates/app/helpers/photos_helper.rb +0 -2
- data/rails_generators/dust_albums/templates/app/helpers/view_albums_helper.rb +0 -2
- data/rails_generators/dust_albums/templates/app/models/album.rb +0 -42
- data/rails_generators/dust_albums/templates/app/models/photo.rb +0 -18
- data/rails_generators/dust_albums/templates/app/views/albums/_form.html.erb +0 -52
- data/rails_generators/dust_albums/templates/app/views/albums/_search.html.erb +0 -6
- data/rails_generators/dust_albums/templates/app/views/albums/_upload_script.html.erb +0 -37
- data/rails_generators/dust_albums/templates/app/views/albums/edit.html.erb +0 -5
- data/rails_generators/dust_albums/templates/app/views/albums/index.html.erb +0 -61
- data/rails_generators/dust_albums/templates/app/views/albums/manage.html.erb +0 -65
- data/rails_generators/dust_albums/templates/app/views/albums/new.html.erb +0 -6
- data/rails_generators/dust_albums/templates/app/views/albums/show.html.erb +0 -56
- data/rails_generators/dust_albums/templates/app/views/albums/show.js.erb +0 -1
- data/rails_generators/dust_albums/templates/app/views/photos/_form.html.erb +0 -23
- data/rails_generators/dust_albums/templates/app/views/photos/_photo.html.erb +0 -25
- data/rails_generators/dust_albums/templates/app/views/photos/_search.html.erb +0 -6
- data/rails_generators/dust_albums/templates/app/views/photos/array.js.erb +0 -3
- data/rails_generators/dust_albums/templates/app/views/photos/edit.html.erb +0 -28
- data/rails_generators/dust_albums/templates/app/views/photos/index.html.erb +0 -85
- data/rails_generators/dust_albums/templates/app/views/photos/new.html.erb +0 -7
- data/rails_generators/dust_albums/templates/app/views/photos/show.html.erb +0 -26
- data/rails_generators/dust_albums/templates/app/views/photos/show.js.erb +0 -9
- data/rails_generators/dust_albums/templates/app/views/view_albums/index.html.erb +0 -31
- data/rails_generators/dust_albums/templates/app/views/view_albums/show.html.erb +0 -31
- data/rails_generators/dust_albums/templates/images/browse.png +0 -0
- data/rails_generators/dust_albums/templates/images/cancel.png +0 -0
- data/rails_generators/dust_albums/templates/images/save_position.png +0 -0
- data/rails_generators/dust_albums/templates/images/upload.png +0 -0
- data/rails_generators/dust_albums/templates/initializers/flash_session_cookie_middleware.rb +0 -17
- data/rails_generators/dust_albums/templates/initializers/session_store_middleware.rb +0 -1
- data/rails_generators/dust_albums/templates/javascript/dragsort.js +0 -288
- data/rails_generators/dust_albums/templates/javascript/dust_album.js +0 -28
- data/rails_generators/dust_albums/templates/javascript/uploadify/jquery.uploadify.v2.1.0.js +0 -258
- data/rails_generators/dust_albums/templates/javascript/uploadify/swfobject.js +0 -4
- data/rails_generators/dust_albums/templates/javascript/uploadify/uploadify.swf +0 -0
- data/rails_generators/dust_albums/templates/migration/albums_migration.rb +0 -39
- data/rails_generators/dust_albums/templates/stylesheets/dust_album.css +0 -16
- data/rails_generators/dust_albums/templates/stylesheets/dust_album_app.css +0 -15
- data/rails_generators/dust_albums/templates/stylesheets/uploadify.css +0 -84
- data/rails_generators/dust_config/USAGE +0 -23
- data/rails_generators/dust_config/dust_config_generator.rb +0 -32
- data/rails_generators/dust_config/templates/config.yml +0 -8
- data/rails_generators/dust_config/templates/load_config.rb +0 -2
- data/rails_generators/dust_scaffold/USAGE +0 -51
- data/rails_generators/dust_scaffold/dust_scaffold_generator.rb +0 -291
- data/rails_generators/dust_scaffold/templates/actions/create.rb +0 -9
- data/rails_generators/dust_scaffold/templates/actions/destroy.rb +0 -6
- data/rails_generators/dust_scaffold/templates/actions/edit.rb +0 -3
- data/rails_generators/dust_scaffold/templates/actions/index.rb +0 -3
- data/rails_generators/dust_scaffold/templates/actions/new.rb +0 -3
- data/rails_generators/dust_scaffold/templates/actions/show.rb +0 -3
- data/rails_generators/dust_scaffold/templates/actions/update.rb +0 -9
- data/rails_generators/dust_scaffold/templates/controller.rb +0 -9
- data/rails_generators/dust_scaffold/templates/fixtures.yml +0 -9
- data/rails_generators/dust_scaffold/templates/helper.rb +0 -2
- data/rails_generators/dust_scaffold/templates/migration.rb +0 -20
- data/rails_generators/dust_scaffold/templates/model.rb +0 -37
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/create.rb +0 -11
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/destroy.rb +0 -6
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/edit.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/index.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/new.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/show.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/rspec/actions/update.rb +0 -11
- data/rails_generators/dust_scaffold/templates/tests/rspec/controller.rb +0 -8
- data/rails_generators/dust_scaffold/templates/tests/rspec/model.rb +0 -7
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/create.rb +0 -13
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/destroy.rb +0 -8
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/edit.rb +0 -6
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/index.rb +0 -6
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/new.rb +0 -6
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/show.rb +0 -6
- data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/update.rb +0 -13
- data/rails_generators/dust_scaffold/templates/tests/shoulda/controller.rb +0 -5
- data/rails_generators/dust_scaffold/templates/tests/shoulda/model.rb +0 -7
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/create.rb +0 -11
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/destroy.rb +0 -6
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/edit.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/index.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/new.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/show.rb +0 -4
- data/rails_generators/dust_scaffold/templates/tests/testunit/actions/update.rb +0 -11
- data/rails_generators/dust_scaffold/templates/tests/testunit/controller.rb +0 -5
- data/rails_generators/dust_scaffold/templates/tests/testunit/model.rb +0 -7
- data/rails_generators/dust_scaffold/templates/view_controller.rb +0 -17
- data/rails_generators/dust_scaffold/templates/views/erb/_form.html.erb +0 -16
- data/rails_generators/dust_scaffold/templates/views/erb/_search.html.erb +0 -6
- data/rails_generators/dust_scaffold/templates/views/erb/edit.html.erb +0 -4
- data/rails_generators/dust_scaffold/templates/views/erb/index.html.erb +0 -24
- data/rails_generators/dust_scaffold/templates/views/erb/new.html.erb +0 -5
- data/rails_generators/dust_scaffold/templates/views/erb/show.html.erb +0 -23
- data/rails_generators/dust_scaffold/templates/views/front_end/index.html.erb +0 -14
- data/rails_generators/dust_scaffold/templates/views/front_end/show.html.erb +0 -17
data/lib/dust/version.rb
CHANGED
@@ -25,7 +25,7 @@
|
|
25
25
|
|
|
26
26
|
= link_to "Select <%=child_plural_class_name%> For Deletion", manage_<%=child_plural_name%>_path(@<%=parent_singular_name%>, :format => 'html'), :class => 'settings'
|
27
27
|
%p
|
28
|
-
Drag <%=child_plural_name%> to reorder them. Don't forget to hit the save order button when
|
28
|
+
Drag <%=child_plural_name%> to reorder them. Don't forget to hit the save order button when you are done.
|
29
29
|
%ul{:class => "sortable <%=child_plural_name%>"}
|
30
30
|
= render :partial => @<%=parent_singular_name%>.<%=child_plural_name%>.roots, :<%=child_singular_name%> => @<%=child_singular_name%>
|
31
31
|
.clear
|
@@ -69,14 +69,14 @@ module Dust
|
|
69
69
|
|
70
70
|
def create_model
|
71
71
|
unless @skip_model
|
72
|
-
template 'model.rb', "app/models/#{singular_name}.rb"
|
73
|
-
if test_framework == :rspec
|
74
|
-
template "tests/rspec/model.rb", "spec/models/#{singular_name}_spec.rb"
|
75
|
-
template 'fixtures.yml', "spec/fixtures/#{plural_name}.yml"
|
76
|
-
else
|
77
|
-
template "tests/#{test_framework}/model.rb", "test/unit/#{singular_name}_test.rb"
|
78
|
-
template 'fixtures.yml', "test/fixtures/#{plural_name}.yml"
|
79
|
-
end
|
72
|
+
template 'model.rb', "app/models/app/#{singular_name}.rb"
|
73
|
+
#if test_framework == :rspec
|
74
|
+
#template "tests/rspec/model.rb", "spec/models/#{singular_name}_spec.rb"
|
75
|
+
#template 'fixtures.yml', "spec/fixtures/#{plural_name}.yml"
|
76
|
+
#else
|
77
|
+
#template "tests/#{test_framework}/model.rb", "test/unit/#{singular_name}_test.rb"
|
78
|
+
#template 'fixtures.yml', "test/fixtures/#{plural_name}.yml"
|
79
|
+
#end
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
@@ -88,39 +88,39 @@ module Dust
|
|
88
88
|
|
89
89
|
def create_controller
|
90
90
|
unless options.skip_controller?
|
91
|
-
template 'controller.rb', "app/controllers/#{plural_name}_controller.rb"
|
91
|
+
template 'controller.rb', "app/controllers/app/#{plural_name}_controller.rb"
|
92
92
|
|
93
|
-
template 'helper.rb', "app/helpers/#{plural_name}_helper.rb"
|
93
|
+
#template 'helper.rb', "app/helpers/#{plural_name}_helper.rb"
|
94
94
|
|
95
95
|
controller_actions.each do |action|
|
96
96
|
if %w[index show new edit].include?(action) # Actions with templates
|
97
|
-
template "views/#{view_language}/#{action}.html.#{view_language}", "app/views/#{plural_name}/#{action}.html.#{view_language}"
|
97
|
+
template "views/#{view_language}/#{action}.html.#{view_language}", "app/views/app/#{plural_name}/#{action}.html.#{view_language}"
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
-
template "views/#{view_language}/_search.html.#{view_language}", "app/views/#{plural_name}/_search.html.#{view_language}"
|
101
|
+
template "views/#{view_language}/_search.html.#{view_language}", "app/views/app/#{plural_name}/_search.html.#{view_language}"
|
102
102
|
|
103
103
|
if form_partial?
|
104
|
-
template "views/#{view_language}/_form.html.#{view_language}", "app/views/#{plural_name}/_form.html.#{view_language}"
|
104
|
+
template "views/#{view_language}/_form.html.#{view_language}", "app/views/app/#{plural_name}/_form.html.#{view_language}"
|
105
105
|
end
|
106
106
|
|
107
107
|
unless options[:skip_frontend]
|
108
|
-
template "view_controller.rb", "app/controllers/
|
108
|
+
template "view_controller.rb", "app/controllers/front_end/app/#{plural_name}_controller.rb"
|
109
109
|
|
110
|
-
route("match \"all-#{plural_name}\" => \"
|
111
|
-
route("match \"#{singular_name}/:filename\" => \"
|
110
|
+
route("match \"all-#{plural_name}\" => \"front_end/app/#{plural_name}#index\", :as => :front_end_app_#{plural_name}")
|
111
|
+
route("match \"#{singular_name}/:filename\" => \"front_end/app/#{plural_name}#show\", :as => :front_end_app_#{singular_name}")
|
112
112
|
|
113
|
-
template "views/front_end/#{view_language}/index.html.#{view_language}", "app/views/
|
114
|
-
template "views/front_end/#{view_language}/show.html.#{view_language}", "app/views/
|
113
|
+
template "views/front_end/#{view_language}/index.html.#{view_language}", "app/views/front_end/app/#{plural_name}/index.html.#{view_language}"
|
114
|
+
template "views/front_end/#{view_language}/show.html.#{view_language}", "app/views/front_end/app/#{plural_name}/show.html.#{view_language}"
|
115
115
|
end
|
116
116
|
|
117
|
-
route "resources #{plural_name.to_sym.inspect}"
|
117
|
+
route "namespace :app do resources #{plural_name.to_sym.inspect} end"
|
118
118
|
|
119
|
-
if test_framework == :rspec
|
120
|
-
template "tests/#{test_framework}/controller.rb", "spec/controllers/#{plural_name}_controller_spec.rb"
|
121
|
-
else
|
122
|
-
template "tests/#{test_framework}/controller.rb", "test/functional/#{plural_name}_controller_test.rb"
|
123
|
-
end
|
119
|
+
#if test_framework == :rspec
|
120
|
+
#template "tests/#{test_framework}/controller.rb", "spec/controllers/#{plural_name}_controller_spec.rb"
|
121
|
+
#else
|
122
|
+
#template "tests/#{test_framework}/controller.rb", "test/functional/#{plural_name}_controller_test.rb"
|
123
|
+
#end
|
124
124
|
end
|
125
125
|
end
|
126
126
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
def create
|
2
|
-
@<%= singular_name %> =
|
2
|
+
@<%= singular_name %> = ::App::<%= class_name %>.new(params[:app_<%= singular_name %>])
|
3
3
|
if @<%= singular_name %>.save
|
4
4
|
flash[:notice] = "Successfully created <%= model_name.underscore.humanize.downcase %>."
|
5
5
|
redirect_to <%= item_path('url') %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
def destroy
|
2
|
-
@<%= singular_name %> =
|
2
|
+
@<%= singular_name %> = ::App::<%= class_name %>.find(params[:id])
|
3
3
|
@<%= singular_name %>.destroy
|
4
4
|
flash[:notice] = "Successfully destroyed <%= model_name.underscore.humanize.downcase %>."
|
5
|
-
redirect_to <%= items_path('url') %>
|
5
|
+
redirect_to app_<%= items_path('url') %>
|
6
6
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
def update
|
2
|
-
@<%= singular_name %> =
|
3
|
-
if @<%= singular_name %>.update_attributes(params[
|
2
|
+
@<%= singular_name %> = ::App::<%= class_name %>.find(params[:id])
|
3
|
+
if @<%= singular_name %>.update_attributes(params[:app_<%= singular_name %>])
|
4
4
|
flash[:notice] = "Successfully updated <%= model_name.underscore.humanize.downcase %>."
|
5
5
|
redirect_to <%= item_path('url') %>
|
6
6
|
else
|
@@ -10,9 +10,9 @@ class Create<%= plural_class_name %> < ActiveRecord::Migration
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
CmsMenuItem.create({:title =>"<%= plural_class_name %>", :controller_name => "<%= plural_name %>", :url => "/<%= plural_name %>"})
|
13
|
+
Dust::CmsMenuItem.create({:title =>"<%= plural_class_name %>", :controller_name => "app_<%= plural_name %>", :url => "/app/<%= plural_name %>"})
|
14
14
|
<%- unless options[:skip_frontend] %>
|
15
|
-
MenuItem.create({:title => "All <%=plural_class_name%>", :url => "/all-<%=plural_name%>", :active => true})
|
15
|
+
Dust::MenuItem.create({:title => "All <%=plural_class_name%>", :url => "/all-<%=plural_name%>", :active => true})
|
16
16
|
<%- end -%>
|
17
17
|
|
18
18
|
def self.down
|
@@ -1,16 +1,18 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
module App
|
2
|
+
class <%= class_name %> < ActiveRecord::Base
|
3
|
+
attr_accessible <%= model_attributes.map { |a| ":#{a.name}" }.join(", ") %>
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
<%- first_attribute = model_attributes.first -%>
|
6
|
+
def self.page(search, page)
|
7
|
+
with_permissions_to(:manage).search(search).order("<%= first_attribute.name %>").paginate(:per_page => 12, :page => page)
|
8
|
+
end
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
def self.search(search)
|
11
|
+
if search
|
12
|
+
where("<%= first_attribute.name %> LIKE ?", "%#{search}%")
|
13
|
+
else
|
14
|
+
scoped
|
15
|
+
end
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -1,17 +1,19 @@
|
|
1
1
|
<%- first_attribute = model_attributes.first -%>
|
2
|
-
|
2
|
+
module FrontEnd
|
3
|
+
class App::<%= plural_class_name %>Controller < ApplicationController
|
3
4
|
|
4
5
|
def index
|
5
|
-
@<%= plural_name %> =
|
6
|
+
@<%= plural_name %> = ::App::<%= class_name %>.page(params[:search], params[:page])
|
6
7
|
end
|
7
8
|
|
8
9
|
def show
|
9
|
-
|
10
|
-
|
11
|
-
render :file => "#{
|
10
|
+
@<%= singular_name %> = ::App::<%= class_name %>.find_by_<%= first_attribute.name %>(params[:filename])
|
11
|
+
if @<%= singular_name %> == nil
|
12
|
+
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404
|
12
13
|
else
|
13
|
-
@<%= singular_name %>
|
14
|
+
@<%= singular_name %>
|
14
15
|
end
|
15
16
|
end
|
16
17
|
|
17
18
|
end
|
19
|
+
end
|
@@ -1,10 +1,11 @@
|
|
1
1
|
- title "<%= plural_name.titleize %>"
|
2
2
|
<%- first_attribute = model_attributes.first -%>
|
3
3
|
|
4
|
-
=
|
4
|
+
= render_region "<%= plural_name %>" do
|
5
|
+
= will_paginate @<%= plural_name %>
|
5
6
|
|
6
|
-
- @<%= plural_name %>.each do |<%= singular_name %>|
|
7
|
-
|
8
|
-
|
7
|
+
- @<%= plural_name %>.each do |<%= singular_name %>|
|
8
|
+
.item
|
9
|
+
%h3= link_to <%= singular_name %>.<%= first_attribute.name %>, front_end_app_<%= singular_name %>_path(<%= singular_name %>.<%= first_attribute.name %>)
|
9
10
|
|
10
|
-
= will_paginate @<%= plural_name %>
|
11
|
+
= will_paginate @<%= plural_name %>
|
@@ -1,15 +1,15 @@
|
|
1
1
|
<%- first_attribute = model_attributes.first -%>
|
2
2
|
- title @<%= singular_name %>.title
|
3
3
|
|
4
|
-
|
4
|
+
= content_tag :div, :class => "page_#{@<%= singular_name %>.id}" do
|
5
|
+
= render_region "<%= singular_name %>" do
|
6
|
+
- heading @<%= singular_name %>.<%= first_attribute.name %>
|
7
|
+
= @<%= singular_name %>.<%= first_attribute.name %>
|
5
8
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
= link_to "Destroy", @<%= singular_name %>, :confirm => 'Are you sure?', :method => :delete
|
14
|
-
|
|
15
|
-
= link_to "View All", <%= plural_name %>_path
|
9
|
+
- if permitted_to? :manage, :<%= plural_name %>
|
10
|
+
%p
|
11
|
+
= link_to "Edit", edit_<%= singular_name %>_path(@<%= singular_name %>)
|
12
|
+
|
|
13
|
+
= link_to "Destroy", @<%= singular_name %>, :confirm => 'Are you sure?', :method => :delete
|
14
|
+
|
|
15
|
+
= link_to "View All", <%= plural_name %>_path
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#searchbox
|
2
|
-
= form_tag <%= plural_name %>_path, :method => 'get' do
|
2
|
+
= form_tag app_<%= plural_name %>_path, :method => 'get' do
|
3
3
|
= text_field_tag :search, params[:search], :class => "input-text", :placeholder => 'Search <%= plural_name.capitalize %>'
|
4
4
|
= image_submit_tag "admin/blank.png", :class => "image-submit"
|
5
5
|
|
@@ -3,14 +3,14 @@
|
|
3
3
|
|
4
4
|
.button_bar
|
5
5
|
= render :partial => 'search'
|
6
|
-
= link_to 'new page',
|
6
|
+
= link_to 'new page', new_app_<%= singular_name %>_path, :class => 'newfile tip', :title => "New <%= singular_name.titleize %>"
|
7
7
|
|
8
8
|
= will_paginate @<%= plural_name %>
|
9
9
|
|
10
10
|
- @<%= plural_name %>.each do |<%= singular_name %>|
|
11
11
|
.item
|
12
12
|
.ui-widget.ui-helper-clearfix{:style => 'float:right'}
|
13
|
-
= link_to '',
|
13
|
+
= link_to '', edit_app_<%= singular_name %>_path(<%= singular_name %>), :class => 'ui-icon ui-icon-pencil edit tip', :title => "Edit This Item"
|
14
14
|
= link_to '', <%= singular_name %>, :confirm => 'Are you sure?', :method => :delete, :class => 'ui-icon ui-icon-close destroy tip', :title => "Destroy This Item"
|
15
15
|
|
16
16
|
%h3= link_to <%= singular_name %>.<%= first_attribute.name %>, <%= singular_name %>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
.ui-widget.ui-helper-clearfix{:style => "float:right"}
|
7
7
|
<%- if action? :edit -%>
|
8
|
-
=link_to '',
|
8
|
+
=link_to '', edit_app_<%= singular_name %>_path(@<%= singular_name %>), :class => 'ui-icon ui-icon-pencil edit tip', :title => "Edit This Item"
|
9
9
|
<%- end -%>
|
10
10
|
<%- if action? :destroy -%>
|
11
11
|
=link_to "", @<%= singular_name %>, :confirm => 'Are you sure?', :method => :delete, :class => 'ui-icon ui-icon-close destroy tip', :title => "Destroy This Item"
|
metadata
CHANGED
@@ -1,88 +1,68 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: dust-generators
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 2
|
8
|
-
- 8
|
9
|
-
version: 0.2.8
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.1
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- rossnelson
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-12-18 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: shoulda
|
22
|
-
requirement: &
|
16
|
+
requirement: &70293410465400 !ruby/object:Gem::Requirement
|
23
17
|
none: false
|
24
|
-
requirements:
|
25
|
-
- -
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 0
|
29
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
30
22
|
type: :development
|
31
23
|
prerelease: false
|
32
|
-
version_requirements: *
|
33
|
-
- !ruby/object:Gem::Dependency
|
24
|
+
version_requirements: *70293410465400
|
25
|
+
- !ruby/object:Gem::Dependency
|
34
26
|
name: bundler
|
35
|
-
requirement: &
|
27
|
+
requirement: &70293410462920 !ruby/object:Gem::Requirement
|
36
28
|
none: false
|
37
|
-
requirements:
|
29
|
+
requirements:
|
38
30
|
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
segments:
|
41
|
-
- 1
|
42
|
-
- 0
|
43
|
-
- 0
|
31
|
+
- !ruby/object:Gem::Version
|
44
32
|
version: 1.0.0
|
45
33
|
type: :development
|
46
34
|
prerelease: false
|
47
|
-
version_requirements: *
|
48
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *70293410462920
|
36
|
+
- !ruby/object:Gem::Dependency
|
49
37
|
name: jeweler
|
50
|
-
requirement: &
|
38
|
+
requirement: &70293410474480 !ruby/object:Gem::Requirement
|
51
39
|
none: false
|
52
|
-
requirements:
|
40
|
+
requirements:
|
53
41
|
- - ~>
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
segments:
|
56
|
-
- 1
|
57
|
-
- 5
|
58
|
-
- 2
|
42
|
+
- !ruby/object:Gem::Version
|
59
43
|
version: 1.5.2
|
60
44
|
type: :development
|
61
45
|
prerelease: false
|
62
|
-
version_requirements: *
|
63
|
-
- !ruby/object:Gem::Dependency
|
46
|
+
version_requirements: *70293410474480
|
47
|
+
- !ruby/object:Gem::Dependency
|
64
48
|
name: rcov
|
65
|
-
requirement: &
|
49
|
+
requirement: &70293410472920 !ruby/object:Gem::Requirement
|
66
50
|
none: false
|
67
|
-
requirements:
|
68
|
-
- -
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
|
71
|
-
- 0
|
72
|
-
version: "0"
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
73
55
|
type: :development
|
74
56
|
prerelease: false
|
75
|
-
version_requirements: *
|
57
|
+
version_requirements: *70293410472920
|
76
58
|
description: Generators such as Uploadify Albums and Photos, and Location or facilities
|
77
59
|
email: axcess1@me.com
|
78
60
|
executables: []
|
79
|
-
|
80
61
|
extensions: []
|
81
|
-
|
82
|
-
extra_rdoc_files:
|
62
|
+
extra_rdoc_files:
|
83
63
|
- LICENSE.txt
|
84
64
|
- README.rdoc
|
85
|
-
files:
|
65
|
+
files:
|
86
66
|
- Gemfile
|
87
67
|
- Gemfile.lock
|
88
68
|
- LICENSE.txt
|
@@ -198,141 +178,36 @@ files:
|
|
198
178
|
- lib/generators/dust/scaffold/templates/views/haml/index.html.haml
|
199
179
|
- lib/generators/dust/scaffold/templates/views/haml/new.html.haml
|
200
180
|
- lib/generators/dust/scaffold/templates/views/haml/show.html.haml
|
201
|
-
- rails_generators/dust_albums/USAGE
|
202
|
-
- rails_generators/dust_albums/dust_albums_generator.rb
|
203
|
-
- rails_generators/dust_albums/templates/README
|
204
|
-
- rails_generators/dust_albums/templates/app/controllers/albums_controller.rb
|
205
|
-
- rails_generators/dust_albums/templates/app/controllers/photos_controller.rb
|
206
|
-
- rails_generators/dust_albums/templates/app/controllers/view_albums_controller.rb
|
207
|
-
- rails_generators/dust_albums/templates/app/helpers/albums_helper.rb
|
208
|
-
- rails_generators/dust_albums/templates/app/helpers/photos_helper.rb
|
209
|
-
- rails_generators/dust_albums/templates/app/helpers/view_albums_helper.rb
|
210
|
-
- rails_generators/dust_albums/templates/app/models/album.rb
|
211
|
-
- rails_generators/dust_albums/templates/app/models/photo.rb
|
212
|
-
- rails_generators/dust_albums/templates/app/views/albums/_form.html.erb
|
213
|
-
- rails_generators/dust_albums/templates/app/views/albums/_search.html.erb
|
214
|
-
- rails_generators/dust_albums/templates/app/views/albums/_upload_script.html.erb
|
215
|
-
- rails_generators/dust_albums/templates/app/views/albums/edit.html.erb
|
216
|
-
- rails_generators/dust_albums/templates/app/views/albums/index.html.erb
|
217
|
-
- rails_generators/dust_albums/templates/app/views/albums/manage.html.erb
|
218
|
-
- rails_generators/dust_albums/templates/app/views/albums/new.html.erb
|
219
|
-
- rails_generators/dust_albums/templates/app/views/albums/show.html.erb
|
220
|
-
- rails_generators/dust_albums/templates/app/views/albums/show.js.erb
|
221
|
-
- rails_generators/dust_albums/templates/app/views/photos/_form.html.erb
|
222
|
-
- rails_generators/dust_albums/templates/app/views/photos/_photo.html.erb
|
223
|
-
- rails_generators/dust_albums/templates/app/views/photos/_search.html.erb
|
224
|
-
- rails_generators/dust_albums/templates/app/views/photos/array.js.erb
|
225
|
-
- rails_generators/dust_albums/templates/app/views/photos/edit.html.erb
|
226
|
-
- rails_generators/dust_albums/templates/app/views/photos/index.html.erb
|
227
|
-
- rails_generators/dust_albums/templates/app/views/photos/new.html.erb
|
228
|
-
- rails_generators/dust_albums/templates/app/views/photos/show.html.erb
|
229
|
-
- rails_generators/dust_albums/templates/app/views/photos/show.js.erb
|
230
|
-
- rails_generators/dust_albums/templates/app/views/view_albums/index.html.erb
|
231
|
-
- rails_generators/dust_albums/templates/app/views/view_albums/show.html.erb
|
232
|
-
- rails_generators/dust_albums/templates/images/browse.png
|
233
|
-
- rails_generators/dust_albums/templates/images/cancel.png
|
234
|
-
- rails_generators/dust_albums/templates/images/save_position.png
|
235
|
-
- rails_generators/dust_albums/templates/images/upload.png
|
236
|
-
- rails_generators/dust_albums/templates/initializers/flash_session_cookie_middleware.rb
|
237
|
-
- rails_generators/dust_albums/templates/initializers/session_store_middleware.rb
|
238
|
-
- rails_generators/dust_albums/templates/javascript/dragsort.js
|
239
|
-
- rails_generators/dust_albums/templates/javascript/dust_album.js
|
240
|
-
- rails_generators/dust_albums/templates/javascript/uploadify/jquery.uploadify.v2.1.0.js
|
241
|
-
- rails_generators/dust_albums/templates/javascript/uploadify/swfobject.js
|
242
|
-
- rails_generators/dust_albums/templates/javascript/uploadify/uploadify.swf
|
243
|
-
- rails_generators/dust_albums/templates/migration/albums_migration.rb
|
244
|
-
- rails_generators/dust_albums/templates/stylesheets/dust_album.css
|
245
|
-
- rails_generators/dust_albums/templates/stylesheets/dust_album_app.css
|
246
|
-
- rails_generators/dust_albums/templates/stylesheets/uploadify.css
|
247
|
-
- rails_generators/dust_config/USAGE
|
248
|
-
- rails_generators/dust_config/dust_config_generator.rb
|
249
|
-
- rails_generators/dust_config/templates/config.yml
|
250
|
-
- rails_generators/dust_config/templates/load_config.rb
|
251
|
-
- rails_generators/dust_scaffold/USAGE
|
252
|
-
- rails_generators/dust_scaffold/dust_scaffold_generator.rb
|
253
|
-
- rails_generators/dust_scaffold/templates/actions/create.rb
|
254
|
-
- rails_generators/dust_scaffold/templates/actions/destroy.rb
|
255
|
-
- rails_generators/dust_scaffold/templates/actions/edit.rb
|
256
|
-
- rails_generators/dust_scaffold/templates/actions/index.rb
|
257
|
-
- rails_generators/dust_scaffold/templates/actions/new.rb
|
258
|
-
- rails_generators/dust_scaffold/templates/actions/show.rb
|
259
|
-
- rails_generators/dust_scaffold/templates/actions/update.rb
|
260
|
-
- rails_generators/dust_scaffold/templates/controller.rb
|
261
|
-
- rails_generators/dust_scaffold/templates/fixtures.yml
|
262
|
-
- rails_generators/dust_scaffold/templates/helper.rb
|
263
|
-
- rails_generators/dust_scaffold/templates/migration.rb
|
264
|
-
- rails_generators/dust_scaffold/templates/model.rb
|
265
|
-
- rails_generators/dust_scaffold/templates/tests/rspec/actions/create.rb
|
266
|
-
- rails_generators/dust_scaffold/templates/tests/rspec/actions/destroy.rb
|
267
|
-
- rails_generators/dust_scaffold/templates/tests/rspec/actions/edit.rb
|
268
|
-
- rails_generators/dust_scaffold/templates/tests/rspec/actions/index.rb
|
269
|
-
- rails_generators/dust_scaffold/templates/tests/rspec/actions/new.rb
|
270
|
-
- rails_generators/dust_scaffold/templates/tests/rspec/actions/show.rb
|
271
|
-
- rails_generators/dust_scaffold/templates/tests/rspec/actions/update.rb
|
272
|
-
- rails_generators/dust_scaffold/templates/tests/rspec/controller.rb
|
273
|
-
- rails_generators/dust_scaffold/templates/tests/rspec/model.rb
|
274
|
-
- rails_generators/dust_scaffold/templates/tests/shoulda/actions/create.rb
|
275
|
-
- rails_generators/dust_scaffold/templates/tests/shoulda/actions/destroy.rb
|
276
|
-
- rails_generators/dust_scaffold/templates/tests/shoulda/actions/edit.rb
|
277
|
-
- rails_generators/dust_scaffold/templates/tests/shoulda/actions/index.rb
|
278
|
-
- rails_generators/dust_scaffold/templates/tests/shoulda/actions/new.rb
|
279
|
-
- rails_generators/dust_scaffold/templates/tests/shoulda/actions/show.rb
|
280
|
-
- rails_generators/dust_scaffold/templates/tests/shoulda/actions/update.rb
|
281
|
-
- rails_generators/dust_scaffold/templates/tests/shoulda/controller.rb
|
282
|
-
- rails_generators/dust_scaffold/templates/tests/shoulda/model.rb
|
283
|
-
- rails_generators/dust_scaffold/templates/tests/testunit/actions/create.rb
|
284
|
-
- rails_generators/dust_scaffold/templates/tests/testunit/actions/destroy.rb
|
285
|
-
- rails_generators/dust_scaffold/templates/tests/testunit/actions/edit.rb
|
286
|
-
- rails_generators/dust_scaffold/templates/tests/testunit/actions/index.rb
|
287
|
-
- rails_generators/dust_scaffold/templates/tests/testunit/actions/new.rb
|
288
|
-
- rails_generators/dust_scaffold/templates/tests/testunit/actions/show.rb
|
289
|
-
- rails_generators/dust_scaffold/templates/tests/testunit/actions/update.rb
|
290
|
-
- rails_generators/dust_scaffold/templates/tests/testunit/controller.rb
|
291
|
-
- rails_generators/dust_scaffold/templates/tests/testunit/model.rb
|
292
|
-
- rails_generators/dust_scaffold/templates/view_controller.rb
|
293
|
-
- rails_generators/dust_scaffold/templates/views/erb/_form.html.erb
|
294
|
-
- rails_generators/dust_scaffold/templates/views/erb/_search.html.erb
|
295
|
-
- rails_generators/dust_scaffold/templates/views/erb/edit.html.erb
|
296
|
-
- rails_generators/dust_scaffold/templates/views/erb/index.html.erb
|
297
|
-
- rails_generators/dust_scaffold/templates/views/erb/new.html.erb
|
298
|
-
- rails_generators/dust_scaffold/templates/views/erb/show.html.erb
|
299
|
-
- rails_generators/dust_scaffold/templates/views/front_end/index.html.erb
|
300
|
-
- rails_generators/dust_scaffold/templates/views/front_end/show.html.erb
|
301
181
|
- test/helper.rb
|
302
182
|
- test/test_dust-generators.rb
|
303
|
-
has_rdoc: true
|
304
183
|
homepage: http://maple-creative.com
|
305
|
-
licenses:
|
184
|
+
licenses:
|
306
185
|
- MIT
|
307
186
|
post_install_message:
|
308
187
|
rdoc_options: []
|
309
|
-
|
310
|
-
require_paths:
|
188
|
+
require_paths:
|
311
189
|
- lib
|
312
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
190
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
313
191
|
none: false
|
314
|
-
requirements:
|
315
|
-
- -
|
316
|
-
- !ruby/object:Gem::Version
|
317
|
-
|
318
|
-
segments:
|
192
|
+
requirements:
|
193
|
+
- - ! '>='
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
196
|
+
segments:
|
319
197
|
- 0
|
320
|
-
|
321
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
198
|
+
hash: 1787440251366166652
|
199
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
322
200
|
none: false
|
323
|
-
requirements:
|
324
|
-
- -
|
325
|
-
- !ruby/object:Gem::Version
|
326
|
-
|
327
|
-
- 0
|
328
|
-
version: "0"
|
201
|
+
requirements:
|
202
|
+
- - ! '>='
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: '0'
|
329
205
|
requirements: []
|
330
|
-
|
331
206
|
rubyforge_project:
|
332
|
-
rubygems_version: 1.
|
207
|
+
rubygems_version: 1.8.15
|
333
208
|
signing_key:
|
334
209
|
specification_version: 3
|
335
210
|
summary: Generators for DustCMS
|
336
|
-
test_files:
|
211
|
+
test_files:
|
337
212
|
- test/helper.rb
|
338
213
|
- test/test_dust-generators.rb
|