Sha256: a4506a2c091aa3f0de8d2f570c5deec7c655acba57fc1ba9a98abff78edc52af

Contents?: true

Size: 1.21 KB

Versions: 4

Compression:

Stored size: 1.21 KB

Contents

module ThemeHelper
  # This allows you to generate a page-header component
  def page_header(data, presenter = nil)
    data = ThemePresentation.wrap(data, PageHeaderPresenter, presenter)
    render 'woople-theme/page_header', header: data
  end

  def content_items(items, presenter = nil)
    collection = ThemePresentation.wrap_collection(items, ContentItemPresenter, presenter)
    render partial: 'woople-theme/content_item', collection: collection
  end

  def video_modal(video, presenter = nil)
    video = ThemePresentation.wrap(video, presenter)
    render 'woople-theme/video_modal', video: video
  end

  def content_item_header
    render partial: 'woople-theme/content_item_header'
  end

  def outline(items, presenter = nil)
    collection = ThemePresentation.wrap_collection(items, OutlinePresenter, presenter)
    render partial: 'woople-theme/outline', collection: collection
  end

  def profile
    model = ThemePresentation.wrap(send(WoopleTheme.configuration.profile_helper), ProfilePresenter)
    render 'woople-theme/profile', profile: model
  end

  def menu
    model = ThemePresentation.wrap(send(WoopleTheme.configuration.menu_helper), MenuPresenter)
    render 'woople-theme/menu', menu: model
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
woople-theme-0.0.5 app/helpers/theme_helper.rb
woople-theme-0.0.4 app/helpers/theme_helper.rb
woople-theme-0.0.3 app/helpers/theme_helper.rb
woople-theme-0.0.2 app/helpers/theme_helper.rb