dust-generators 0.1.7 → 0.1.8

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.
Files changed (26) hide show
  1. data/Gemfile +1 -5
  2. data/LICENSE.txt +1 -1
  3. data/Rakefile +1 -1
  4. data/lib/dust/version.rb +1 -1
  5. data/rails_generators/dust_albums/dust_albums_generator.rb +4 -3
  6. data/rails_generators/dust_albums/templates/README +3 -9
  7. data/rails_generators/dust_albums/templates/app/views/albums/show.html.erb +7 -2
  8. data/rails_generators/dust_albums/templates/app/views/photos/show.js.erb +1 -1
  9. data/rails_generators/dust_albums/templates/javascript/dust_album.js +10 -1
  10. data/rails_generators/dust_albums/templates/stylesheets/dust_album.css +1 -1
  11. data/rails_generators/dust_scaffold/dust_scaffold_generator.rb +62 -3
  12. data/rails_generators/dust_scaffold/templates/migration.rb +3 -1
  13. data/rails_generators/dust_scaffold/templates/model.rb +4 -4
  14. data/rails_generators/dust_scaffold/templates/view_controller.rb +17 -0
  15. data/rails_generators/dust_scaffold/templates/views/erb/_form.html.erb +3 -3
  16. data/rails_generators/dust_scaffold/templates/views/erb/_search.html.erb +1 -1
  17. data/rails_generators/dust_scaffold/templates/views/erb/index.html.erb +1 -1
  18. data/rails_generators/dust_scaffold/templates/views/erb/show.html.erb +2 -2
  19. data/rails_generators/dust_scaffold/templates/views/front_end/index.html.erb +14 -0
  20. data/rails_generators/dust_scaffold/templates/views/front_end/show.html.erb +17 -0
  21. metadata +25 -33
  22. data/rails_generators/dust_scaffold/templates/views/haml/_form.html.haml +0 -10
  23. data/rails_generators/dust_scaffold/templates/views/haml/edit.html.haml +0 -14
  24. data/rails_generators/dust_scaffold/templates/views/haml/index.html.haml +0 -25
  25. data/rails_generators/dust_scaffold/templates/views/haml/new.html.haml +0 -7
  26. data/rails_generators/dust_scaffold/templates/views/haml/show.html.haml +0 -20
data/Gemfile CHANGED
@@ -1,9 +1,5 @@
1
1
  source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
- # Add dependencies to develop your gem here.
6
- # Include everything needed to run rake, tests, features, etc.
2
+
7
3
  group :development do
8
4
  gem "shoulda", ">= 0"
9
5
  gem "bundler", "~> 1.0.0"
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011 rossnelson
1
+ Copyright (c) 2011 Ross Nelson
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -16,7 +16,7 @@ require 'jeweler'
16
16
  Jeweler::Tasks.new do |gem|
17
17
  gem.name = "dust-generators"
18
18
  gem.version = Dust::Version::STRING
19
- gem.homepage = "http://github.com/rossnelson/dust-generators"
19
+ gem.homepage = "http://maple-creative.com"
20
20
  gem.license = "MIT"
21
21
  gem.summary = %Q{Generators for DustCMS}
22
22
  gem.description = %Q{Generators such as Uploadify Albums and Photos, and Location or facilities}
data/lib/dust/version.rb CHANGED
@@ -2,7 +2,7 @@ class Dust
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 7
5
+ PATCH = 8
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
@@ -60,6 +60,7 @@ class DustAlbumsGenerator < Rails::Generator::Base
60
60
  m.template "images/cancel.png", "public/images/cancel.png"
61
61
  m.template "images/browse.png", "public/images/browse.png"
62
62
  m.template "images/upload.png", "public/images/upload.png"
63
+ m.template "images/save_position.png", "public/images/save_position.png"
63
64
  end
64
65
 
65
66
  def initializers(m)
@@ -68,9 +69,6 @@ class DustAlbumsGenerator < Rails::Generator::Base
68
69
  end
69
70
 
70
71
  def routes(m)
71
- m.route_resources 'photos'
72
- m.route_resources 'albums'
73
-
74
72
  m.route :name => 'view_albums',
