Module: Georgia::PagesHelper

Defined in:
app/helpers/georgia/pages_helper.rb

Instance Method Summary collapse

Instance Method Details

#button_to_settingsObject



9
10
11
# File 'app/helpers/georgia/pages_helper.rb', line 9

def button_to_settings
  link_to icon_tag('cogs'), [:settings, @page], class: 'btn btn-default'
end

#page_actions_tag(page, revision = nil, options = {}) ⇒ Object



4
5
6
7
# File 'app/helpers/georgia/pages_helper.rb', line 4

def page_actions_tag page, revision=nil, options={}
  revision ||= page.current_revision
  Georgia::PageActionsPresenter.new(self, page, revision, options)
end

#page_url_minus_slugObject



13
14
15
# File 'app/helpers/georgia/pages_helper.rb', line 13

def page_url_minus_slug
  @page_full_url ||= (Georgia.url + @page.url).gsub(@page.slug, '')
end

#picture_tag(picture, options = {}) ⇒ Object



21
22
23
24
25
26
27
# File 'app/helpers/georgia/pages_helper.rb', line 21

def picture_tag picture, options={}
  return unless picture and picture.url.present?
  format = options.fetch(:format, :tiny)
  link_to picture.url_content, class: 'media-link bg-transparent', rel: 'shadowbox[gallery]' do
    image_tag(picture.url(format), title: picture.data_file_name, class: 'media-image')
  end
end

#warning_message(page, revision, options = {}) ⇒ Object



17
18
19
# File 'app/helpers/georgia/pages_helper.rb', line 17

def warning_message page, revision, options={}
  Georgia::WarningMessage.new(self, page, revision, options)
end