Sha256: 3daa47903bcd900842514602166ed5d749e3906ee4322b20298de94538a32672
Contents?: true
Size: 1.27 KB
Versions: 3
Compression:
Stored size: 1.27 KB
Contents
module Enjoy::Gallery module Admin module Gallery 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, :enum do searchable true enum_method do :slugs end visible do bindings[:view].current_user.admin? end multiple do true end end field :text_slug end field :image, :jcrop do jcrop_options :image_jcrop_options end # field :gallery_objects do # read_only true # end if defined?(RailsAdminMultipleFileUpload) multiple_file_upload( { fields: [:gallery_images] } ) end Enjoy::RailsAdminGroupPatch::enjoy_cms_group(self, fields) if block_given? yield self end } end end end end
Version data entries
3 entries across 3 versions & 1 rubygems