jrhicks-static-generators 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -87,6 +87,8 @@ rails_generators/static_scaffold/templates/helper_test.rb
87
87
  rails_generators/static_scaffold/templates/layout.html.erb
88
88
  rails_generators/static_scaffold/templates/model.rb
89
89
  rails_generators/static_scaffold/templates/paperclip_tokens.rb
90
+ rails_generators/static_scaffold/templates/partial_work_area_entry_header.html.erb
91
+ rails_generators/static_scaffold/templates/partial_work_area_index_header.html.erb
90
92
  rails_generators/static_scaffold/templates/view_edit.html.erb
91
93
  rails_generators/static_scaffold/templates/view_index.html.erb
92
94
  rails_generators/static_scaffold/templates/view_new.html.erb
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('static-generators', '0.4.0') do |p|
5
+ Echoe.new('static-generators', '0.4.1') do |p|
6
6
  p.project = "staticgenerators"
7
7
  p.description = "Generate attractive interfaces that are easy to edit."
8
8
  p.url = "http://github.com/jrhicks/static-scaffolds"
@@ -88,12 +88,12 @@ class StaticScaffoldGenerator < Rails::Generator::NamedBase
88
88
  end
89
89
 
90
90
  # Partials
91
- #for action in "".split
92
- # m.template(
93
- # "partial_#{action}.html.erb",
94
- # File.join('app/views', controller_class_path, controller_file_name, "_#{action}.html.erb")
95
- # )
96
- #end
91
+ for action in "work_area_entry_header work_area_index_header".split
92
+ m.template(
93
+ "partial_#{action}.html.erb",
94
+ File.join('app/views', controller_class_path, controller_file_name, "_#{action}.html.erb")
95
+ )
96
+ end
97
97
 
98
98
 
99
99
  # Layout and stylesheet.
@@ -9,6 +9,8 @@ class <%= controller_class_name %>Controller < ApplicationController
9
9
  @<%=gen_spec.plural_name %> = <%= gen_spec.model_name %>.search(params[:page])
10
10
  <%end -%>
11
11
 
12
+ # Configure Partials
13
+ @work_area_header = "work_area_index_header"
12
14
 
13
15
  respond_to do |format|
14
16
  format.html # index.html.erb
@@ -21,6 +23,8 @@ class <%= controller_class_name %>Controller < ApplicationController
21
23
  def show
22
24
  @<%= file_name %> = <%= class_name %>.find(params[:id])
23
25
 
26
+ @work_area_header = "work_area_entry_header"
27
+
24
28
  respond_to do |format|
25
29
  format.html # show.html.erb
26
30
  format.xml { render :xml => @<%= file_name %> }
@@ -39,6 +43,8 @@ class <%= controller_class_name %>Controller < ApplicationController
39
43
  <% end -%>
40
44
 
41
45
  <%end -%>
46
+ @work_area_header = "work_area_entry_header"
47
+
42
48
  respond_to do |format|
43
49
  format.html # new.html.erb
44
50
  format.xml { render :xml => @<%= file_name %> }
@@ -58,13 +64,18 @@ class <%= controller_class_name %>Controller < ApplicationController
58
64
  respond_to do |format|
59
65
  if @<%= file_name %>.save
60
66
  flash[:notice] = '<%= class_name %> was successfully created.'
67
+ @work_area_header = "work_area_index_header"
61
68
  format.html { redirect_to(@<%= file_name %>) }
62
69
  format.xml { render :xml => @<%= file_name %>, :status => :created, :location => @<%= file_name %> }
63
70
  else
71
+ @work_area_header = "work_area_entry_header"
64
72
  format.html { render :action => "new" }
65
73
  format.xml { render :xml => @<%= file_name %>.errors, :status => :unprocessable_entity }
66
74
  end
67
75
  end
76
+
77
+
78
+
68
79
  end
69
80
 
70
81
  # PUT /<%= table_name %>/1
@@ -72,12 +83,15 @@ class <%= controller_class_name %>Controller < ApplicationController
72
83
  def update
73
84
  @<%= file_name %> = <%= class_name %>.find(params[:id])
74
85
 
86
+
75
87
  respond_to do |format|
76
88
  if @<%= file_name %>.update_attributes(params[:<%= file_name %>])
77
89
  flash[:notice] = '<%= class_name %> was successfully updated.'
78
90
  format.html { redirect_to(@<%= file_name %>) }
79
91
  format.xml { head :ok }
