Module: ThemeHelper

Defined in:
app/helpers/theme_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) content_item_header



18
19
20
# File 'app/helpers/theme_helper.rb', line 18

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

- (Object) content_items(items, presenter = nil)



8
9
10
11
# File 'app/helpers/theme_helper.rb', line 8

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


32
33
34
35
# File 'app/helpers/theme_helper.rb', line 32

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

- (Object) outline(items, presenter = nil)



22
23
24
25
# File 'app/helpers/theme_helper.rb', line 22

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

- (Object) page_header(data, presenter = nil)

This allows you to generate a page-header component



3
4
5
6
# File 'app/helpers/theme_helper.rb', line 3

def page_header(data, presenter = nil)
  data = ThemePresentation.wrap(data, PageHeaderPresenter, presenter)
  render 'woople-theme/page_header', header: data
end

- (Object) profile



27
28
29
30
# File 'app/helpers/theme_helper.rb', line 27

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

- (Object) video_modal(video, presenter = nil)



13
14
15
16
# File 'app/helpers/theme_helper.rb', line 13

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