beautiful_scaffold 2.0.0.pre → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5449d8a941dda266c1fd1277af6ab6ff75754c1393674443b4f94148881fe14
4
- data.tar.gz: 687cbd191d192abc632c070476585be443dc85388640a54cf505524bcc19cb27
3
+ metadata.gz: d1fe3aee750d2046a19d5f956820fb36e03a49ecac78cef8046d75e573e44e5e
4
+ data.tar.gz: aa521359c646d5171eeb3981f67ba5c7138ef9f422f2f88856e04280acc4b434
5
5
  SHA512:
6
- metadata.gz: cd6eb226ae5e30a72098b7992270bad5091e1abd9e444818f145bddff12a25f9619c51c19ea0ed9775e9d443cba75b2a3cd55154b26a4a44f7df349248742a69
7
- data.tar.gz: b74ecf56db7af523a9886ecdf35bfb9950d07276dee3e767ad32148c61d20ac55a9de1c0e9a74e60028c95ad488bf4d05cc6ace427c7e0ec4fc071c239227e31
6
+ metadata.gz: a3816f89d26548eccf73546dd698a3606f739bd1637e70fc53b19eaa27e7455ce61ea65a18fdc504ec8a8bea5f24dfd2d3bf6d030480c84f077e427d1481a447
7
+ data.tar.gz: 1256a2a3b5534405148fb3a0f9f2c3a404703e4ea2ff521887e8bb5f61c6937da8793a69fcfa8e4a584c131cd6af44c9d14c8bc8886b0daf97bfb54be4f98ebe
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
- test/dummy/log/test.log
1
+ test/dummy/log/test.log
2
+ Gemfile.lock
data/CHANGELOG CHANGED
@@ -4,6 +4,14 @@
4
4
 
5
5
  * bugfix
6
6
 
