slash_admin 1.4 → 1.4.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa8f3a52be4da9f7ddc2f3a4888ed7affa7a49aeeeecca3b54b6413d92fad5f5
4
- data.tar.gz: 10bda4bc75d87a697aedb1d5f8ee48d0f5203892aeebb9d7d985a2dc8a509897
3
+ metadata.gz: 11e65af2390efad19838b6a296c332d2390f7db2cc19d5e7fb3b194a20764e02
4
+ data.tar.gz: 6b8d9aeb8534270f7edf23f56a13d8284ed791d3fc08a85a5577adada253e075
5
5
  SHA512:
6
- metadata.gz: a057c62b96bc937e332365d5b1277e598f4839af757ca616000e5f06da51a1c043087ab4ed20e18b1071f1881c2639306c0c319a74d8ba5c7a9df2e152e229ff
7
- data.tar.gz: 054aee793717a4df3bcb2aeccc26fea5e21286e7a1e2bd25d5a3e97b0be11b1962356f380bfa7e7a7342066f51a7001ba22cc10b54c43a912cc6fcb3e33fd8a7
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 administrate/application.css
90
- //= link administrate/application.js
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 :handle_assocations
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 handle_assocations
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 %>"><%= render attr.keys.first.to_s, model: m %></td>
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) %>
@@ -8,7 +8,7 @@ module SlashAdmin
8
8
  def install
9
9
  template "install.erb",
10
10
  "app/helpers/slash_admin/menu_helper.rb"
11
- template "initializer.erb",
11
+ template "initializer.rb",
12
12
  "config/initializers/slash_admin.rb"
13
13
  end
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module SlashAdmin
2
- VERSION = "1.4"
2
+ VERSION = "1.4.1"
3
3
  end
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: '1.4'
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-18 00:00:00.000000000 Z
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