Sha256: e4b876ecada0c04c2ef3d3e4546da2e866b78a7e8af82abf52ab3d66d94d44e1

Contents?: true

Size: 1.06 KB

Versions: 17

Compression:

Stored size: 1.06 KB

Contents

ActiveAdmin.register Ecm::Cms::Template do
  # Menu
  menu :parent => Proc.new { I18n.t('ecm.cms.active_admin.menu') }.call

  form do |f|
    f.inputs do
      f.input :body
    end

    f.inputs do
      f.input :pathname
      f.input :basename
      f.input :locale, :as => :select, :collection => I18n.available_locales.map(&:to_s)
      f.input :format, :as => :select, :collection => Mime::SET.symbols.map(&:to_s)
      f.input :handler, :as => :select, :collection => ActionView::Template::Handlers.extensions.map(&:to_s)
    end

    f.actions
  end

  index do
    selectable_column
    column :pathname
    column :filename
    column :created_at
    column :updated_at
    default_actions
  end

  show do
    panel Ecm::Cms::Template.human_attribute_name(:body) do
      pre { ecm_cms_template.body }
    end
  end

  sidebar Ecm::Cms::Template.human_attribute_name(:details), :only => :show do
    attributes_table_for ecm_cms_template do
      # row :folder
      row :pathname
      row :filename
      row :created_at
      row :updated_at
    end
  end # sidebar
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ecm_cms-1.0.5.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-1.0.4.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-1.0.3.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-1.0.2.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-1.0.1.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-1.0.0.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-0.0.13.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-0.0.11.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-0.0.10.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-0.0.8.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-0.0.7.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-0.0.6.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-0.0.5.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-0.0.4.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-0.0.3.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-0.0.2.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb
ecm_cms-0.0.1.pre lib/ecm/cms/active_admin/ecm_cms_templates.rb