Sha256: 79f1cce1809d216bcb1a7a7a013160120ea802de699ded22a65b7c4ef6754a0d

Contents?: true

Size: 819 Bytes

Versions: 16

Compression:

Stored size: 819 Bytes

Contents

# Define presentation-specific methods here. Helpers are accessed through
# `helpers` (aka `h`).
#
# This class is used to contain some common presenter functions
#------------------------------------------------------------------------------
class WorkshopPresenter < EventCommonPresenter
  presents  :model
  
  #------------------------------------------------------------------------------
  # Admin presenter methods
  
  #------------------------------------------------------------------------------
  def label_published
    !model.registration_closed? ? h.colored_label(start_end_date, :success) : h.colored_label(start_end_date)
  end

  #------------------------------------------------------------------------------
  def start_end_date
    format_date_range(model.starting_on, model.ending_on)
  end
  
end

Version data entries

16 entries across 16 versions & 1 rubygems

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