beautiful_scaffold 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +9 -0
- data/beautiful_scaffold.gemspec +1 -1
- data/lib/generators/beautiful_devisecancan_generator.rb +2 -2
- data/lib/generators/beautiful_locale_generator.rb +32 -19
- data/lib/generators/beautiful_scaffold_common_methods.rb +7 -4
- data/lib/generators/beautiful_scaffold_generator.rb +6 -2
- data/lib/generators/templates/app/assets/javascripts/application-bs.js +2 -8
- data/lib/generators/templates/app/assets/javascripts/beautiful_scaffold.js +11 -11
- data/lib/generators/templates/app/assets/javascripts/bootstrap-colorpicker.js +1 -1
- data/lib/generators/templates/app/assets/javascripts/bootstrap-datepicker.js +799 -799
- data/lib/generators/templates/app/assets/javascripts/bootstrap-datetimepicker-for-beautiful-scaffold.js +17 -15
- data/lib/generators/templates/app/assets/javascripts/bootstrap-timepicker.js +135 -131
- data/lib/generators/templates/app/assets/javascripts/bootstrap-wysihtml5.js +24 -16
- data/lib/generators/templates/app/assets/javascripts/fixed_menu.js +7 -7
- data/lib/generators/templates/app/assets/stylesheets/application-bs.css +1 -0
- data/lib/generators/templates/app/assets/stylesheets/beautiful-scaffold.css.scss +4 -4
- data/lib/generators/templates/app/assets/stylesheets/bootstrap_and_overrides.css.less +40 -0
- data/lib/generators/templates/app/assets/stylesheets/colorpicker.css +1 -1
- data/lib/generators/templates/app/assets/stylesheets/datepicker.css +2 -2
- data/lib/generators/templates/app/assets/stylesheets/timepicker.css +3 -6
- data/lib/generators/templates/app/controllers/base.rb +4 -4
- data/lib/generators/templates/app/controllers/master_base.rb +1 -1
- data/lib/generators/templates/app/helpers/beautiful_helper.rb +31 -33
- data/lib/generators/templates/app/initializers/link_renderer.rb +5 -5
- data/lib/generators/templates/app/views/_form.html.erb +2 -2
- data/lib/generators/templates/app/views/_form_habtm_tag.html.erb +2 -2
- data/lib/generators/templates/app/views/_mass_inserting.html.erb +6 -6
- data/lib/generators/templates/app/views/_modal_columns.html.erb +19 -15
- data/lib/generators/templates/app/views/edit.html.erb +1 -1
- data/lib/generators/templates/app/views/index.html.erb +36 -34
- data/lib/generators/templates/app/views/layout.html.erb +19 -28
- data/lib/generators/templates/app/views/new.html.erb +1 -1
- data/lib/generators/templates/app/views/partials/_forget_password.html.erb +21 -17
- data/lib/generators/templates/app/views/partials/_form_field.html.erb +40 -58
- data/lib/generators/templates/app/views/partials/_index_batch.html.erb +2 -2
- data/lib/generators/templates/app/views/partials/_index_column.html.erb +17 -17
- data/lib/generators/templates/app/views/partials/_index_header.html.erb +7 -7
- data/lib/generators/templates/app/views/partials/_index_search.html.erb +1 -1
- data/lib/generators/templates/app/views/partials/_index_search_default_fields.html.erb +1 -1
- data/lib/generators/templates/app/views/partials/_register_form.html.erb +38 -34
- data/lib/generators/templates/app/views/partials/_sign_in_form.html.erb +4 -4
- data/lib/generators/templates/app/views/show.html.erb +2 -2
- metadata +40 -20
@@ -1,6 +1,6 @@
|
|
1
1
|
<%- attributes.each{ |attribute| -%>
|
2
2
|
<%- if attribute.type.to_s == "boolean" then -%>
|
3
|
-
|
4
|
-
|
3
|
+
<option value="<%= attribute.name %>.true"><%%= t(:settrueforattr, :attr => "'<%= attribute.name %>'", :default => "Set <%= attribute.name %> to true") %></option>
|
4
|
+
<option value="<%= attribute.name %>.false"><%%= t(:setfalseforattr, :attr => "'<%= attribute.name %>'", :default => "Set <%= attribute.name %> to false") %></option>
|
5
5
|
<%- end -%>
|
6
6
|
<%- } -%>
|
@@ -1,19 +1,19 @@
|
|
1
1
|
<%- attributes.each do |attribute| -%>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
2
|
+
<td <%%= visible_column("<%= singular_table_name %>", "<%= attribute.name %>") %> class="bs-col-<%= attribute.name %> <%%= align_attribute("<%= attribute.type %>") %>">
|
3
|
+
<%- if @beautiful_attributes.include?(attribute.name + ':price') then -%>
|
4
|
+
<%%= number_to_currency(<%= singular_table_name %>.<%= attribute.name %>, :locale => I18n.locale) %>
|
5
|
+
<%- elsif @beautiful_attributes.include?(attribute.name + ':richtext') then -%>
|
6
|
+
<%%= truncate(<%= singular_table_name %>.<%= attribute.name + "_fulltext" %>, :length => 30) %>
|
7
|
+
<%- elsif @beautiful_attributes.include?(attribute.name + ':boolean') then -%>
|
8
|
+
<%%= t((<%= singular_table_name %>.<%= attribute.name %> ? "yes" : "no").to_sym) %>
|
9
|
+
<%- elsif @beautiful_attributes.include?(attribute.name + ':references') then -%>
|
10
|
+
<%% if not <%= singular_table_name %>.<%= attribute.name %>_id.nil? then %>
|
11
|
+
<%%= link_to <%= singular_table_name %>.<%= attribute.name %>.caption, <%= namespace_for_route %><%= attribute.name %>_path(<%= singular_table_name %>.<%= attribute.name %>_id) %>
|
12
|
+
<%% else %>
|
13
|
+
<%%= t(:any, :default => "Any") %>
|
14
|
+
<%% end %>
|
15
|
+
<%- else -%>
|
16
|
+
<%%= <%= singular_table_name %>.<%= attribute.name %> %>
|
17
|
+
<%- end -%>
|
18
|
+
</td>
|
19
19
|
<%- end -%>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<%- attributes.each do |attribute| -%>
|
2
|
-
<th <%%= visible_column("<%= singular_table_name %>", "<%= attribute.name %>") %> class="col-<%= attribute.name %>">
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
</th>
|
2
|
+
<th <%%= visible_column("<%= singular_table_name %>", "<%= attribute.name %>") %> class="bs-col-<%= attribute.name %>">
|
3
|
+
<%- id_or_not = "" -%>
|
4
|
+
<%- if @beautiful_attributes.include?(attribute.name + ':references') then -%>
|
5
|
+
<%- id_or_not = "_id" -%>
|
6
|
+
<%- end -%>
|
7
|
+
<%%= sorting_header("<%= singular_table_name %>", "<%= attribute.name %><%= id_or_not %>", "<%= namespace_alone %>") %>
|
8
|
+
</th>
|
9
9
|
<%- end -%>
|
@@ -7,5 +7,5 @@
|
|
7
7
|
<%- elsif @beautiful_attributes.include?(a.name + ':richtext') then -%>
|
8
8
|
<%- attribute = "_fulltext" -%>
|
9
9
|
<%- end -%>
|
10
|
-
|
10
|
+
<%%= ransack_field("<%= singular_table_name %>", "<%= a.name %><%= attribute %>", f, "<%= caption %>") %>
|
11
11
|
<%- end -%>
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<%- { :created_at => "Created At", :updated_at => "Updated At", :id => "Id" }.each{ |k,v| -%>
|
2
|
-
|
2
|
+
<%%= ransack_field("<%= singular_table_name %>", "<%= k.to_s %>", f, "<%= v %>") %>
|
3
3
|
<%- } -%>
|
@@ -1,40 +1,44 @@
|
|
1
1
|
|
2
|
-
<div class="modal
|
3
|
-
<div class="modal-
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<%% resource ||= <%= model.camelize %>.new %>
|
9
|
-
<%%= form_for(resource, :as => '<%= model %>', :url => registration_path('<%= model %>'), :html => { :class => "form-horizontal" }) do |f| %>
|
10
|
-
<%% begin %>
|
11
|
-
<%%= devise_error_messages! %>
|
12
|
-
<%% rescue %>
|
13
|
-
<%% end %>
|
14
|
-
<div class="control-group">
|
15
|
-
<%%= f.label :email, t(:email, :default => "Email"), :class => "control-label" %>
|
16
|
-
<div class="controls">
|
17
|
-
<%%= f.email_field :email %>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
<div class="control-group">
|
21
|
-
<%%= f.label :password, t(:password, :default => "Password"), :class => "control-label" %>
|
22
|
-
<div class="controls">
|
23
|
-
<%%= f.password_field :password %>
|
24
|
-
</div>
|
25
|
-
</div>
|
26
|
-
<div class="control-group">
|
27
|
-
<%%= f.label :password_confirmation, t(:password_confirmation, :default => "Password confirmation"), :class => "control-label" %>
|
28
|
-
<div class="controls">
|
29
|
-
<%%= f.password_field :password_confirmation %>
|
30
|
-
</div>
|
2
|
+
<div class="modal fade" id="modal-register-form">
|
3
|
+
<div class="modal-dialog">
|
4
|
+
<div class="modal-content">
|
5
|
+
<div class="modal-header">
|
6
|
+
<button type="button" class="close" data-dismiss="modal">×</button>
|
7
|
+
<h3><%%= t(:register, :default => "Register") %></h3>
|
31
8
|
</div>
|
9
|
+
<div class="modal-body">
|
10
|
+
<%% resource ||= <%= model.camelize %>.new %>
|
11
|
+
<%%= form_for(resource, :as => '<%= model %>', :url => registration_path('<%= model %>'), :html => { :class => "form-horizontal" }) do |f| %>
|
12
|
+
<%% begin %>
|
13
|
+
<%%= devise_error_messages! %>
|
14
|
+
<%% rescue %>
|
15
|
+
<%% end %>
|
16
|
+
<div class="form-group">
|
17
|
+
<%%= f.label :email, t(:email, :default => "Email"), :class => "control-label" %>
|
18
|
+
<div>
|
19
|
+
<%%= f.email_field :email %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<div class="form-group">
|
23
|
+
<%%= f.label :password, t(:password, :default => "Password"), :class => "control-label" %>
|
24
|
+
<div>
|
25
|
+
<%%= f.password_field :password %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
<div class="form-group">
|
29
|
+
<%%= f.label :password_confirmation, t(:password_confirmation, :default => "Password confirmation"), :class => "control-label" %>
|
30
|
+
<div>
|
31
|
+
<%%= f.password_field :password_confirmation %>
|
32
|
+
</div>
|
33
|
+
</div>
|
32
34
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
35
|
+
<div class="form-group">
|
36
|
+
<div>
|
37
|
+
<%%= f.submit t(:sign_up, :default => "Sign up"), :class => 'btn btn-default' %>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
<%% end %>
|
37
41
|
</div>
|
38
|
-
|
42
|
+
</div>
|
39
43
|
</div>
|
40
44
|
</div>
|
@@ -1,17 +1,17 @@
|
|
1
1
|
<div style="padding:10px;">
|
2
2
|
<%%= form_for("<%= model %>", :url => <%= model %>_session_path, :html => { :class => "form-horizontal" }) do |f| %>
|
3
|
-
<div class="
|
3
|
+
<div class="form-group">
|
4
4
|
<%%= f.text_field :email, :placeholder => t(:email, :default => "Email") %>
|
5
5
|
</div>
|
6
|
-
<div class="
|
6
|
+
<div class="form-group">
|
7
7
|
<%%= f.password_field :password, :placeholder => t(:password, :default => "Password") %>
|
8
8
|
</div>
|
9
|
-
<div class="
|
9
|
+
<div class="form-group">
|
10
10
|
<label for="<%= model %>_remember_me">
|
11
11
|
<%%= f.check_box :remember_me %> <%%= t(:remember_me, :default => "Remember me") %>
|
12
12
|
</label>
|
13
13
|
</div>
|
14
|
-
<%%= f.submit t(:sign_in, :default => "Sign in"), :class => "btn" %>
|
14
|
+
<%%= f.submit t(:sign_in, :default => "Sign in"), :class => "btn btn-default" %>
|
15
15
|
<%% end %>
|
16
16
|
<a data-toggle="modal" href="#modal-forget-password"><%%= t(:forgot_your_password, :default => "Forgot your password?") %></a>
|
17
17
|
<a data-toggle="modal" href="#modal-register-form"><%%= t(:register, :default => "Register") %></a>
|
@@ -3,6 +3,6 @@
|
|
3
3
|
<%= render_partial 'app/views/partials/_show_field.html.erb' %>
|
4
4
|
<!-- Beautiful_scaffold - AddField - Field - Do not remove -->
|
5
5
|
|
6
|
-
<%%= link_to t(:edit, :default => "Edit"), edit_<%= namespace_for_route %><%= singular_table_name %>_path(@<%= singular_table_name %>), :class => "btn" %>
|
7
|
-
<%%= link_to t(:back, :default => "Back"), <%= namespace_for_route %><%= plural_table_name %>_path, :class => "btn" %>
|
6
|
+
<%%= link_to t(:edit, :default => "Edit"), edit_<%= namespace_for_route %><%= singular_table_name %>_path(@<%= singular_table_name %>), :class => "btn btn-default" %>
|
7
|
+
<%%= link_to t(:back, :default => "Back"), <%= namespace_for_route %><%= plural_table_name %>_path, :class => "btn btn-default" %>
|
8
8
|
|
metadata
CHANGED
@@ -1,23 +1,32 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: beautiful_scaffold
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 4
|
10
|
+
version: 0.3.4
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Sylvain Claudel
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
17
|
+
|
18
|
+
date: 2014-10-22 00:00:00 Z
|
13
19
|
dependencies: []
|
14
|
-
|
15
|
-
|
20
|
+
|
21
|
+
description: Beautiful Scaffold generate a complete scaffold (sort, export, paginate and filter data) http://www.beautiful-scaffold.com
|
16
22
|
email: claudel.sylvain@gmail.com
|
17
23
|
executables: []
|
24
|
+
|
18
25
|
extensions: []
|
26
|
+
|
19
27
|
extra_rdoc_files: []
|
20
|
-
|
28
|
+
|
29
|
+
files:
|
21
30
|
- CHANGELOG
|
22
31
|
- Gemfile
|
23
32
|
- MIT-LICENSE
|
@@ -52,6 +61,7 @@ files:
|
|
52
61
|
- lib/generators/templates/app/assets/stylesheets/application-bs.css
|
53
62
|
- lib/generators/templates/app/assets/stylesheets/beautiful-scaffold.css.scss
|
54
63
|
- lib/generators/templates/app/assets/stylesheets/bootstrap-wysihtml5.css
|
64
|
+
- lib/generators/templates/app/assets/stylesheets/bootstrap_and_overrides.css.less
|
55
65
|
- lib/generators/templates/app/assets/stylesheets/colorpicker.css
|
56
66
|
- lib/generators/templates/app/assets/stylesheets/datepicker.css
|
57
67
|
- lib/generators/templates/app/assets/stylesheets/reset.css
|
@@ -226,27 +236,37 @@ files:
|
|
226
236
|
- lib/generators/templates/modules/beautiful_scaffold_module.rb
|
227
237
|
homepage: http://beautiful-scaffold.com
|
228
238
|
licenses: []
|
239
|
+
|
229
240
|
post_install_message:
|
230
241
|
rdoc_options: []
|
231
|
-
|
242
|
+
|
243
|
+
require_paths:
|
232
244
|
- lib
|
233
245
|
- lib/generators
|
234
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
246
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
235
247
|
none: false
|
236
|
-
requirements:
|
237
|
-
- -
|
238
|
-
- !ruby/object:Gem::Version
|
239
|
-
|
240
|
-
|
248
|
+
requirements:
|
249
|
+
- - ">="
|
250
|
+
- !ruby/object:Gem::Version
|
251
|
+
hash: 3
|
252
|
+
segments:
|
253
|
+
- 0
|
254
|
+
version: "0"
|
255
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
241
256
|
none: false
|
242
|
-
requirements:
|
243
|
-
- -
|
244
|
-
- !ruby/object:Gem::Version
|
245
|
-
|
257
|
+
requirements:
|
258
|
+
- - ">="
|
259
|
+
- !ruby/object:Gem::Version
|
260
|
+
hash: 3
|
261
|
+
segments:
|
262
|
+
- 0
|
263
|
+
version: "0"
|
246
264
|
requirements: []
|
265
|
+
|
247
266
|
rubyforge_project: beautiful_scaffold
|
248
|
-
rubygems_version: 1.8.
|
267
|
+
rubygems_version: 1.8.24
|
249
268
|
signing_key:
|
250
269
|
specification_version: 3
|
251
270
|
summary: Beautiful Scaffold generate fully customizable scaffold
|
252
271
|
test_files: []
|
272
|
+
|