Sha256: 1005745d0662205b55786638bc6408146d9f5818b578ef83db85ebbcd1aaaa1e

Contents?: true

Size: 1.2 KB

Versions: 13

Compression:

Stored size: 1.2 KB

Contents

:ruby
  if field.ckeditor
    richtext = 'ckeditor'
    js_data = {
      :jspath => field.ckeditor_location ? field.ckeditor_location : field.ckeditor_base_location + "ckeditor.js",
      :base_location => field.ckeditor_base_location,
      :options => {
        :customConfig => field.ckeditor_config_js ? field.ckeditor_config_js : field.ckeditor_base_location + "config.js"
      }
    }
  elsif field.codemirror
    richtext = 'codemirror'
    js_data = {
      :csspath => field.codemirror_css_location,
      :jspath => field.codemirror_js_location,
      :options => field.codemirror_config,
      :locations => field.codemirror_assets
    }
  elsif field.bootstrap_wysihtml5
    richtext = 'bootstrap-wysihtml5'
    js_data = {
      :csspath => field.bootstrap_wysihtml5_css_location,
      :jspath => field.bootstrap_wysihtml5_js_location,
      :config_options => field.bootstrap_wysihtml5_config_options.to_json
    }
  else
    richtext = false
    js_data = {}
  end

= form.text_area field.method_name, field.html_attributes.reverse_merge(:data => { :richtext => richtext, :options => js_data.to_json }).reverse_merge((hdv = field.html_default_value).nil? ? { :value => field.formatted_value } : { :value => hdv })

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
rails_admin-0.4.9 app/views/rails_admin/main/_form_text.html.haml
rails_admin-0.4.8 app/views/rails_admin/main/_form_text.html.haml
rails_admin-0.4.7 app/views/rails_admin/main/_form_text.html.haml
rails_admin-0.4.6 app/views/rails_admin/main/_form_text.html.haml
rails_admin-0.4.5 app/views/rails_admin/main/_form_text.html.haml
rails_admin-0.4.4 app/views/rails_admin/main/_form_text.html.haml
rails_admin-lbgraham-0.4.2 app/views/rails_admin/main/_form_text.html.haml
rails_admin-0.4.3 app/views/rails_admin/main/_form_text.html.haml
rails_admin-0.4.2 app/views/rails_admin/main/_form_text.html.haml
rails_admin-0.4.1 app/views/rails_admin/main/_form_text.html.haml
rails_admin-0.4.0 app/views/rails_admin/main/_form_text.html.haml
rails_admin-0.3.0 app/views/rails_admin/main/_form_text.html.haml
rails_admin-0.2.0 app/views/rails_admin/main/_form_text.html.haml