Sha256: d359470fdd0a6ce6d5b58e73921131bd43bba781518af55d19cc118fc56ae6b1

Contents?: true

Size: 1.11 KB

Versions: 26

Compression:

Stored size: 1.11 KB

Contents

- if ['string', 'integer', 'phone', 'email', 'address', 'url', 'domain'].include?(@object.type)
  = form.text_field :raw, :value => field.value
- if @object.type == 'color'
  = form.text_field :raw, :value => field.value, 'data-color' => true, style: "background-color: ##{field.value}"
- elsif %w(text yaml phones).include?( @object.type )
  = form.text_area :raw, :value => field.value, :rows => 10, :cols => 80
- elsif @object.type == 'html'
  - if form.respond_to?(:cktext_area)
    = javascript_include_tag "ckeditor/init"
    = form.cktext_area :raw, :value => field.value, :rows => 10, :cols => 80
  - elsif Object.const_defined?('Rich')
    = form.text_area :raw, :value => field.value, :rows => 10, :cols => 80

    = javascript_include_tag "rich/base.js"
    :javascript
      var instance = CKEDITOR.instances['#{form.dom_id(field)}'];
      if(instance) { CKEDITOR.remove(instance); }
      CKEDITOR.replace('#{form.dom_id(field)}', #{Rich.options().to_json.html_safe});
  - else
    .alert.alert-error
      = t('admin.settings.no_ckeditor_detected')
    = form.text_area :raw, :value => field.value, :rows => 10, :cols => 80

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
rails_admin_settings-1.1.0.pre.1 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-1.0.1 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-1.0.0 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-1.0.0.pre.1 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.9.1 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.9.0 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.9.0.pre.6 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.9.0.pre.5 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.9.0.pre.4 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.9.0.pre.3 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.9.0.pre.2 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.9.0.pre app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.8.0 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.7.8 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.7.7 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.7.6 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.7.5 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.7.4 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.7.3 app/views/rails_admin/main/_setting_value.html.haml
rails_admin_settings-0.7.2 app/views/rails_admin/main/_setting_value.html.haml