Sha256: 800ba5388558afc3125a0729a81531eb2914bbdac704060862c2f916214b6846

Contents?: true

Size: 713 Bytes

Versions: 8

Compression:

Stored size: 713 Bytes

Contents

class EffectiveEmailTemplatesDatatable < Effective::Datatable
  datatable do
    order :subject, :asc
    length :all

    col :updated_at, visible: false
    col :created_at, visible: false
    col :id, visible: false

    col :template_name, label: 'Name'

    col :from do |email_template|
      sanitize(email_template.from)
    end

    col :cc do |email_template|
      sanitize(email_template.cc)
    end

    col :bcc do |email_template|
      sanitize(email_template.bcc)
    end

    col :subject

    col :body do |email_template|
      simple_format(email_template.body)
    end

    col :content_type, visible: false

    actions_col
  end

  collection do
    Effective::EmailTemplate.all
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
effective_email_templates-1.4.1 app/datatables/effective_email_templates_datatable.rb
effective_email_templates-1.4.0 app/datatables/effective_email_templates_datatable.rb
effective_email_templates-1.3.0 app/datatables/effective_email_templates_datatable.rb
effective_email_templates-1.2.3 app/datatables/effective_email_templates_datatable.rb
effective_email_templates-1.2.2 app/datatables/effective_email_templates_datatable.rb
effective_email_templates-1.2.1 app/datatables/effective_email_templates_datatable.rb
effective_email_templates-1.2.0 app/datatables/effective_email_templates_datatable.rb
effective_email_templates-1.1.4 app/datatables/effective_email_templates_datatable.rb