92
+ @work_area_header = "work_area_index_header"
80
93
  else
94
+ @work_area_header = "work_area_entry_header"
81
95
  format.html { render :action => "edit" }
82
96
  format.xml { render :xml => @<%= file_name %>.errors, :status => :unprocessable_entity }
83
97
  end
@@ -42,11 +42,7 @@
42
42
  <div class="work_area">
43
43
 
44
44
  <div class="work_area_header ui-corner-tr">
45
- <div style="float: right; padding-right: 1em; font-size: .8em;">
46
- <%%= will_paginate @posts, :inner_window=>1, :outer_window=>0, :previous_label=>'&laquo;', :next_label=>'&raquo;' %>
47
-
48
- </div>
49
- Application Work Area Title Bar
45
+ <%%=render :partial=>@work_area_header%>
50
46
  </div> <!-- end work_area header -->
51
47
 
52
48
  <div class="presentation_selector">
@@ -0,0 +1,5 @@
1
+ <div style="float: right; padding-right: 1em; font-size: .8em;">
2
+ <%%= will_paginate @posts, :inner_window=>1, :outer_window=>0, :previous_label=>'&laquo;', :next_label=>'&raquo;' %>
3
+
4
+ </div>
5
+ Application Work Area Title Bar
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{static-generators}
5
- s.version = "0.4.0"
5
+ s.version = "0.4.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Jeffrey Hicks"]
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.description = %q{Generate attractive interfaces that are easy to edit.}
11
11
  s.email = %q{jrhicks (at) gmail (dot) com}
12
12
  s.extra_rdoc_files = ["CHANGELOG", "lib/static_generators.rb", "LICENSE", "README.md", "tasks/deployment.rake", "TODO"]