7
+ == 2.0.0
8
+
9
+ * enhancement
10
+ * Bootstrap 4.5 for search field.
11
+
12
+ * bugfix
13
+ * Beautiful migration & Rails 6 (fix #23)
14
+
7
15
  == 2.0.0.pre
8
16
 
9
17
  * enhancement
data/Rakefile CHANGED
@@ -16,11 +16,8 @@ end
16
16
 
17
17
  APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
18
18
  load 'rails/tasks/engine.rake'
19
-
20
19
  load 'rails/tasks/statistics.rake'
21
-
22
20
  require 'bundler/gem_tasks'
23
-
24
21
  require 'rake/testtask'
25
22
 
26
23
  Rake::TestTask.new(:test) do |t|
@@ -15,7 +15,5 @@ Gem::Specification.new do |s|
15
15
  s.files = `git ls-files`.split("\n").reject{ |filepath| filepath.start_with? 'test/' }
16
16
  s.licenses = ['MIT']
17
17
 
18
- s.rubyforge_project = "beautiful_scaffold"
19
-
20
18
  s.require_paths = ["lib","lib/generators","test/*"]
21
19
  end
@@ -1,3 +1,3 @@
1
1
  module BeautifulScaffold
2
- VERSION = '2.0.0.pre'
2
+ VERSION = '2.0.0'
3
3
  end
@@ -60,7 +60,9 @@ class BeautifulMigrationGenerator < Rails::Generators::Base
60
60
  private
61
61
 
62
62
  def model
63
- return name.scan(/^Add(.*)To(.*)$/).flatten[1].underscore.singularize.gsub("#{options[:mountable_engine].underscore}_",'')
63
+ model_extracted = name.scan(/^Add(.*)To(.*)$/).flatten[1].underscore.singularize
64
+ model_extracted = model_extracted.gsub("#{options[:mountable_engine].underscore}_",'') if !options[:mountable_engine].blank?
65
+ return model_extracted
64
66
  end
65
67
 
66
68
  end
@@ -145,7 +145,7 @@ class BeautifulScaffoldGenerator < Rails::Generators::Base
145
145
  manifest_prefix = ""
146
146
  end
147
147
  #append_to_file("app/assets/config/#{manifest_prefix}manifest.js", '//= link_directory ../stylesheets/faq .css')
148
- append_to_file("app/assets/config/#{manifest_prefix}manifest.js", '//= link_directory ../javascripts/faq .js')
148
+ append_to_file("app/assets/config/#{manifest_prefix}manifest.js", '//= link_directory ../javascripts .js')
149
149
  end
150
150
 
151
151
  def generate_layout
@@ -177,10 +177,12 @@ html, body {
177
177
  margin-bottom: 0px;
178
178
  margin-left: 20px;
179
179
  }
180
+ /*
180
181
  .search-and-filter .form-group label{
181
182
  margin-bottom: 0;
182
183
  margin-top: 5px;
183
184
  }
185
+ */
184
186
 
185
187
  /*
186
188
  div.filler.show-menu{
@@ -92,12 +92,15 @@ module BeautifulHelper
92
92
 
93
93
  cap = i18n_translate_path(model_name, attribute_name)
94
94
 
95
+ type_of_column = ar_model.columns_hash[attribute_name].type unless ar_model.columns_hash[attribute_name].nil?
96
+ type_of_column ||= :other
97
+
95
98
  infostr = ''
96
99
  response = '' # See at end
100
+ response += '<div class="form-check form-check-inline">' if type_of_column == :boolean
97
101
  response += f.label name_field, t(cap, :default => default_caption).capitalize, :class => "control-label"
102
+ response += '</div>' if type_of_column == :boolean
98
103
 
99
- type_of_column = ar_model.columns_hash[attribute_name].type unless ar_model.columns_hash[attribute_name].nil?
100
- type_of_column ||= :other
101
104
  case type_of_column
102
105
  when :date, :datetime
103
106
  dt = (type_of_column == :datetime)
@@ -178,9 +181,20 @@ module BeautifulHelper
178
181
  infostr = info_input(model_name, [(name_field + "_dp_lt").to_sym, (name_field + "_tp_lt").to_sym, (name_field + "_dp_gt").to_sym, (name_field + "_tp_gt").to_sym])
179
182
  when :boolean
180
183
  # Specify a default value (false) in rails migration
181
- response += f.label name_field + "_eq_true", raw(f.radio_button((name_field + "_eq").to_sym, true)) + " " + h(t(:yes, :default => "Yes")), :class => "checkbox inline"
182
- response += f.label name_field + "_eq_false", raw(f.radio_button((name_field + "_eq").to_sym, false)) + " " + h(t(:no, :default => "No")), :class => "checkbox inline"
183
- response += f.label name_field + "_eq", raw(f.radio_button((name_field + "_eq").to_sym, nil)) + " " + h(t(:all, :default => "All")), :class => "checkbox inline"
184
+ response += '<div class="form-check form-check-inline">'
185
+ response += f.radio_button((name_field + "_eq").to_sym, true, { class: 'form-check-input'})
186
+ response += f.label name_field + "_eq_true", h(t(:yes, default: "Yes")), class: "form-check-label"
187
+ response += '</div>'
188
+
189
+ response += '<div class="form-check form-check-inline">'
190
+ response += f.radio_button((name_field + "_eq").to_sym, false, { class: 'form-check-input'})
191
+ response += f.label name_field + "_eq_false", h(t(:no, default: "No")), class: "form-check-label"
192
+ response += '</div>'
193
+
194
+ response += '<div class="form-check form-check-inline">'
195
+ response += f.radio_button((name_field + "_eq").to_sym, nil, { class: 'form-check-input'})
196
+ response += f.label name_field + "_eq", h(t(:all, default: "All")), class: "form-check-label"
197
+ response += '</div>'
184
198
 
185
199
  infostr = (begin session['search'][model_name][(name_field + "_eq").to_sym] == "on" ? "" : "info" rescue "" end)
186
200
  when :string
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beautiful_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Claudel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-22 00:00:00.000000000 Z
11
+ date: 2020-12-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Beautiful Scaffold generate a complete scaffold (sort, export, paginate
14
14
  and filter data) http://beautiful-scaffold.rivsc.ovh
@@ -21,7 +21,6 @@ files:
21
21
  - ".gitignore"
22
22
  - CHANGELOG
23
23
  - Gemfile
24
- - Gemfile.lock
25
24
  - MIT-LICENSE
26
25
  - README.rdoc
27
26
  - Rakefile
@@ -118,9 +117,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
117
  version: '0'
119
118
  required_rubygems_version: !ruby/object:Gem::Requirement
120
119
  requirements:
121
- - - ">"
120
+ - - ">="
122
121
  - !ruby/object:Gem::Version
123
- version: 1.3.1
122
+ version: '0'
124
123
  requirements: []
125
124
  rubygems_version: 3.1.2
126
125
  signing_key:
@@ -1,209 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- beautiful_scaffold (1.0.3)
5
-
6
- GEM
7
- remote: http://rubygems.org/
8
- specs:
9
- actioncable (6.0.3.2)
10
- actionpack (= 6.0.3.2)
11
- nio4r (~> 2.0)
12
- websocket-driver (>= 0.6.1)
13
- actionmailbox (6.0.3.2)
14
- actionpack (= 6.0.3.2)
15
- activejob (= 6.0.3.2)
16
- activerecord (= 6.0.3.2)
17
- activestorage (= 6.0.3.2)
18
- activesupport (= 6.0.3.2)
19
- mail (>= 2.7.1)
20
- actionmailer (6.0.3.2)
21
- actionpack (= 6.0.3.2)
22
- actionview (= 6.0.3.2)
23
- activejob (= 6.0.3.2)
24
- mail (~> 2.5, >= 2.5.4)
25
- rails-dom-testing (~> 2.0)
26
- actionpack (6.0.3.2)
27
- actionview (= 6.0.3.2)
28
- activesupport (= 6.0.3.2)
29
- rack (~> 2.0, >= 2.0.8)
30
- rack-test (>= 0.6.3)
31
- rails-dom-testing (~> 2.0)
32
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
33
- actiontext (6.0.3.2)
34
- actionpack (= 6.0.3.2)
35
- activerecord (= 6.0.3.2)
36
- activestorage (= 6.0.3.2)
37
- activesupport (= 6.0.3.2)
38
- nokogiri (>= 1.8.5)
39
- actionview (6.0.3.2)
40
- activesupport (= 6.0.3.2)
41
- builder (~> 3.1)
42
- erubi (~> 1.4)
43
- rails-dom-testing (~> 2.0)
44
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
45
- activejob (6.0.3.2)
46
- activesupport (= 6.0.3.2)
47
- globalid (>= 0.3.6)
48
- activemodel (6.0.3.2)
49
- activesupport (= 6.0.3.2)
50
- activerecord (6.0.3.2)
51
- activemodel (= 6.0.3.2)
52
- activesupport (= 6.0.3.2)
53
- activestorage (6.0.3.2)
54
- actionpack (= 6.0.3.2)
55
- activejob (= 6.0.3.2)
56
- activerecord (= 6.0.3.2)
57
- marcel (~> 0.3.1)
58
- activesupport (6.0.3.2)
59
- concurrent-ruby (~> 1.0, >= 1.0.2)
60
- i18n (>= 0.7, < 2)
61
- minitest (~> 5.1)
62
- tzinfo (~> 1.1)
63
- zeitwerk (~> 2.2, >= 2.2.2)
64
- autoprefixer-rails (9.8.6.1)
65
- execjs
66
- bootstrap (4.3.1)
67
- autoprefixer-rails (>= 9.1.0)
68
- popper_js (>= 1.14.3, < 2)
69
- sassc-rails (>= 2.0.0)
70
- bootstrap4-datetime-picker-rails (0.3.1)
71
- jquery-rails (~> 4.2, >= 4.2.0)
72
- moment-timezone-rails (~> 1.0)
73
- momentjs-rails (>= 2.10.5, <= 3.0.0)
74
- builder (3.2.4)
75
- concurrent-ruby (1.1.7)
76
- crass (1.0.6)
77
- erubi (1.9.0)
78
- execjs (2.7.0)
79
- ffi (1.13.1)
80
- font-awesome-rails (4.7.0.5)
81
- railties (>= 3.2, < 6.1)
82
- globalid (0.4.2)
83
- activesupport (>= 4.2.0)
84
- i18n (1.8.5)
85
- concurrent-ruby (~> 1.0)
86
- jquery-rails (4.3.1)
87
- rails-dom-testing (>= 1, < 3)
88
- railties (>= 4.2.0)
89
- thor (>= 0.14, < 2.0)
90
- jquery-ui-rails (6.0.1)
91
- railties (>= 3.2.16)
92
- loofah (2.6.0)
93
- crass (~> 1.0.2)
94
- nokogiri (>= 1.5.9)
95
- mail (2.7.1)
96
- mini_mime (>= 0.1.1)
97
- marcel (0.3.3)
98
- mimemagic (~> 0.3.2)
99
- method_source (1.0.0)
100
- mimemagic (0.3.5)
101
- mini_mime (1.0.2)
102
- mini_portile2 (2.4.0)
103
- minitest (5.14.1)
104
- moment-timezone-rails (1.0.0)
105
- momentjs-rails (>= 2.10.5, <= 3.0.0)
106
- momentjs-rails (2.20.1)
107
- railties (>= 3.1)
108
- nio4r (2.5.2)
109
- nokogiri (1.10.10)
110
- mini_portile2 (~> 2.4.0)
111
- nokogumbo (2.0.2)
112
- nokogiri (~> 1.8, >= 1.8.4)
113
- pdf-core (0.8.1)
114
- polyamorous (2.3.2)
115
- activerecord (>= 5.2.1)
116
- popper_js (1.16.0)
117
- prawn (2.3.0)
118
- pdf-core (~> 0.8.1)
119
- ttfunk (~> 1.6)
120
- prawn-table (0.2.2)
121
- prawn (>= 1.3.0, < 3.0.0)
122
- rack (2.2.3)
123
- rack-test (1.1.0)
124
- rack (>= 1.0, < 3)
125
- rails (6.0.3.2)
126
- actioncable (= 6.0.3.2)
127
- actionmailbox (= 6.0.3.2)
128
- actionmailer (= 6.0.3.2)
129
- actionpack (= 6.0.3.2)
130
- actiontext (= 6.0.3.2)
131
- actionview (= 6.0.3.2)
132
- activejob (= 6.0.3.2)
133
- activemodel (= 6.0.3.2)
134
- activerecord (= 6.0.3.2)
135
- activestorage (= 6.0.3.2)
136
- activesupport (= 6.0.3.2)
137
- bundler (>= 1.3.0)
138
- railties (= 6.0.3.2)
139
- sprockets-rails (>= 2.0.0)
140
- rails-dom-testing (2.0.3)
141
- activesupport (>= 4.2.0)
142
- nokogiri (>= 1.6)
143
- rails-html-sanitizer (1.3.0)
144
- loofah (~> 2.3)
145
- railties (6.0.3.2)
146
- actionpack (= 6.0.3.2)
147
- activesupport (= 6.0.3.2)
148
- method_source
149
- rake (>= 0.8.7)
150
- thor (>= 0.20.3, < 2.0)
151
- rake (13.0.1)
152
- ransack (2.3.2)
153
- activerecord (>= 5.2.1)
154
- activesupport (>= 5.2.1)
155
- i18n
156
- polyamorous (= 2.3.2)
157
- sanitize (5.2.1)
158
- crass (~> 1.0.2)
159
- nokogiri (>= 1.8.0)
160
- nokogumbo (~> 2.0)
161
- sassc (2.4.0)
162
- ffi (~> 1.9)
163
- sassc-rails (2.1.2)
164
- railties (>= 4.0.0)
165
- sassc (>= 2.0)
166
- sprockets (> 3.0)
167
- sprockets-rails
168
- tilt
169
- sprockets (3.7.2)
170
- concurrent-ruby (~> 1.0)
171
- rack (> 1, < 3)
172
- sprockets-rails (3.2.1)
173
- actionpack (>= 4.0)
174
- activesupport (>= 4.0)
175
- sprockets (>= 3.0.0)
176
- sqlite3 (1.4.2)
177
- thor (0.20.3)
178
- thread_safe (0.3.6)
179
- tilt (2.0.10)
180
- ttfunk (1.6.2.1)
181
- tzinfo (1.2.7)
182
- thread_safe (~> 0.1)
183
- websocket-driver (0.7.3)
184
- websocket-extensions (>= 0.1.0)
185
- websocket-extensions (0.1.5)
186
- will_paginate (3.3.0)
187
- zeitwerk (2.4.0)
188
-
189
- PLATFORMS
190
- ruby
191
-
192
- DEPENDENCIES
193
- beautiful_scaffold!
194
- bootstrap (~> 4.3.1)
195
- bootstrap4-datetime-picker-rails
196
- font-awesome-rails (= 4.7.0.5)
197
- jquery-rails (= 4.3.1)
198
- jquery-ui-rails
199
- momentjs-rails (>= 2.9.0)
200
- prawn
201
- prawn-table
202
- rails (~> 6.0)
203
- ransack
204
- sanitize
205
- sqlite3
206
- will_paginate
207
-
208
- BUNDLED WITH
209
- 2.1.4