Sha256: b0d0438c371c61cef451c2bcf051627d6f42651fe502e22374dd5a792233df40

Contents?: true

Size: 736 Bytes

Versions: 3

Compression:

Stored size: 736 Bytes

Contents

module Enjoy
  module Admin
    module ContactMessage
      def self.config(fields = {})
        Proc.new {
          # navigation_label I18n.t('enjoy.contact_message')
          field :c_at do
            read_only true
          end
          field :name
          field :content, :text
          field :email
          field :phone

          Enjoy.config.contacts_fields.each_pair do |fn, ft|
            next if ft.nil?
            if ft.is_a?(Array)
              field fn, ft[1].to_sym
            else
              field fn
            end
          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

Version Path
enjoy_cms-0.3.6.2 lib/enjoy/admin/contact_message.rb
enjoy_cms-0.3.6.1 lib/enjoy/admin/contact_message.rb
enjoy_cms-0.3.6 lib/enjoy/admin/contact_message.rb