slash_admin 1.5.6 → 1.5.7

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: 75a4d10e9ae3f3459f4f84a212d4cd959af543dfe9313daa264b860f057f93ad
4
- data.tar.gz: 220d6763eea19e9eea0b556b092305d7e27b1cc25d075612df92888383f225e7
3
+ metadata.gz: 905087476b4fe1a2cefd7cba21a3214fcf4834cb4fed1f1c5ccf00570fb246af
4
+ data.tar.gz: 5d29e7eb6d2ee39960526c5a85f033b34aa7549c3b38e53db84d137778ac1993
5
5
  SHA512:
6
- metadata.gz: 68e65e9c493da98d401df31ff689bb752d67d2d4343083473b988ae5a228dbc03969778807e3199de72eb5f5d23c55f8934771020a447b18bc33feafdd424524
7
- data.tar.gz: 93556b4c7d5e7078698f1cf30cab0ed0ac8900a5f6bf0d83570244c1c45eebcc814bbeacc5e79473416096018b137ebe63c037682f1ab69b847c9fc9a6a49894
6
+ metadata.gz: 0aafd6dfba8ff8d7a46059b7a37380d8ef8b16df1b5fa6b7659942259ea99f0114e2f6e855857a92b7f50b4cea5763c6aec1a7a6913cf5fbb763e7e8ed0ca801
7
+ data.tar.gz: 32ef3759aa3558806282585bc470fbbcaf9dacdc9677a6710d0b96554c87f208380ba45b6335b0a68f89937dd68e99df4bd5d600ffc910378d47f7452b5470e3
@@ -11,7 +11,7 @@ module SlashAdmin
11
11
  before_action :handle_default_params
12
12
  before_action :handle_associations
13
13
 
14
- helper_method :list_params, :export_params, :create_params, :update_params, :show_params, :nested_params, :should_add_translatable?, :translatable_params, :available_locales, :tooltips
14
+ helper_method :list_params, :export_params, :create_params, :update_params, :show_params, :nested_params, :should_add_translatable?, :translatable_params, :available_locales, :tooltips, :no_title
15
15
 
16
16
  def index
17
17
  authorize! :index, @model_class
@@ -157,6 +157,10 @@ module SlashAdmin
157
157
  {}
158
158
  end
159
159
 
160
+ def no_title
161
+ []
162
+ end
163
+
160
164
  def handle_has_one
161
165
  @has_one = {}
162
166
  Array.wrap(update_params + create_params).uniq.each do |p|
@@ -28,13 +28,20 @@
28
28
  </th>
29
29
  <% list_params.each do |attr| %>
30
30
  <% if attr.is_a?(Hash) %>
31
- <th>
32
- <%= @model_class.human_attribute_name(attr.keys.first) %>
33
- <% if tooltips.key? attr.keys.first %>
34
- <a href="#" data-toggle="tooltip" data-placement="top" title="<%= tooltips[attr.keys.first] %>"><i class="fas fa-question-circle"></i></a>
35
- <% end %>
36
- </th>
31
+ <% if no_title.include? attr.keys.first %>
32
+ <th></th>
33
+ <% else %>
34
+ <th>
35
+ <%= @model_class.human_attribute_name(attr.keys.first) %>
36
+ <% if tooltips.key? attr.keys.first %>
37
+ <a href="#" data-toggle="tooltip" data-placement="top" title="<%= tooltips[attr.keys.first] %>"><i class="fas fa-question-circle"></i></a>
38
+ <% end %>
39
+ </th>
40
+ <% end %>
37
41
  <% else %>
42
+ <% if no_title.include? attr %>
43
+ <th></th>
44
+ <% else %>
38
45
  <th
39
46
  <% if orderable?(@model_class, attr) %>
40
47
  data-order-field="<%= attr %>"
@@ -50,6 +57,7 @@
50
57
  <a href="#" data-toggle="tooltip" data-placement="top" title="<%= tooltips[attr] %>"><i class="fas fa-question-circle"></i></a>
51
58
  <% end %>
52
59
  </th>
60
+ <% end %>
53
61
  <% end %>
54
62
  <% end %>
55
63
  <th class="text-center"><%= t('slash_admin.view.actions') %></th>
@@ -92,8 +100,10 @@
92
100
  </td>
93
101
  <% elsif @has_many_fields.include?(attr) %>
94
102
  <td class="<%= attr.to_s.parameterize.underscore.downcase %>">
95
- <button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modal-see-assoc-<%= attr.to_s %>-<%= m.id %>">
96
- <i class="fa fa-list"></i> <%= t('slash_admin.view.see') %>
103
+ <button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modal-see-assoc-<%= attr.to_s %>-<%= m.id %>"
104
+ data-toggle="tooltip" data-placement="top" title="<%= t("slash_admin.view.see_model", model: attr.to_s.pluralize) %>"
105
+ >
106
+ <i class="fa fa-list"></i>
97
107
  </button>
98
108
  <div class="modal fade" id="modal-see-assoc-<%= attr.to_s %>-<%= m.id %>" tabindex="-1" role="dialog" aria-labelledby="modal" aria-hidden="true">
99
109
  <div class="modal-dialog" role="document">
@@ -26,6 +26,7 @@ en:
26
26
  save: Save
27
27
  delete: Delete
28
28
  new: New
29
+ see_model: "View the %{model}"
29
30
  edit: "Edit: %{model_name}"
30
31
  show: "Show: %{model_name}"
31
32
  tools: Tools
@@ -29,6 +29,7 @@ fr:
29
29
  edit: "Édition: %{model_name}"
30
30
  show: "Affichage: %{model_name}"
31
31
  see: Voir
32
+ see_model: "Voir les %{model}"
32
33
  tools: Outils
33
34
  order: Trier
34
35
  erase: Effacer
@@ -1,3 +1,3 @@
1
1
  module SlashAdmin
2
- VERSION = "1.5.6"
2
+ VERSION = "1.5.7"
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.5.6
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - KOVACS Nicolas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-13 00:00:00.000000000 Z
11
+ date: 2021-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -457,7 +457,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
457
457
  - !ruby/object:Gem::Version
458
458
  version: '0'
459
459
  requirements: []
460
- rubygems_version: 3.1.4
460
+ rubygems_version: 3.2.16
461
461
  signing_key:
462
462
  specification_version: 4
463
463
  summary: A modern and overridable admin gem, just the rails way.