Module: Georgia::PagesHelper
- Defined in:
- app/helpers/georgia/pages_helper.rb
Instance Method Summary collapse
- #button_to_settings ⇒ Object
- #page_actions_tag(page, revision = nil, options = {}) ⇒ Object
- #page_url_minus_slug ⇒ Object
- #picture_tag(picture, options = {}) ⇒ Object
- #warning_message(page, revision, options = {}) ⇒ Object
Instance Method Details
#button_to_settings ⇒ Object
9 10 11 |
# File 'app/helpers/georgia/pages_helper.rb', line 9 def 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, ={} revision ||= page.current_revision Georgia::PageActionsPresenter.new(self, page, revision, ) end |
#page_url_minus_slug ⇒ Object
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, ={} return unless picture and picture.url.present? format = .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 page, revision, ={} Georgia::WarningMessage.new(self, page, revision, ) end |