beautiful_scaffold 0.1.3 → 0.1.4

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.
@@ -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.3"
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", "app/views/layouts/_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
- myroute = ""
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?