avo 4.0.21 → 4.0.22
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 +4 -4
- data/Gemfile.lock +63 -63
- data/app/components/avo/views/resource_index_component.html.erb +1 -1
- data/app/components/avo/views/resource_index_component.rb +6 -3
- data/lib/avo/resources/controls/attach_button.rb +3 -1
- data/lib/avo/resources/controls/create_button.rb +5 -1
- data/lib/avo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 422c348286228efd4d264cfa65d12ec2b41f0a1ae0ec050f78266d5a3858116c
|
|
4
|
+
data.tar.gz: d700e16bdebf59a0bfb6f05d4284789c97e4cb7218a91ba0dc0a12950f25648f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 41237f13419dfc4c6849f9292d451d5957060aee7677cd9e36c0ab583d159747841ec2fc7aa645e65bc0f2e6d788994d7418987dda13084dc24e2ab29037abd7
|
|
7
|
+
data.tar.gz: 1c142c6228b3c17ff7f522c83aade146a8226148060e765eb12eea9c8e0f812f0e1cda4bc6d3108fb5a4878dafba29ed0bb3516fc1b2941af16dfb4752c67f33
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
avo (4.0.
|
|
4
|
+
avo (4.0.22)
|
|
5
5
|
actionview (>= 6.1)
|
|
6
6
|
active_link_to
|
|
7
7
|
activerecord (>= 6.1)
|
|
@@ -27,29 +27,29 @@ GEM
|
|
|
27
27
|
specs:
|
|
28
28
|
action_text-trix (2.1.19)
|
|
29
29
|
railties
|
|
30
|
-
actioncable (8.1.3)
|
|
31
|
-
actionpack (= 8.1.3)
|
|
32
|
-
activesupport (= 8.1.3)
|
|
30
|
+
actioncable (8.1.3.1)
|
|
31
|
+
actionpack (= 8.1.3.1)
|
|
32
|
+
activesupport (= 8.1.3.1)
|
|
33
33
|
nio4r (~> 2.0)
|
|
34
34
|
websocket-driver (>= 0.6.1)
|
|
35
35
|
zeitwerk (~> 2.6)
|
|
36
|
-
actionmailbox (8.1.3)
|
|
37
|
-
actionpack (= 8.1.3)
|
|
38
|
-
activejob (= 8.1.3)
|
|
39
|
-
activerecord (= 8.1.3)
|
|
40
|
-
activestorage (= 8.1.3)
|
|
41
|
-
activesupport (= 8.1.3)
|
|
36
|
+
actionmailbox (8.1.3.1)
|
|
37
|
+
actionpack (= 8.1.3.1)
|
|
38
|
+
activejob (= 8.1.3.1)
|
|
39
|
+
activerecord (= 8.1.3.1)
|
|
40
|
+
activestorage (= 8.1.3.1)
|
|
41
|
+
activesupport (= 8.1.3.1)
|
|
42
42
|
mail (>= 2.8.0)
|
|
43
|
-
actionmailer (8.1.3)
|
|
44
|
-
actionpack (= 8.1.3)
|
|
45
|
-
actionview (= 8.1.3)
|
|
46
|
-
activejob (= 8.1.3)
|
|
47
|
-
activesupport (= 8.1.3)
|
|
43
|
+
actionmailer (8.1.3.1)
|
|
44
|
+
actionpack (= 8.1.3.1)
|
|
45
|
+
actionview (= 8.1.3.1)
|
|
46
|
+
activejob (= 8.1.3.1)
|
|
47
|
+
activesupport (= 8.1.3.1)
|
|
48
48
|
mail (>= 2.8.0)
|
|
49
49
|
rails-dom-testing (~> 2.2)
|
|
50
|
-
actionpack (8.1.3)
|
|
51
|
-
actionview (= 8.1.3)
|
|
52
|
-
activesupport (= 8.1.3)
|
|
50
|
+
actionpack (8.1.3.1)
|
|
51
|
+
actionview (= 8.1.3.1)
|
|
52
|
+
activesupport (= 8.1.3.1)
|
|
53
53
|
nokogiri (>= 1.8.5)
|
|
54
54
|
rack (>= 2.2.4)
|
|
55
55
|
rack-session (>= 1.0.1)
|
|
@@ -57,16 +57,16 @@ GEM
|
|
|
57
57
|
rails-dom-testing (~> 2.2)
|
|
58
58
|
rails-html-sanitizer (~> 1.6)
|
|
59
59
|
useragent (~> 0.16)
|
|
60
|
-
actiontext (8.1.3)
|
|
60
|
+
actiontext (8.1.3.1)
|
|
61
61
|
action_text-trix (~> 2.1.15)
|
|
62
|
-
actionpack (= 8.1.3)
|
|
63
|
-
activerecord (= 8.1.3)
|
|
64
|
-
activestorage (= 8.1.3)
|
|
65
|
-
activesupport (= 8.1.3)
|
|
62
|
+
actionpack (= 8.1.3.1)
|
|
63
|
+
activerecord (= 8.1.3.1)
|
|
64
|
+
activestorage (= 8.1.3.1)
|
|
65
|
+
activesupport (= 8.1.3.1)
|
|
66
66
|
globalid (>= 0.6.0)
|
|
67
67
|
nokogiri (>= 1.8.5)
|
|
68
|
-
actionview (8.1.3)
|
|
69
|
-
activesupport (= 8.1.3)
|
|
68
|
+
actionview (8.1.3.1)
|
|
69
|
+
activesupport (= 8.1.3.1)
|
|
70
70
|
builder (~> 3.1)
|
|
71
71
|
erubi (~> 1.11)
|
|
72
72
|
rails-dom-testing (~> 2.2)
|
|
@@ -76,22 +76,22 @@ GEM
|
|
|
76
76
|
addressable
|
|
77
77
|
active_median (1.0.0)
|
|
78
78
|
activesupport (>= 7.2)
|
|
79
|
-
activejob (8.1.3)
|
|
80
|
-
activesupport (= 8.1.3)
|
|
79
|
+
activejob (8.1.3.1)
|
|
80
|
+
activesupport (= 8.1.3.1)
|
|
81
81
|
globalid (>= 0.3.6)
|
|
82
|
-
activemodel (8.1.3)
|
|
83
|
-
activesupport (= 8.1.3)
|
|
84
|
-
activerecord (8.1.3)
|
|
85
|
-
activemodel (= 8.1.3)
|
|
86
|
-
activesupport (= 8.1.3)
|
|
82
|
+
activemodel (8.1.3.1)
|
|
83
|
+
activesupport (= 8.1.3.1)
|
|
84
|
+
activerecord (8.1.3.1)
|
|
85
|
+
activemodel (= 8.1.3.1)
|
|
86
|
+
activesupport (= 8.1.3.1)
|
|
87
87
|
timeout (>= 0.4.0)
|
|
88
|
-
activestorage (8.1.3)
|
|
89
|
-
actionpack (= 8.1.3)
|
|
90
|
-
activejob (= 8.1.3)
|
|
91
|
-
activerecord (= 8.1.3)
|
|
92
|
-
activesupport (= 8.1.3)
|
|
88
|
+
activestorage (8.1.3.1)
|
|
89
|
+
actionpack (= 8.1.3.1)
|
|
90
|
+
activejob (= 8.1.3.1)
|
|
91
|
+
activerecord (= 8.1.3.1)
|
|
92
|
+
activesupport (= 8.1.3.1)
|
|
93
93
|
marcel (~> 1.0)
|
|
94
|
-
activesupport (8.1.3)
|
|
94
|
+
activesupport (8.1.3.1)
|
|
95
95
|
base64
|
|
96
96
|
bigdecimal
|
|
97
97
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
@@ -134,7 +134,7 @@ GEM
|
|
|
134
134
|
money-rails (~> 1.12)
|
|
135
135
|
avo-record_link_field (0.0.2)
|
|
136
136
|
aws-eventstream (1.4.0)
|
|
137
|
-
aws-partitions (1.
|
|
137
|
+
aws-partitions (1.1275.0)
|
|
138
138
|
aws-sdk-core (3.254.0)
|
|
139
139
|
aws-eventstream (~> 1, >= 1.3.0)
|
|
140
140
|
aws-partitions (~> 1, >= 1.992.0)
|
|
@@ -146,7 +146,7 @@ GEM
|
|
|
146
146
|
aws-sdk-kms (1.130.0)
|
|
147
147
|
aws-sdk-core (~> 3, >= 3.254.0)
|
|
148
148
|
aws-sigv4 (~> 1.5)
|
|
149
|
-
aws-sdk-s3 (1.228.
|
|
149
|
+
aws-sdk-s3 (1.228.1)
|
|
150
150
|
aws-sdk-core (~> 3, >= 3.254.0)
|
|
151
151
|
aws-sdk-kms (~> 1)
|
|
152
152
|
aws-sigv4 (~> 1.5)
|
|
@@ -216,11 +216,11 @@ GEM
|
|
|
216
216
|
ssrf_filter (~> 1.5)
|
|
217
217
|
cssbundling-rails (1.4.3)
|
|
218
218
|
railties (>= 6.0.0)
|
|
219
|
-
csv (3.3.
|
|
219
|
+
csv (3.3.6)
|
|
220
220
|
cuprite (0.17)
|
|
221
221
|
capybara (~> 3.0)
|
|
222
222
|
ferrum (~> 0.17.0)
|
|
223
|
-
danger (9.6.
|
|
223
|
+
danger (9.6.1)
|
|
224
224
|
base64 (~> 0.2)
|
|
225
225
|
claide (~> 1.0)
|
|
226
226
|
claide-plugins (>= 0.9.2)
|
|
@@ -354,7 +354,7 @@ GEM
|
|
|
354
354
|
gem-release (2.2.4)
|
|
355
355
|
get_process_mem (0.2.7)
|
|
356
356
|
ffi (~> 1.0)
|
|
357
|
-
git (
|
|
357
|
+
git (5.0.0)
|
|
358
358
|
activesupport (>= 5.0)
|
|
359
359
|
addressable (~> 2.8)
|
|
360
360
|
process_executer (~> 4.0)
|
|
@@ -473,12 +473,12 @@ GEM
|
|
|
473
473
|
monetize (~> 1.9)
|
|
474
474
|
money (~> 6.13)
|
|
475
475
|
railties (>= 3.0)
|
|
476
|
-
msgpack (1.8.
|
|
476
|
+
msgpack (1.8.4)
|
|
477
477
|
multipart-post (2.4.1)
|
|
478
478
|
nap (1.1.0)
|
|
479
479
|
net-http (0.9.1)
|
|
480
480
|
uri (>= 0.11.1)
|
|
481
|
-
net-imap (0.6.
|
|
481
|
+
net-imap (0.6.6)
|
|
482
482
|
date
|
|
483
483
|
net-protocol
|
|
484
484
|
net-pop (0.1.2)
|
|
@@ -543,20 +543,20 @@ GEM
|
|
|
543
543
|
rack (>= 1.3)
|
|
544
544
|
rackup (2.3.1)
|
|
545
545
|
rack (>= 3)
|
|
546
|
-
rails (8.1.3)
|
|
547
|
-
actioncable (= 8.1.3)
|
|
548
|
-
actionmailbox (= 8.1.3)
|
|
549
|
-
actionmailer (= 8.1.3)
|
|
550
|
-
actionpack (= 8.1.3)
|
|
551
|
-
actiontext (= 8.1.3)
|
|
552
|
-
actionview (= 8.1.3)
|
|
553
|
-
activejob (= 8.1.3)
|
|
554
|
-
activemodel (= 8.1.3)
|
|
555
|
-
activerecord (= 8.1.3)
|
|
556
|
-
activestorage (= 8.1.3)
|
|
557
|
-
activesupport (= 8.1.3)
|
|
546
|
+
rails (8.1.3.1)
|
|
547
|
+
actioncable (= 8.1.3.1)
|
|
548
|
+
actionmailbox (= 8.1.3.1)
|
|
549
|
+
actionmailer (= 8.1.3.1)
|
|
550
|
+
actionpack (= 8.1.3.1)
|
|
551
|
+
actiontext (= 8.1.3.1)
|
|
552
|
+
actionview (= 8.1.3.1)
|
|
553
|
+
activejob (= 8.1.3.1)
|
|
554
|
+
activemodel (= 8.1.3.1)
|
|
555
|
+
activerecord (= 8.1.3.1)
|
|
556
|
+
activestorage (= 8.1.3.1)
|
|
557
|
+
activesupport (= 8.1.3.1)
|
|
558
558
|
bundler (>= 1.15.0)
|
|
559
|
-
railties (= 8.1.3)
|
|
559
|
+
railties (= 8.1.3.1)
|
|
560
560
|
rails-controller-testing (1.0.5)
|
|
561
561
|
actionpack (>= 5.0.1.rc1)
|
|
562
562
|
actionview (>= 5.0.1.rc1)
|
|
@@ -571,9 +571,9 @@ GEM
|
|
|
571
571
|
rails-i18n (8.1.0)
|
|
572
572
|
i18n (>= 0.7, < 2)
|
|
573
573
|
railties (>= 8.0.0, < 9)
|
|
574
|
-
railties (8.1.3)
|
|
575
|
-
actionpack (= 8.1.3)
|
|
576
|
-
activesupport (= 8.1.3)
|
|
574
|
+
railties (8.1.3.1)
|
|
575
|
+
actionpack (= 8.1.3.1)
|
|
576
|
+
activesupport (= 8.1.3.1)
|
|
577
577
|
irb (~> 1.13)
|
|
578
578
|
rackup (>= 1.0.0)
|
|
579
579
|
rake (>= 12.2)
|
|
@@ -589,7 +589,7 @@ GEM
|
|
|
589
589
|
rb-fsevent (0.11.2)
|
|
590
590
|
rb-inotify (0.11.1)
|
|
591
591
|
ffi (~> 1.0)
|
|
592
|
-
rbs (4.0
|
|
592
|
+
rbs (4.1.0)
|
|
593
593
|
logger
|
|
594
594
|
prism (>= 1.6.0)
|
|
595
595
|
tsort
|
|
@@ -705,7 +705,7 @@ GEM
|
|
|
705
705
|
rubyzip (>= 1.2.2, < 4.0)
|
|
706
706
|
websocket (~> 1.0)
|
|
707
707
|
sexp_processor (4.17.5)
|
|
708
|
-
simplecov (1.0.
|
|
708
|
+
simplecov (1.0.3)
|
|
709
709
|
simplecov-cobertura (4.0.0)
|
|
710
710
|
rexml
|
|
711
711
|
simplecov (~> 1.0)
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
<% end %>
|
|
63
63
|
|
|
64
64
|
<% header.with_controls do %>
|
|
65
|
-
<% @resource.render_index_controls(item: singular_resource_name
|
|
65
|
+
<% @resource.render_index_controls(item: singular_resource_name).each do |control| %>
|
|
66
66
|
<%= render_control control %>
|
|
67
67
|
<% end %>
|
|
68
68
|
<% end %>
|
|
@@ -97,13 +97,16 @@ class Avo::Views::ResourceIndexComponent < Avo::ResourceComponent
|
|
|
97
97
|
)
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
+
# Feeds the "%{item}" interpolation in the index create/attach buttons, so it
|
|
101
|
+
# returns the sentence form: a translated name stays verbatim, a generated one
|
|
102
|
+
# is lowercased. The buttons upcase_first the sentence.
|
|
100
103
|
def singular_resource_name
|
|
101
104
|
if @reflection.present?
|
|
102
|
-
return
|
|
105
|
+
return field.sentence_name.singularize if field.present?
|
|
103
106
|
|
|
104
|
-
reflection_resource.
|
|
107
|
+
reflection_resource.sentence_name
|
|
105
108
|
else
|
|
106
|
-
@resource.
|
|
109
|
+
@resource.sentence_name.presence || @resource.model_class.model_name.name.downcase
|
|
107
110
|
end
|
|
108
111
|
end
|
|
109
112
|
|
|
@@ -6,7 +6,9 @@ module Avo
|
|
|
6
6
|
super
|
|
7
7
|
|
|
8
8
|
if args[:item].present?
|
|
9
|
-
|
|
9
|
+
# upcase_first because locales like de put the item first
|
|
10
|
+
# ("%{item} anhängen"); the interpolated name stays as translated.
|
|
11
|
+
@label = I18n.t("avo.attach_item", item: args[:item]).upcase_first if label.nil?
|
|
10
12
|
end
|
|
11
13
|
end
|
|
12
14
|
end
|
|
@@ -6,7 +6,11 @@ module Avo
|
|
|
6
6
|
super
|
|
7
7
|
|
|
8
8
|
if args[:item].present?
|
|
9
|
-
|
|
9
|
+
# upcase_first, not humanize: the item is already the sentence form
|
|
10
|
+
# (translation verbatim, generated fallback lowercased), and locales
|
|
11
|
+
# like de put it first ("%{item} hinzufügen"), so only the sentence's
|
|
12
|
+
# initial is cased -- the interpolated name stays as translated.
|
|
13
|
+
@label = I18n.t("avo.create_new_item", item: args[:item]).upcase_first if label.nil?
|
|
10
14
|
end
|
|
11
15
|
end
|
|
12
16
|
end
|
data/lib/avo/version.rb
CHANGED