4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/enjoy/gallery/admin/gallery.rb', line 4
def self.config(nav_label = nil, fields = {})
Proc.new {
navigation_label(nav_label || I18n.t('enjoy.gallery'))
field :enabled, :toggle do
searchable false
end
field :name, :string do
searchable true
end
group :URL do
active false
field :slugs, :enjoy_slugs
field :text_slug
end
field :image, :enjoy_image
if defined?(RailsAdminMultipleFileUpload)
multiple_file_upload(
{
fields: [:gallery_images]
}
)
end
Enjoy::RailsAdminGroupPatch::enjoy_cms_group(self, fields)
if block_given?
yield self
end
}
end
|