Sha256: abc8ddf0e1c764bfe266106132bda8203f6f47e06425b91faab0f06d17408b90

Contents?: true

Size: 1.41 KB

Versions: 1

Compression:

Stored size: 1.41 KB

Contents

# frozen_string_literal: true

class SunriseExtra < Sunrise::AbstractModel
  self.resource_name = 'ExtraFeature'

  available_index_views [:thumbs]

  index :thumbs do
    scope { ExtraFeature.sorted }

    field :sort_order
  end

  form do
    field :title, translate: true, as: :text, input_html: { rows: 2 }
    field :subtitle, translate: true, as: :text, input_html: { rows: 2 }

    field :step_1_icon_id, collection: ExtraIconType.all, include_blank: false,
                           html: { style: 'width:50%;display:inline-block;' }
    field :step_1_title, translate: true, html: { style: 'width:50%;display:inline-block;' }
    field :step_2_icon_id, collection: ExtraIconType.all, include_blank: false,
                           html: { style: 'width:50%;display:inline-block;' }
    field :step_2_title, translate: true, html: { style: 'width:50%;display:inline-block;' }
    field :step_3_icon_id, collection: ExtraIconType.all, include_blank: false,
                           html: { style: 'width:50%;display:inline-block;' }
    field :step_3_title, translate: true, html: { style: 'width:50%;display:inline-block;' }

    field :service_id, html: { style: 'width:50%;display:inline-block;' },
                       collection: -> { TranslationCms::Api::Service.all! }
    field :feature_id, html: { style: 'width:50%;display:inline-block;' }
    field :content, translate: true, as: :ckeditor
    field :sort_order
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
translation_cms-0.1.5 app/sunrise/sunrise_extra.rb