slash_admin 1.5.7 → 1.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/slash_admin/application.scss +6 -0
- data/app/controllers/slash_admin/models_controller.rb +5 -1
- data/app/views/slash_admin/base/_data_list.html.erb +14 -3
- data/config/locales/en.yml +1 -1
- data/config/locales/fr.yml +1 -1
- data/lib/slash_admin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eab3ae290969bd0aafca3d62534ad33addd33964b3d0a86252a3e1b572899a61
|
4
|
+
data.tar.gz: 11dc8b152fe0ae371a9455368d093053830b5022aca93e81e219241994198ad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1270c0a3a732ccd0e5700defcfc5bb1be81987014e3a3b8329bbb8ce2d5220b9eb1403d195851d246961b31d7cb21e98b84964b6fdbbf35986a33203b585158
|
7
|
+
data.tar.gz: 9cf8b935b5d76c57eff1ccebbce9623748efff7cc703663c1e47dbcc1e623792222bbc7c775133f5a56788bea8e0d18718e588dcde153b40e72b07bc7338b73e
|
@@ -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, :no_title
|
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, :icons
|
15
15
|
|
16
16
|
def index
|
17
17
|
authorize! :index, @model_class
|
@@ -161,6 +161,10 @@ module SlashAdmin
|
|
161
161
|
[]
|
162
162
|
end
|
163
163
|
|
164
|
+
def icons
|
165
|
+
{}
|
166
|
+
end
|
167
|
+
|
164
168
|
def handle_has_one
|
165
169
|
@has_one = {}
|
166
170
|
Array.wrap(update_params + create_params).uniq.each do |p|
|
@@ -101,15 +101,26 @@
|
|
101
101
|
<% elsif @has_many_fields.include?(attr) %>
|
102
102
|
<td class="<%= attr.to_s.parameterize.underscore.downcase %>">
|
103
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.
|
104
|
+
data-toggle="tooltip" data-placement="top" title="<%= t("slash_admin.view.see_model_of", model: attr.to_s.pluralize, of: m.name) %>"
|
105
105
|
>
|
106
|
-
<
|
106
|
+
<span class="list-icon">
|
107
|
+
<i class="fas fa-ellipsis-v"></i>
|
108
|
+
<% if icons.key? attr %>
|
109
|
+
<%= raw icons[attr.to_sym] %>
|
110
|
+
<% else %>
|
111
|
+
<%= attr.to_s.first.upcase %>
|
112
|
+
<% end %>
|
113
|
+
</span>
|
107
114
|
</button>
|
108
115
|
<div class="modal fade" id="modal-see-assoc-<%= attr.to_s %>-<%= m.id %>" tabindex="-1" role="dialog" aria-labelledby="modal" aria-hidden="true">
|
109
116
|
<div class="modal-dialog" role="document">
|
110
117
|
<div class="modal-content">
|
111
118
|
<div class="modal-header">
|
112
|
-
<h5 class="modal-title" id="exampleModalLabel"
|
119
|
+
<h5 class="modal-title" id="exampleModalLabel">
|
120
|
+
<% if icons.key? attr %>
|
121
|
+
<%= raw icons[attr.to_sym] %>
|
122
|
+
<% end %>
|
123
|
+
<%= t("model.#{attr}") %>
|
113
124
|
<strong>(<%= m.send(attr).length %>)</strong></h5>
|
114
125
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
115
126
|
<span aria-hidden="true">×</span>
|
data/config/locales/en.yml
CHANGED
data/config/locales/fr.yml
CHANGED
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: 1.5.
|
4
|
+
version: 1.5.8
|
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-04-
|
11
|
+
date: 2021-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|