slash_admin 1.4 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/assets/stylesheets/slash_admin/application.scss +11 -15
- data/app/controllers/slash_admin/models_controller.rb +2 -2
- data/app/views/slash_admin/base/_data_list.html.erb +3 -1
- data/app/views/slash_admin/base/_wysiwyg.html.erb +1 -0
- data/lib/generators/slash_admin/install/install_generator.rb +1 -1
- data/lib/slash_admin/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11e65af2390efad19838b6a296c332d2390f7db2cc19d5e7fb3b194a20764e02
|
4
|
+
data.tar.gz: 6b8d9aeb8534270f7edf23f56a13d8284ed791d3fc08a85a5577adada253e075
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3198056fa8a35ae1d9e0005d86b44ef6e382675b63073deeb7974862a73b100cdeadef0ab6cd0f8f7ccf150c11ea0a38e95a42c149f41626393ba318144f33cf
|
7
|
+
data.tar.gz: e7e82ddba2244e1ca4c65d6f39cf8627793182bf36b709adae59f7b385364eeeeed4bee13d1fe2dade6b0edb295bdc1c03181921bae6c6449df84d42bc2da1f7
|
data/README.md
CHANGED
@@ -86,8 +86,8 @@ If your apps uses Sprockets 4+, you'll need to add SlashAdmin assets to your `ma
|
|
86
86
|
`app/assets/config/manifest.js`
|
87
87
|
|
88
88
|
```
|
89
|
-
//= link
|
90
|
-
//= link
|
89
|
+
//= link slash_admin/application.css
|
90
|
+
//= link slash_admin/application.js
|
91
91
|
```
|
92
92
|
|
93
93
|
`config/routes.rb`
|
@@ -91,7 +91,7 @@ p[data-f-id="pbf"] {
|
|
91
91
|
margin: 0;
|
92
92
|
|
93
93
|
label.form-control-label {
|
94
|
-
display: block;
|
94
|
+
display: inline-block;
|
95
95
|
font-weight: 600;
|
96
96
|
}
|
97
97
|
|
@@ -266,20 +266,6 @@ p[data-f-id="pbf"] {
|
|
266
266
|
}
|
267
267
|
}
|
268
268
|
|
269
|
-
.field_with_errors {
|
270
|
-
label {
|
271
|
-
color: $red;
|
272
|
-
}
|
273
|
-
|
274
|
-
input {
|
275
|
-
border-color: $red !important;
|
276
|
-
}
|
277
|
-
|
278
|
-
& + .form-control-feedback {
|
279
|
-
color: $red;
|
280
|
-
}
|
281
|
-
}
|
282
|
-
|
283
269
|
.block-language {
|
284
270
|
display: block;
|
285
271
|
margin: 15px 0;
|
@@ -436,6 +422,16 @@ p[data-f-id="pbf"] {
|
|
436
422
|
color: $primary;
|
437
423
|
}
|
438
424
|
|
425
|
+
.has-danger {
|
426
|
+
.form-control, input, select, textarea {
|
427
|
+
border-color: $error !important;
|
428
|
+
}
|
429
|
+
|
430
|
+
label, .form-control-feedback {
|
431
|
+
color: $error !important;
|
432
|
+
}
|
433
|
+
}
|
434
|
+
|
439
435
|
.scroll-to-top {
|
440
436
|
text-align: center;
|
441
437
|
position: fixed;
|
@@ -9,7 +9,7 @@ module SlashAdmin
|
|
9
9
|
before_action :handle_default
|
10
10
|
before_action :nestable_config
|
11
11
|
before_action :handle_default_params
|
12
|
-
before_action :
|
12
|
+
before_action :handle_associations
|
13
13
|
|
14
14
|
helper_method :list_params, :export_params, :create_params, :update_params, :show_params, :nested_params, :should_add_translatable?, :translatable_params, :available_locales, :tooltips
|
15
15
|
|
@@ -406,7 +406,7 @@ module SlashAdmin
|
|
406
406
|
SlashAdmin.configuration.available_locales
|
407
407
|
end
|
408
408
|
|
409
|
-
def
|
409
|
+
def handle_associations
|
410
410
|
@belongs_to_fields = @model_class.reflect_on_all_associations(:belongs_to).map(&:name)
|
411
411
|
@has_many_fields = @model_class.reflect_on_all_associations(:has_many).map(&:name)
|
412
412
|
@has_one_fields = @model_class.reflect_on_all_associations(:has_one).map(&:name)
|
@@ -75,7 +75,9 @@
|
|
75
75
|
<% end %>
|
76
76
|
</td>
|
77
77
|
<% else %>
|
78
|
-
<td class="<%= attr.to_s.parameterize.underscore.downcase %>"
|
78
|
+
<td class="<%= attr.to_s.parameterize.underscore.downcase %>">
|
79
|
+
<%= render attr[attr.keys.first][:type].to_s, model: m, attr: attr.keys.first %>
|
80
|
+
</td>
|
79
81
|
<% end %>
|
80
82
|
<% else %>
|
81
83
|
<% if m.send(attr).is_a?(TrueClass) || m.send(attr).is_a?(FalseClass) %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= truncate(strip_tags(model.send(attr)), length: 50) %>
|
data/lib/slash_admin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slash_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KOVACS Nicolas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -342,6 +342,7 @@ files:
|
|
342
342
|
- app/views/slash_admin/base/_data_show.html.erb
|
343
343
|
- app/views/slash_admin/base/_filters.html.erb
|
344
344
|
- app/views/slash_admin/base/_translatable_fields.html.erb
|
345
|
+
- app/views/slash_admin/base/_wysiwyg.html.erb
|
345
346
|
- app/views/slash_admin/base/edit.html.erb
|
346
347
|
- app/views/slash_admin/base/index.html.erb
|
347
348
|
- app/views/slash_admin/base/index.xls.erb
|