75
73
  :url => 'all/albums',
76
74
  :controller => 'view_albums',
@@ -83,6 +81,9 @@ class DustAlbumsGenerator < Rails::Generator::Base
83
81
  :url => 'manage-photos/:id',
84
82
  :controller => 'albums',
85
83
  :action => 'manage'
84
+
85
+ m.route_resources 'photos'
86
+ m.route_resources 'albums'
86
87
  end
87
88
 
88
89
  end
@@ -1,11 +1,5 @@
1
1
  ######################################################################################################
2
- #
3
- # Unfortunately the generated routes
4
- #
5
- # {photos, albums, and three named routes ('manage-photos/:id', 'photos-for/:filename', 'all/albums')}
6
- #
7
- # need to be placed before the existing named routes
8
- #
9
- # NOW run rake db:migrate
10
- #
2
+ # #
3
+ # NOW run rake db:migrate #
4
+ # #
11
5
  ######################################################################################################
@@ -3,7 +3,7 @@
3
3
  <%= stylesheet( 'dust_album','uploadify') %>
4
4
 
5
5
 
6
- <% content_for :javascipts do %>
6
+ <% content_for :head do %>
7
7
  <%= javascript_include_tag 'dragsort', 'dust_album' %>
8
8
  <% end -%>
9
9
 
@@ -24,8 +24,13 @@
24
24
  </div>
25
25
 
26
26
  <div class="item">
27
+ <div class="manage">
28
+ <br />
29
+ <%= link_to image_tag('save_position.png'), photos_path, :id => 'order_photos' %>
30
+ </div>
27
31
 
28
- <h3 id="photos_count"><%= pluralize(@album.photos.size, "Photo")%> <% unless @album.photos.empty? %> | <%= link_to "Select Photos For Deletion", manage_photos_path(@album), :class => 'settings' %> | <%= link_to 're-Order Photos', photos_path, :id => 'order_photos' %> <% end %></h3>
32
+ <h3 id="photos_count"><%= pluralize(@album.photos.size, "Photo")%> <% unless @album.photos.empty? %> | <%= link_to "Select Photos For Deletion", manage_photos_path(@album), :class => 'settings' %> <% end %> </h3>
33
+ <p>Drag photos to reorder them. Don't forget to hit the save order button when your done.</p>
29
34
  <ul id="uploads">
30
35
  <%= render :partial => @album.photos.roots, :photo => @photo %>
31
36
  </ul>
@@ -1,4 +1,4 @@
1
- $('#photos_count').html('<%= pluralize(@album.photos.size, "Photo")%> | <%= link_to "Select Photos For Deletion", manage_photos_path(@album), :class => 'settings' %> | <%= link_to 're-Order Photos', photos_path, :id => 'order_photos' %> ');
1
+ $('#photos_count').html('<%= pluralize(@album.photos.size, "Photo")%> | <%= link_to "Select Photos For Deletion", manage_photos_path(@album), :class => 'settings' %> ');
2
2
  $('#uploads').append("<%= escape_javascript(render(:partial => "photos/photo", :locals => {:photo => @photo})) %>");
