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
|
# File 'lib/hancock/catalog/admin/category_image.rb', line 4
def self.config(nav_label = nil, fields = {})
if nav_label.is_a?(Hash)
nav_label, fields = nav_label[:nav_label], nav_label
elsif nav_label.is_a?(Array)
nav_label, fields = nil, nav_label
end
nav_label ||= I18n.t('hancock.catalog')
if Hancock::Catalog.config.gallery_support
if Hancock::Catalog.mongoid?
if block_given?
Hancock::Gallery::Admin::EmbeddedImage.config(nav_label, fields) do |config|
yield config
end
else
Hancock::Gallery::Admin::EmbeddedImage.config(nav_label, fields)
end
else
if block_given?
Hancock::Gallery::Admin::Image.config(nav_label, fields) do |config|
yield config
end
else
Hancock::Gallery::Admin::Image.config(nav_label,fields)
end
end end
end
|