13
- s.files = ["CHANGELOG", "lib/static_generators.rb", "LICENSE", "rails_generators/static_app/static_app_generator.rb", "rails_generators/static_app/templates/application_helper.rb", "rails_generators/static_app/templates/blueprint/AUTHORS.textile", "rails_generators/static_app/templates/blueprint/icons/cross.png", "rails_generators/static_app/templates/blueprint/icons/key.png", "rails_generators/static_app/templates/blueprint/icons/tick.png", "rails_generators/static_app/templates/blueprint/ie.css", "rails_generators/static_app/templates/blueprint/print.css", "rails_generators/static_app/templates/blueprint/README", "rails_generators/static_app/templates/blueprint/README.textile", "rails_generators/static_app/templates/blueprint/readme.txt", "rails_generators/static_app/templates/blueprint/screen.css", "rails_generators/static_app/templates/header_bg.png", "rails_generators/static_app/templates/icons/cross.png", "rails_generators/static_app/templates/icons/doc.png", "rails_generators/static_app/templates/icons/email.png", "rails_generators/static_app/templates/icons/external.png", "rails_generators/static_app/templates/icons/feed.png", "rails_generators/static_app/templates/icons/key.png", "rails_generators/static_app/templates/icons/pdf.png", "rails_generators/static_app/templates/icons/tick.png", "rails_generators/static_app/templates/icons/visited.png", "rails_generators/static_app/templates/icons/xls.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_flat_55_fbec88_40x100.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_glass_85_dfeffc_1x400.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_glass_95_fef1ec_1x400.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_217bc0_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_2e83ff_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_469bdd_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_6da8d5_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_cd0a0a_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_d8e7f3_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_f9bd01_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/jquery-ui-1.7.2.custom.css", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/index.html", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/js/jquery-1.3.2.min.js", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/js/jquery-ui-1.7.2.custom.min.js", "rails_generators/static_app/templates/jrails/jquery-ui.js", "rails_generators/static_app/templates/jrails/jquery.js", "rails_generators/static_app/templates/jrails/jrails.js", "rails_generators/static_app/templates/layout.html.erb", "rails_generators/static_app/templates/layout_helper.rb", "rails_generators/static_app/templates/navigation_bar_bg.gif", "rails_generators/static_app/templates/plugins/jrails/CHANGELOG", "rails_generators/static_app/templates/plugins/jrails/init.rb", "rails_generators/static_app/templates/plugins/jrails/install.rb", "rails_generators/static_app/templates/plugins/jrails/javascripts/jquery-ui.js", "rails_generators/static_app/templates/plugins/jrails/javascripts/jquery.js", "rails_generators/static_app/templates/plugins/jrails/javascripts/jrails.js", "rails_generators/static_app/templates/plugins/jrails/javascripts/sources/jrails.js", "rails_generators/static_app/templates/plugins/jrails/lib/jrails.rb", "rails_generators/static_app/templates/plugins/jrails/README", "rails_generators/static_app/templates/plugins/jrails/tasks/jrails.rake", "rails_generators/static_app/templates/sorttable/sorttable.js", "rails_generators/static_app/templates/standard_banner.html.erb", "rails_generators/static_app/templates/standard_footer.html.erb", "rails_generators/static_app/templates/standard_header.html.erb", "rails_generators/static_app/templates/standard_navigation.html.erb", "rails_generators/static_app/templates/static_generator.rake", "rails_generators/static_app/templates/static_style.css", "rails_generators/static_app/templates/uni-form/jquery.js", "rails_generators/static_app/templates/uni-form/uni-form-generic.css", "rails_generators/static_app/templates/uni-form/uni-form.css", "rails_generators/static_app/templates/uni-form/uni-form.jquery.js", "rails_generators/static_app/USAGE", "rails_generators/static_authorization/static_authorization_generator.rb", "rails_generators/static_authorization/templates/migration.rb", "rails_generators/static_authorization/USAGE", "rails_generators/static_gen_specs/static_gen_specs_generator.rb", "rails_generators/static_gen_specs/templates/generator_specs.rb", "rails_generators/static_gen_specs/templates/model_gen_specs.rb", "rails_generators/static_gen_specs/USAGE", "rails_generators/static_scaffold/static_scaffold_generator.rb", "rails_generators/static_scaffold/templates/controller.rb", "rails_generators/static_scaffold/templates/fake_data.rake", "rails_generators/static_scaffold/templates/functional_test.rb", "rails_generators/static_scaffold/templates/helper.rb", "rails_generators/static_scaffold/templates/helper_test.rb", "rails_generators/static_scaffold/templates/layout.html.erb", "rails_generators/static_scaffold/templates/model.rb", "rails_generators/static_scaffold/templates/paperclip_tokens.rb", "rails_generators/static_scaffold/templates/view_edit.html.erb", "rails_generators/static_scaffold/templates/view_index.html.erb", "rails_generators/static_scaffold/templates/view_new.html.erb", "rails_generators/static_scaffold/templates/view_show.html.erb", "rails_generators/static_scaffold/USAGE", "Rakefile", "README.md", "tasks/deployment.rake", "TODO", "USAGE", "Manifest", "static-generators.gemspec"]
13
+ s.files = ["CHANGELOG", "lib/static_generators.rb", "LICENSE", "rails_generators/static_app/static_app_generator.rb", "rails_generators/static_app/templates/application_helper.rb", "rails_generators/static_app/templates/blueprint/AUTHORS.textile", "rails_generators/static_app/templates/blueprint/icons/cross.png", "rails_generators/static_app/templates/blueprint/icons/key.png", "rails_generators/static_app/templates/blueprint/icons/tick.png", "rails_generators/static_app/templates/blueprint/ie.css", "rails_generators/static_app/templates/blueprint/print.css", "rails_generators/static_app/templates/blueprint/README", "rails_generators/static_app/templates/blueprint/README.textile", "rails_generators/static_app/templates/blueprint/readme.txt", "rails_generators/static_app/templates/blueprint/screen.css", "rails_generators/static_app/templates/header_bg.png", "rails_generators/static_app/templates/icons/cross.png", "rails_generators/static_app/templates/icons/doc.png", "rails_generators/static_app/templates/icons/email.png", "rails_generators/static_app/templates/icons/external.png", "rails_generators/static_app/templates/icons/feed.png", "rails_generators/static_app/templates/icons/key.png", "rails_generators/static_app/templates/icons/pdf.png", "rails_generators/static_app/templates/icons/tick.png", "rails_generators/static_app/templates/icons/visited.png", "rails_generators/static_app/templates/icons/xls.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_flat_55_fbec88_40x100.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_glass_85_dfeffc_1x400.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_glass_95_fef1ec_1x400.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_217bc0_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_2e83ff_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_469bdd_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_6da8d5_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_cd0a0a_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_d8e7f3_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/images/ui-icons_f9bd01_256x240.png", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/css/redmond/jquery-ui-1.7.2.custom.css", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/index.html", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/js/jquery-1.3.2.min.js", "rails_generators/static_app/templates/jquery-ui-1.7.2.custom/js/jquery-ui-1.7.2.custom.min.js", "rails_generators/static_app/templates/jrails/jquery-ui.js", "rails_generators/static_app/templates/jrails/jquery.js", "rails_generators/static_app/templates/jrails/jrails.js", "rails_generators/static_app/templates/layout.html.erb", "rails_generators/static_app/templates/layout_helper.rb", "rails_generators/static_app/templates/navigation_bar_bg.gif", "rails_generators/static_app/templates/plugins/jrails/CHANGELOG", "rails_generators/static_app/templates/plugins/jrails/init.rb", "rails_generators/static_app/templates/plugins/jrails/install.rb", "rails_generators/static_app/templates/plugins/jrails/javascripts/jquery-ui.js", "rails_generators/static_app/templates/plugins/jrails/javascripts/jquery.js", "rails_generators/static_app/templates/plugins/jrails/javascripts/jrails.js", "rails_generators/static_app/templates/plugins/jrails/javascripts/sources/jrails.js", "rails_generators/static_app/templates/plugins/jrails/lib/jrails.rb", "rails_generators/static_app/templates/plugins/jrails/README", "rails_generators/static_app/templates/plugins/jrails/tasks/jrails.rake", "rails_generators/static_app/templates/sorttable/sorttable.js", "rails_generators/static_app/templates/standard_banner.html.erb", "rails_generators/static_app/templates/standard_footer.html.erb", "rails_generators/static_app/templates/standard_header.html.erb", "rails_generators/static_app/templates/standard_navigation.html.erb", "rails_generators/static_app/templates/static_generator.rake", "rails_generators/static_app/templates/static_style.css", "rails_generators/static_app/templates/uni-form/jquery.js", "rails_generators/static_app/templates/uni-form/uni-form-generic.css", "rails_generators/static_app/templates/uni-form/uni-form.css", "rails_generators/static_app/templates/uni-form/uni-form.jquery.js", "rails_generators/static_app/USAGE", "rails_generators/static_authorization/static_authorization_generator.rb", "rails_generators/static_authorization/templates/migration.rb", "rails_generators/static_authorization/USAGE", "rails_generators/static_gen_specs/static_gen_specs_generator.rb", "rails_generators/static_gen_specs/templates/generator_specs.rb", "rails_generators/static_gen_specs/templates/model_gen_specs.rb", "rails_generators/static_gen_specs/USAGE", "rails_generators/static_scaffold/static_scaffold_generator.rb", "rails_generators/static_scaffold/templates/controller.rb", "rails_generators/static_scaffold/templates/fake_data.rake", "rails_generators/static_scaffold/templates/functional_test.rb", "rails_generators/static_scaffold/templates/helper.rb", "rails_generators/static_scaffold/templates/helper_test.rb", "rails_generators/static_scaffold/templates/layout.html.erb", "rails_generators/static_scaffold/templates/model.rb", "rails_generators/static_scaffold/templates/paperclip_tokens.rb", "rails_generators/static_scaffold/templates/partial_work_area_entry_header.html.erb", "rails_generators/static_scaffold/templates/partial_work_area_index_header.html.erb", "rails_generators/static_scaffold/templates/view_edit.html.erb", "rails_generators/static_scaffold/templates/view_index.html.erb", "rails_generators/static_scaffold/templates/view_new.html.erb", "rails_generators/static_scaffold/templates/view_show.html.erb", "rails_generators/static_scaffold/USAGE", "Rakefile", "README.md", "tasks/deployment.rake", "TODO", "USAGE", "Manifest", "static-generators.gemspec"]
14
14
  s.has_rdoc = true
15
15
  s.homepage = %q{http://github.com/jrhicks/static-scaffolds}
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Static-generators", "--main", "README.md"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jrhicks-static-generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey Hicks
@@ -145,6 +145,8 @@ files:
145
145
  - rails_generators/static_scaffold/templates/layout.html.erb
146
146
  - rails_generators/static_scaffold/templates/model.rb
147
147
  - rails_generators/static_scaffold/templates/paperclip_tokens.rb
148
+ - rails_generators/static_scaffold/templates/partial_work_area_entry_header.html.erb
149
+ - rails_generators/static_scaffold/templates/partial_work_area_index_header.html.erb
148
150
  - rails_generators/static_scaffold/templates/view_edit.html.erb
149
151
  - rails_generators/static_scaffold/templates/view_index.html.erb
150
152
  - rails_generators/static_scaffold/templates/view_new.html.erb