Sha256: 9b1c7bcce54a1e3693c4def01536348adbe076af72cd45e99817746c0c9e1323

Contents?: true

Size: 382 Bytes

Versions: 16

Compression:

Stored size: 382 Bytes

Contents

class CmsPostPresenter < BasePresenter

  presents :cms_post

  #------------------------------------------------------------------------------
  def label_published
    date_formatted = cms_post.published_on.nil? ? 'Draft' : format_datetime(cms_post.published_on)
    cms_post.is_published? ? h.colored_label(date_formatted, :success) : h.colored_label(date_formatted)
  end
  
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dm_cms-4.2.3.10 app/presenters/cms_post_presenter.rb
dm_cms-4.2.3.9 app/presenters/cms_post_presenter.rb
dm_cms-4.2.3.8 app/presenters/cms_post_presenter.rb
dm_cms-4.2.3.7 app/presenters/cms_post_presenter.rb
dm_cms-4.2.3.6 app/presenters/cms_post_presenter.rb
dm_cms-4.2.3.5 app/presenters/cms_post_presenter.rb
dm_cms-4.2.3.4 app/presenters/cms_post_presenter.rb
dm_cms-4.2.3.3 app/presenters/cms_post_presenter.rb
dm_cms-4.2.3.2 app/presenters/cms_post_presenter.rb
dm_cms-4.2.3.1 app/presenters/cms_post_presenter.rb
dm_cms-4.2.3 app/presenters/cms_post_presenter.rb
dm_cms-4.2.2.3 app/presenters/cms_post_presenter.rb
dm_cms-4.2.2.2 app/presenters/cms_post_presenter.rb
dm_cms-4.2.2.1 app/presenters/cms_post_presenter.rb
dm_cms-4.2.2 app/presenters/cms_post_presenter.rb
dm_cms-4.2.1.5 app/presenters/cms_post_presenter.rb