Sha256: 6d74776b61277ddec6b0bd6cca9d4ce75beb58a57371935d48c83589e4d9d9fa

Contents?: true

Size: 912 Bytes

Versions: 9

Compression:

Stored size: 912 Bytes

Contents

module Enjoy
  module Admin
    module Seo
      def self.config(is_active = true, fields = {})
        Proc.new {
          navigation_label 'SEO'
          field :seoable do
            read_only true
          end
          field :h1, :string
          field :title, :string
          field :keywords, :text
          field :description, :text
          field :robots, :string

          field :og_title, :string

          field :og_image, :jcrop do
            jcrop_options :og_image_jcrop_options
          end

          fields.each_pair do |name, type|
            if type.nil?
              field name
            else
              if type.is_a?(Array)
                field name, type[0], &type[1]
              else
                field name, type
              end
            end
          end

          if block_given?
            yield self
          end
        }
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
enjoy_cms-0.3.2.1 lib/enjoy/admin/seo.rb
enjoy_cms-0.3.2 lib/enjoy/admin/seo.rb
enjoy_cms-0.3.1.2 lib/enjoy/admin/seo.rb
enjoy_cms-0.3.1.1 lib/enjoy/admin/seo.rb
enjoy_cms-0.3.1 lib/enjoy/admin/seo.rb
enjoy_cms-0.3.0.4 lib/enjoy/admin/seo.rb
enjoy_cms-0.3.0.3 lib/enjoy/admin/seo.rb
enjoy_cms-0.3.0.2 lib/enjoy/admin/seo.rb
enjoy_cms-0.2.1 lib/enjoy/admin/seo.rb