beautiful_scaffold 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/beautiful_scaffold.gemspec +1 -1
- data/lib/generators/beautiful_scaffold_generator.rb +13 -3
- data/lib/generators/templates/app/assets/javascripts/bootstrap-datepicker.js +834 -0
- data/lib/generators/templates/app/assets/javascripts/bootstrap-datetimepicker-for-beautiful-scaffold.js +28 -0
- data/lib/generators/templates/app/assets/javascripts/bootstrap-timepicker.js +793 -0
- data/lib/generators/templates/app/assets/javascripts/jquery.livequery.js +226 -0
- data/lib/generators/templates/app/assets/stylesheets/datepicker.css +224 -0
- data/lib/generators/templates/app/assets/stylesheets/timepicker.css +92 -0
- data/lib/generators/templates/app/controllers/base.rb +14 -2
- data/lib/generators/templates/app/helpers/beautiful_helper.rb +38 -7
- data/lib/generators/templates/app/views/_form.html.erb +1 -1
- data/lib/generators/templates/app/views/_mass_inserting.html.erb +41 -0
- data/lib/generators/templates/app/views/_modal_columns.html.erb +4 -0
- data/lib/generators/templates/app/views/index.html.erb +16 -2
- data/lib/generators/templates/app/views/layout.html.erb +13 -5
- data/lib/generators/templates/app/views/partials/_form_field.html.erb +29 -0
- data/lib/generators/templates/app/views/partials/_index_column.html.erb +6 -6
- metadata +9 -2
data/beautiful_scaffold.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "beautiful_scaffold"
|
6
|
-
s.version = "0.1.
|
6
|
+
s.version = "0.1.4"
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.summary = "Beautiful Scaffold generate fully customizable scaffold"
|
9
9
|
s.email = "claudel.sylvain@gmail.com"
|
@@ -52,6 +52,8 @@ class BeautifulScaffoldGenerator < Rails::Generators::Base
|
|
52
52
|
"#{stylesheetspath}bootstrap.min.css",
|
53
53
|
"#{stylesheetspath}bootstrap-responsive.css",
|
54
54
|
"#{stylesheetspath}bootstrap-responsive.min.css",
|
55
|
+
"#{stylesheetspath}datepicker.css",
|
56
|
+
"#{stylesheetspath}timepicker.css",
|
55
57
|
"#{stylesheetspath}beautiful-scaffold.css.scss"
|
56
58
|
]
|
57
59
|
|
@@ -65,7 +67,11 @@ class BeautifulScaffoldGenerator < Rails::Generators::Base
|
|
65
67
|
"#{javascriptspath}bootstrap-alert.js",
|
66
68
|
"#{javascriptspath}bootstrap-dropdown.js",
|
67
69
|
"#{javascriptspath}bootstrap-modal.js",
|
68
|
-
"#{javascriptspath}bootstrap-tooltip.js"
|
70
|
+
"#{javascriptspath}bootstrap-tooltip.js",
|
71
|
+
"#{javascriptspath}bootstrap-datepicker.js",
|
72
|
+
"#{javascriptspath}bootstrap-datetimepicker-for-beautiful-scaffold.js",
|
73
|
+
"#{javascriptspath}bootstrap-timepicker.js",
|
74
|
+
"#{javascriptspath}jquery.livequery.js"
|
69
75
|
]
|
70
76
|
pjax_js = "#{javascriptspath}jquery.pjax.js"
|
71
77
|
|
@@ -86,7 +92,8 @@ class BeautifulScaffoldGenerator < Rails::Generators::Base
|
|
86
92
|
|
87
93
|
empty_directory "app/views/beautiful"
|
88
94
|
template "app/views/dashboard.html.erb", "app/views/beautiful/dashboard.html.erb"
|
89
|
-
copy_file "app/views/_modal_columns.html.erb",
|
95
|
+
copy_file "app/views/_modal_columns.html.erb", "app/views/layouts/_modal_columns.html.erb"
|
96
|
+
copy_file "app/views/_mass_inserting.html.erb", "app/views/layouts/_mass_inserting.html.erb"
|
90
97
|
|
91
98
|
inject_into_file("app/views/layouts/_beautiful_menu.html.erb",'
|
92
99
|
<li class="<%= "active" if params[:controller] == "' + namespace_for_url + model.pluralize + '" %>">
|
@@ -195,7 +202,10 @@ class BeautifulScaffoldGenerator < Rails::Generators::Base
|
|
195
202
|
route(myroute)
|
196
203
|
end
|
197
204
|
|
198
|
-
|
205
|
+
search_namespace = namespace_alone + "/" if not namespace_alone.blank?
|
206
|
+
search_namespace ||= ""
|
207
|
+
|
208
|
+
myroute = 'match "' + search_namespace + model_pluralize + '/search_and_filter" => "' + search_namespace + model_pluralize + '#index", :via => [:get, :post], :as => :' + namespace_for_route + 'search_' + model_pluralize + "\n "
|
199
209
|
myroute += "namespace :#{namespace_alone} do\n " if not namespace_alone.blank?
|
200
210
|
myroute += "resources :#{model_pluralize} do\n collection do\n post :batch\n end\n end\n"
|
201
211
|
myroute += "end\n" if not namespace_alone.blank?
|