Sha256: 1b173ea515030c694f0fee6498caae0d441606cd696dafe3f33c3b9972a44ef0

Contents?: true

Size: 1.26 KB

Versions: 16

Compression:

Stored size: 1.26 KB

Contents

# Define presentation-specific methods here. Helpers are accessed through
# `helpers` (aka `h`).
#
# This class is used to contain some common presenter functions
#------------------------------------------------------------------------------
class ForumCommonPresenter < BasePresenter
  presents  :model
  
  #------------------------------------------------------------------------------
  # Admin presenter methods
  
  #------------------------------------------------------------------------------
  def label_published
    model.published? ? h.colored_label('Published', :success) : h.colored_label('Draft')
  end
  
  # 
  # #------------------------------------------------------------------------------
  # # Front-end presenter methods
  # 
  # # Run content through a standard Textile/Liquid renderer
  # #------------------------------------------------------------------------------
  # def render_content(arguments = {})
  #   doc = RedCloth.new(Liquid::Template.parse(model.content).render(arguments, :filters => [LiquidFilters], 
  #                       :registers => {:controller => controller, :view => self, :account_site_assets => '/site_assets', :current_user => current_user}))
  #   #doc.hard_breaks = false
  # 
  #   return doc.to_html.html_safe
  # end
    
end

Version data entries

16 entries across 16 versions & 1 rubygems

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