locomotivecms 4.0.2 → 4.0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 672ca536536dc4908f0b030a252694762d02434416aec61a8e6d0e1986b5b832
|
4
|
+
data.tar.gz: 1efea0ba4eb61120459bb3f46c2ac7d31b8b8c0ef987331981f93ab19de79d28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5a7cae22c14e129b85db97c40d2f767c2f09cac7c23f74d0bbd9d5691ef083bd18f7d307d6ed006b343c14cd58f7f3ffbdc732eda3f714c6bdabf8a4d4f96e0
|
7
|
+
data.tar.gz: ebb9837c7b16a9d26527f7019112297507b9105124d409cf31757f8bb075c1060ef97cc3e3855988376c56a2193b0b321db1b6a072da1f10b1f06c8c665256a5
|
@@ -42,15 +42,21 @@ module Locomotive
|
|
42
42
|
# @return [ Array ] The list of labels and urls (Hash)
|
43
43
|
#
|
44
44
|
def each_content_entry_group(content_type, &block)
|
45
|
-
field
|
46
|
-
groups
|
45
|
+
field = content_type.group_by_field
|
46
|
+
groups = content_type.list_of_groups || []
|
47
47
|
|
48
48
|
groups.each do |group|
|
49
|
+
where = if field.type == 'boolean'
|
50
|
+
%({"#{field.name}": #{group[:_id]}})
|
51
|
+
else
|
52
|
+
%({"#{field.name}_id": "#{group[:_id]}"})
|
53
|
+
end
|
54
|
+
|
49
55
|
block.call({
|
50
56
|
name: group[:name],
|
51
57
|
url: content_entries_path(current_site, content_type.slug, {
|
52
58
|
group: group[:name],
|
53
|
-
where:
|
59
|
+
where: where,
|
54
60
|
q: params[:q]
|
55
61
|
})
|
56
62
|
})
|
@@ -16,6 +16,11 @@ module Locomotive
|
|
16
16
|
field = self.group_by_field
|
17
17
|
|
18
18
|
case field.type.to_sym
|
19
|
+
when :boolean
|
20
|
+
[
|
21
|
+
{ name: "#{field.label} (#{I18n.t('yes', scope: 'locomotive.shared')})", _id: true },
|
22
|
+
{ name: "#{field.label} (#{I18n.t('no', scope: 'locomotive.shared')})", _id: false }
|
23
|
+
]
|
19
24
|
when :select
|
20
25
|
self.entries_class._select_options(field.name).map(&:with_indifferent_access)
|
21
26
|
when :belongs_to
|
@@ -31,7 +36,7 @@ module Locomotive
|
|
31
36
|
end
|
32
37
|
|
33
38
|
def groupable?
|
34
|
-
!!self.group_by_field && %w(select belongs_to).include?(group_by_field.type)
|
39
|
+
!!self.group_by_field && %w(select belongs_to boolean).include?(group_by_field.type)
|
35
40
|
end
|
36
41
|
|
37
42
|
def group_by_field
|
data/config/locales/en.yml
CHANGED
data/config/locales/fr.yml
CHANGED
@@ -36,6 +36,8 @@ fr:
|
|
36
36
|
confirm: Êtes-vous sûr ?
|
37
37
|
unsaved_content_warning: "Vous avez des modifications non sauvegardées dans cette page. Si vous la quittez, ces modifications seront perdues."
|
38
38
|
shared:
|
39
|
+
"yes": "Oui"
|
40
|
+
"no": "Non"
|
39
41
|
header:
|
40
42
|
welcome: Bienvenue, %{name}
|
41
43
|
sites: Mes sites
|
data/lib/locomotive/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locomotivecms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Didier Lafforgue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -176,14 +176,14 @@ dependencies:
|
|
176
176
|
requirements:
|
177
177
|
- - "~>"
|
178
178
|
- !ruby/object:Gem::Version
|
179
|
-
version: 1.5.
|
179
|
+
version: 1.5.3
|
180
180
|
type: :runtime
|
181
181
|
prerelease: false
|
182
182
|
version_requirements: !ruby/object:Gem::Requirement
|
183
183
|
requirements:
|
184
184
|
- - "~>"
|
185
185
|
- !ruby/object:Gem::Version
|
186
|
-
version: 1.5.
|
186
|
+
version: 1.5.3
|
187
187
|
- !ruby/object:Gem::Dependency
|
188
188
|
name: slim
|
189
189
|
requirement: !ruby/object:Gem::Requirement
|