Sha256: 28e46193aeb1ba2980678154b2d146c5bc1f4c5aacf60c8ae8c6daa82335f8dc

Contents?: true

Size: 980 Bytes

Versions: 5

Compression:

Stored size: 980 Bytes

Contents

module Enjoy
  module Admin
    module Gallery
      def self.config(fields = {})
        Proc.new {
          # navigation_label I18n.t('enjoy.gallery')
          field :enabled, :toggle do
            searchable false
          end

          field :name, :string do
            searchable true
          end
          group :URL do
            active false
            searchable true
            field :slugs, :enum do
              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

          Enjoy::RailsAdminGroupPatch::enjoy_cms_group(self, fields)

          if block_given?
            yield self
          end
        }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
enjoy_cms-0.3.7.4 lib/enjoy/admin/gallery.rb
enjoy_cms-0.3.7.3 lib/enjoy/admin/gallery.rb
enjoy_cms-0.3.7.2 lib/enjoy/admin/gallery.rb
enjoy_cms-0.3.7.1 lib/enjoy/admin/gallery.rb
enjoy_cms-0.3.7 lib/enjoy/admin/gallery.rb