Sha256: 6021dbae2fe3401cba4ff9a910de42eac1e5d56dfcae9aad90fab6379503eaba

Contents?: true

Size: 812 Bytes

Versions: 3

Compression:

Stored size: 812 Bytes

Contents

module Enjoy::Gallery
  module Admin
    module Image
      def self.config(nav_label = nil, without_gallery = false, fields = {})
        Proc.new {
          navigation_label(nav_label || I18n.t('enjoy.gallery'))
          field :enabled, :toggle do
            searchable false
          end
          unless without_gallery
            field :gallery do
              searchable :name
            end
          end
          field :name, :string do
            searchable true
          end
          field :image, :jcrop do
            jcrop_options :image_jcrop_options
          end

          nested_set({max_depth: 1, scopes: []})

          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

Version Path
enjoy_cms_gallery-0.4.0 lib/enjoy/gallery/admin/image.rb
enjoy_cms_gallery-0.4.0.beta3 lib/enjoy/gallery/admin/image.rb
enjoy_cms_gallery-0.4.0.beta1 lib/enjoy/gallery/admin/image.rb