3
3
  $("a#inline").fancybox({
4
4
  'transitionIn' : 'elastic',
@@ -1,7 +1,16 @@
1
1
  $(document).ready(function(){
2
2
 
3
3
  // photo management /////////////////////////////////////////////////////////////////////////////////////////////
4
- $("#uploads").dragsort();
4
+ $("#uploads").dragsort({
5
+ dragSelector: "div",
6
+ dragEnd: notice,
7
+ placeHolderTemplate: "<li class='placeHolder'><div></div></li>"
8
+ });
9
+
10
+ $("#reorder").hide();
11
+ function notice() {
12
+ $("#reorder").slideDown();
13
+ }
5
14
 
6
15
  $(function () { // this line makes sure this code runs on page load
7
16
  $('.checkall').click(function () {
@@ -13,4 +13,4 @@ table.photos tr.odd td { padding:15px;}
13
13
  #uploads li{ float:left; padding:5px; width:100px; height:125px; }
14
14
  .photo{ width:90px; height:125px; padding:5px; text-align:center; }
15
15
 
16
- .placeHolder div { background-color:white !important; border:dashed 1px gray !important; }
16
+ .placeHolder div { background-color:transparent !important; border:dashed 1px gray !important; width:100px; height: 125px; }
@@ -75,13 +75,32 @@ class DustScaffoldGenerator < Rails::Generator::Base
75
75
  m.template "views/#{view_language}/#{action}.html.#{view_language}", "app/views/#{plural_name}/#{action}.html.#{view_language}"
76
76
  end
77
77
  end
78
+ m.template "views/erb/_search.html.erb", "app/views/#{plural_name}/_search.html.erb"
78
79
 
79
80
  if form_partial?
80
81
  m.template "views/#{view_language}/_form.html.#{view_language}", "app/views/#{plural_name}/_form.html.#{view_language}"
81
82
  end
82
-
83
- m.route_resources plural_name
84
-
83
+
84
+ unless options[:skip_front_end]
85
+ m.directory "app/controllers"
86
+ m.template "view_controller.rb", "app/controllers/view_#{plural_name}_controller.rb"
87
+
88
+ m.route :name => "view_#{plural_name}",
89
+ :url => "view_#{plural_name}",
90
+ :controller => "view_#{plural_name}",
91
+ :action => 'index'
92
+ m.route :name => "view_#{singular_name}",
93
+ :url => "view_#{singular_name}/:filename",
94
+ :controller => "view_#{plural_name}",
95
+ :action => 'show'
96
+
97
+ m.directory "app/views/view_#{plural_name}"
98
+ m.template "views/front_end/index.html.erb", "app/views/view_#{plural_name}/index.html.erb"
99
+ m.template "views/front_end/show.html.erb", "app/views/view_#{plural_name}/show.html.erb"
100
+ end
101
+
102
+ m.route_resources plural_name
103
+
85
104
  if rspec?
86
105
  m.directory "spec/controllers"
87
106
  m.template "tests/#{test_framework}/controller.rb", "spec/controllers/#{plural_name}_controller_spec.rb"
@@ -206,6 +225,7 @@ protected
206
225
  opt.on("--skip-migration", "Don't generate migration file for model.") { |v| options[:skip_migration] = v }
207
226
  opt.on("--skip-timestamps", "Don't add timestamps to migration file.") { |v| options[:skip_timestamps] = v }
208
227
  opt.on("--skip-controller", "Don't generate controller, helper, or views.") { |v| options[:skip_controller] = v }
228
+ opt.on("--skip-front-end", "Dont generate a views controller.") { |v| options[:skip_front_end] = v }
209
229
  opt.on("--invert", "Generate all controller actions except these mentioned.") { |v| options[:invert] = v }
210
230
  opt.on("--haml", "Generate HAML views instead of ERB.") { |v| options[:haml] = v }
211
231
  opt.on("--testunit", "Use test/unit for test files.") { options[:test_framework] = :testunit }
@@ -230,3 +250,42 @@ USAGE: #{$0} #{spec.name} ModelName [controller_actions and model:attributes] [o
230
250
  EOS
231
251
  end
232
252
  end
253
+
254
+ module Rails
255
+ module Generator
256
+ module Commands
257
+
258
+ class Base
259
+ def route_code(route_options)
260
+ "map.#{route_options[:name]} '#{route_options[:url]}', :controller => '#{route_options[:controller]}', :action => '#{route_options[:action]}'"
261
+ end
262
+ end
263
+
264
+ # Here's a readable version of the long string used above in route_code;
265
+ # but it should be kept on one line to avoid inserting extra whitespace
266
+ # into routes.rb when the generator is run:
267
+ # "map.#{route_options[:name]} '#{route_options[:name]}',
268
+ # :controller => '#{route_options[:controller]}',
269
+ # :action => '#{route_options[:action]}'"
270
+
271
+ class Create
272
+ def route(route_options)
273
+ sentinel = 'ActionController::Routing::Routes.draw do |map|'
274
+ logger.route route_code(route_options)
275
+ gsub_file 'config/routes.rb', /(#{Regexp.escape(sentinel)})/mi do |m|
276
+ "#{m}\n #{route_code(route_options)}\n"
277
+ end
278
+ end
279
+ end
280
+
281
+ class Destroy
282
+ def route(route_options)
283
+ logger.remove_route route_code(route_options)
284
+ to_remove = "\n #{route_code(route_options)}"
285
+ gsub_file 'config/routes.rb', /(#{to_remove})/mi, ''
286
+ end
287
+ end
288
+
289
+ end
290
+ end
291
+ end
@@ -1,3 +1,4 @@
1
+ <%- first_attribute = attributes.first -%>
1
2
  class Create<%= plural_class_name %> < ActiveRecord::Migration
2
3
  def self.up
3
4
  create_table :<%= plural_name %> do |t|
@@ -10,7 +11,8 @@ class Create<%= plural_class_name %> < ActiveRecord::Migration
10
11
  end
11
12
  end
12
13
 
13
- CmsMenuItem.create({:title =>"<%= plural_class_name %>", :controller_name => "<%= plural_name %>", :url => "/<%= plural_name %>"})
14
+ AdminMenuItem.create({:title =>"<%= plural_class_name %>", :controller_name => "<%= plural_name %>", :url => "/<%= plural_name %>"})
15
+ MenuItem.create({:title => "View <%= plural_class_name %>", :url => "/view_<%= plural_name %>", :active => true})
14
16
 
15
17
  def self.down
16
18
  drop_table :<%= plural_name %>
@@ -4,8 +4,8 @@ class <%= class_name %> < ActiveRecord::Base
4
4
  <%- first_attribute = attributes.first -%>
5
5
  def self.page(search, page)
6
6
  paginate :per_page => 10, :page => page,
7
- :order => 'name',
8
- :conditions => ["<%= first_attribute.name %> LIKE ? OR content LIKE ?", "%#{search}%", "%#{search}%"]
7
+ :order => '<%= first_attribute.name %>',
8
+ :conditions => ["<%= first_attribute.name %> LIKE ?", "%#{search}%"]
9
9
  end
10
10
 
11
11
  has_one :menu_item, :as => :linkable, :dependent => :destroy
@@ -20,7 +20,7 @@ class <%= class_name %> < ActiveRecord::Base
20
20
  else
21
21
  @menu_item.update_attributes(
22
22
  :title => self.<%= first_attribute.name %>,
23
- :url => "/#{self.<%= first_attribute.name %>}",
23
+ :url => "/view_<%= singular_name %>/#{self.<%= first_attribute.name %>}",
24
24
  :active => self.<%= first_attribute.name %>
25
25
  )
26
26
  end
@@ -29,7 +29,7 @@ class <%= class_name %> < ActiveRecord::Base
29
29
  def create_menu_item
30
30
  @menu_item = self.build_menu_item(
31
31
  :title => self.<%= first_attribute.name %>,
32
- :url => "/#{<%= first_attribute.name %>}",
32
+ :url => "/view_<%= singular_name %>/#{<%= first_attribute.name %>}",
33
33
  :active => self.<%= first_attribute.name %>
34
34
  )
35
35
  @menu_item.save
@@ -0,0 +1,17 @@
1
+ <%- first_attribute = attributes.first -%>
2
+ class View<%= plural_class_name %>Controller < ApplicationController
3
+
4
+ def index
5
+ @<%= plural_name %> = <%= class_name %>.page(params[:search], params[:page])
6
+ end
7
+
8
+ def show
9
+ if <%= class_name %>.find_by_<%= first_attribute.name %>(params[:filename]) == nil
10
+ @<%= singular_name %> = <%= class_name %>.find(:first)
11
+ render :file => "#{RAILS_ROOT}/public/404.html", :layout => false, :status => 404
12
+ else
13
+ @<%= singular_name %> = <%= class_name %>.find_by_<%= first_attribute.name %>(params[:filename])
14
+ end
15
+ end
16
+
17
+ end
@@ -1,10 +1,10 @@
1
- <%%= content_for :head do -%>
1
+ <%% content_for :head do -%>
2
2
  <%%= javascript_include_tag :ckeditor %>
3
3
  <%% end -%>
4
4
 
5
- <%%= form_for @<%= singular_name %>, :validations => true do |f| %>
5
+ <%% form_for @<%= singular_name %>, :validations => true do |f| %>
6
6
  <%%= f.error_messages %>
7
- <%- for attribute in model_attributes -%>
7
+ <%- for attribute in attributes -%>
8
8
  <div class="item">
9
9
  <%%= f.label :<%= attribute.name %> %><br />
10
10
  <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, :class => 'field' %>
@@ -1,5 +1,5 @@
1
1
  <div id="searchbox">
2
- <%%= form_tag <%= plural_name %>_path, :method => 'get' do %>
2
+ <%% form_tag <%= 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
  <%% end %>
@@ -1,5 +1,5 @@
1
1
  <%% title "<%= plural_name.titleize %>" %>
2
- <%- first_attribute = model_attributes.first -%>
2
+ <%- first_attribute = attributes.first -%>
3
3
  <div class="button_bar">
4
4
  <%%= render :partial => 'search' %>
5
5
  <%%= link_to 'new page', new_<%= singular_name %>_path, :class => 'newfile tip', :title => "New <%= singular_name.titleize %>" %>
@@ -14,9 +14,9 @@
14
14
  <p>
15
15
  <%%= link_to "Preview <%= singular_name.titleize %>", @<%= singular_name %>, :class => 'remote_iframe' %>
16
16
  </p>
17
- <%- for attribute in model_attributes -%>
17
+ <%- for attribute in attributes -%>
18
18
  <p>
19
- <strong><%= attribute.human_name.titleize %>:</strong>
19
+ <strong><%= attribute.column.human_name.titleize %>:</strong>
20
20
  <%%= @<%= singular_name %>.<%= attribute.name %> %>
21
21
  </p>
22
22
  <%- end -%>
@@ -0,0 +1,14 @@
1
+ <%% title "<%= plural_name.titleize %>" %>
2
+ <%- first_attribute = attributes.first -%>
3
+
4
+ <%%= will_paginate @<%= plural_name %> %>
5
+
6
+ <%% @<%= plural_name %>.each do |<%= singular_name %>| %>
7
+ <div class="item">
8
+
9
+ <h3><%%= link_to <%= singular_name %>.<%= first_attribute.name %>, view_<%= singular_name %>_path(<%= singular_name %>.<%= first_attribute.name %>) %></h3>
10
+
11
+ </div>
12
+ <%% end -%>
13
+
14
+ <%%= will_paginate @<%= plural_name %> %>
@@ -0,0 +1,17 @@
1
+ <%- first_attribute = attributes.first -%>
2
+ <%% title @<%= singular_name %>.title %>
3
+
4
+ <%% content_tag :div, :class => "page_#{@<%= singular_name %>.id}" do %>
5
+
6
+ <%% heading @<%= singular_name %>.<%= first_attribute.name %> %>
7
+ <%%= @<%= singular_name %>.<%= first_attribute.name %> %>
8
+
9
+ <%% end %>
10
+
11
+ <%% if permitted_to? :manage, :<%= plural_name %> %>
12
+ <p>
13
+ <%%= link_to "Edit", edit_<%= singular_name %>_path(@<%= singular_name %>) %> |
14
+ <%%= link_to "Destroy", @<%= singular_name %>, :confirm => 'Are you sure?', :method => :delete %> |
15
+ <%%= link_to "View All", <%= plural_name %>_path %>
16
+ </p>
17
+ <%% end %>
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dust-generators
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease:
4
+ prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 1
9
- - 7
10
- version: 0.1.7
8
+ - 8
9
+ version: 0.1.8
11
10
  platform: ruby
12
11
  authors:
13
12
  - rossnelson
@@ -19,65 +18,61 @@ date: 2011-04-19 00:00:00 -05:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
- prerelease: false
23
21
  name: shoulda
24
- type: :development
25
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ requirement: &id001 !ruby/object:Gem::Requirement
26
23
  none: false
27
24
  requirements:
28
25
  - - ">="
29
26
  - !ruby/object:Gem::Version
30
- hash: 3
31
27
  segments:
32
28
  - 0
33
29
  version: "0"
34
- requirement: *id001
35
- - !ruby/object:Gem::Dependency
30
+ type: :development
36
31
  prerelease: false
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
37
34
  name: bundler
38
- type: :development
39
- version_requirements: &id002 !ruby/object:Gem::Requirement
35
+ requirement: &id002 !ruby/object:Gem::Requirement
40
36
  none: false
41
37
  requirements:
42
38
  - - ~>
43
39
  - !ruby/object:Gem::Version
44
- hash: 23
45
40
  segments:
46
41
  - 1
47
42
  - 0
48
43
  - 0
49
44
  version: 1.0.0
50
- requirement: *id002
51
- - !ruby/object:Gem::Dependency
45
+ type: :development
52
46
  prerelease: false
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
53
49
  name: jeweler
54
- type: :development
55
- version_requirements: &id003 !ruby/object:Gem::Requirement
50
+ requirement: &id003 !ruby/object:Gem::Requirement
56
51
  none: false
57
52
  requirements:
58
53
  - - ~>
59
54
  - !ruby/object:Gem::Version
60
- hash: 7
61
55
  segments:
62
56
  - 1
63
57
  - 5
64
58
  - 2
65
59
  version: 1.5.2
66
- requirement: *id003
67
- - !ruby/object:Gem::Dependency
60
+ type: :development
68
61
  prerelease: false
62
+ version_requirements: *id003
63
+ - !ruby/object:Gem::Dependency
69
64
  name: rcov
70
- type: :development
71
- version_requirements: &id004 !ruby/object:Gem::Requirement
65
+ requirement: &id004 !ruby/object:Gem::Requirement
72
66
  none: false
73
67
  requirements:
74
68
  - - ">="
75
69
  - !ruby/object:Gem::Version
76
- hash: 3
77
70
  segments:
78
71
  - 0
79
72
  version: "0"
80
- requirement: *id004
73
+ type: :development
74
+ prerelease: false
75
+ version_requirements: *id004
81
76
  description: Generators such as Uploadify Albums and Photos, and Location or facilities
82
77
  email: axcess1@me.com
83
78
  executables: []
@@ -282,21 +277,19 @@ files:
282
277
  - rails_generators/dust_scaffold/templates/tests/testunit/actions/update.rb
283
278
  - rails_generators/dust_scaffold/templates/tests/testunit/controller.rb
284
279
  - rails_generators/dust_scaffold/templates/tests/testunit/model.rb
280
+ - rails_generators/dust_scaffold/templates/view_controller.rb
285
281
  - rails_generators/dust_scaffold/templates/views/erb/_form.html.erb
286
282
  - rails_generators/dust_scaffold/templates/views/erb/_search.html.erb
287
283
  - rails_generators/dust_scaffold/templates/views/erb/edit.html.erb
288
284
  - rails_generators/dust_scaffold/templates/views/erb/index.html.erb
289
285
  - rails_generators/dust_scaffold/templates/views/erb/new.html.erb
290
286
  - rails_generators/dust_scaffold/templates/views/erb/show.html.erb
291
- - rails_generators/dust_scaffold/templates/views/haml/_form.html.haml
292
- - rails_generators/dust_scaffold/templates/views/haml/edit.html.haml
293
- - rails_generators/dust_scaffold/templates/views/haml/index.html.haml
294
- - rails_generators/dust_scaffold/templates/views/haml/new.html.haml
295
- - rails_generators/dust_scaffold/templates/views/haml/show.html.haml
287
+ - rails_generators/dust_scaffold/templates/views/front_end/index.html.erb
288
+ - rails_generators/dust_scaffold/templates/views/front_end/show.html.erb
296
289
  - test/helper.rb
297
290
  - test/test_dust-generators.rb
298
291
  has_rdoc: true
299
- homepage: http://github.com/rossnelson/dust-generators
292
+ homepage: http://maple-creative.com
300
293
  licenses:
301
294
  - MIT
302
295
  post_install_message:
@@ -309,7 +302,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
309
302
  requirements:
310
303
  - - ">="
311
304
  - !ruby/object:Gem::Version
312
- hash: 3
305
+ hash: 2684519535271162567
313
306
  segments:
314
307
  - 0
315
308
  version: "0"
@@ -318,14 +311,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
318
311
  requirements:
319
312
  - - ">="
320
313
  - !ruby/object:Gem::Version
321
- hash: 3
322
314
  segments:
323
315
  - 0
324
316
  version: "0"
325
317
  requirements: []
326
318
 
327
319
  rubyforge_project:
328
- rubygems_version: 1.4.2
320
+ rubygems_version: 1.3.7
329
321
  signing_key:
330
322
  specification_version: 3
331
323
  summary: Generators for DustCMS
@@ -1,10 +0,0 @@
1
- - form_for @<%= singular_name %> do |f|
2
- = f.error_messages
3
- <%- for attribute in model_attributes -%>
4
- %p
5
- = f.label :<%= attribute.name %>
6
- %br
7
- = f.<%= attribute.field_type %> :<%= attribute.name %>
8
- <%- end -%>
9
- %p
10
- = f.submit
@@ -1,14 +0,0 @@
1
- - title "Edit <%= singular_name.titleize %>"
2
-
3
- <%= render_form %>
4
-
5
- <%- if actions? :show, :index -%>
6
- %p
7
- <%- if action? :show -%>
8
- = link_to "Show", <%= singular_name %>_path(@<%= singular_name %>)
9
- |
10
- <%- end -%>
11
- <%- if action? :index -%>
12
- = link_to "View All", <%= plural_name %>_path
13
- <%- end -%>
14
- <%- end -%>
@@ -1,25 +0,0 @@
1
- - title "<%= plural_name.titleize %>"
2
-
3
- %table
4
- %tr
5
- <%- for attribute in model_attributes -%>
6
- %th <%= attribute.human_name %>
7
- <%- end -%>
8
- - for <%= singular_name %> in @<%= plural_name %>
9
- %tr
10
- <%- for attribute in model_attributes -%>
11
- %td= <%= singular_name %>.<%= attribute.name %>
12
- <%- end -%>
13
- <%- if action? :show -%>
14
- %td= link_to 'Show', <%= singular_name %>
15
- <%- end -%>
16
- <%- if action? :edit -%>
17
- %td= link_to 'Edit', edit_<%= singular_name %>_path(<%= singular_name %>)
18
- <%- end -%>
19
- <%- if action? :destroy -%>
20
- %td= link_to 'Destroy', <%= singular_name %>, :confirm => 'Are you sure?', :method => :delete
21
- <%- end -%>
22
-
23
- <%- if actions? :new -%>
24
- %p= link_to "New <%= singular_name.titleize %>", new_<%= singular_name %>_path
25
- <%- end -%>
@@ -1,7 +0,0 @@
1
- - title "New <%= singular_name.titleize %>"
2
-
3
- <%= render_form %>
4
-
5
- <%- if action? :index -%>
6
- %p= link_to "Back to List", <%= plural_name %>_path
7
- <%- end -%>
@@ -1,20 +0,0 @@
1
- - title "<%= singular_name.titleize %>"
2
-
3
- <%- for attribute in model_attributes -%>
4
- %p
5
- %strong <%= attribute.human_name.titleize %>:
6
- = @<%= singular_name %>.<%= attribute.name %>
7
- <%- end -%>
8
-
9
- %p
10
- <%- if action? :edit -%>
11
- = link_to "Edit", edit_<%= singular_name %>_path(@<%= singular_name %>)
12
- |
13
- <%- end -%>
14
- <%- if action? :destroy -%>
15
- = link_to "Destroy", @<%= singular_name %>, :confirm => 'Are you sure?', :method => :delete
16
- |
17
- <%- end -%>
18
- <%- if action? :index -%>
19
- = link_to "View All", <%= plural_name %>_path
20
- <%- end -%>