app/helpers/admin/admin_helper.rb in slices-1.0.5 vs app/helpers/admin/admin_helper.rb in slices-2.0.0

- old
+ new

@@ -58,6 +58,14 @@ # @!visibility private def cms_title @page.try(:name) || "Slices CMS" end + # Create a link to view the current page on the live site + # + # @!visibility private + def link_to_view_page(page, options = {}) + link_options = { class: 'view-page', target: '_blank' }.merge(options) + path = page_path(page.path, locale: I18n.locale).gsub('//', '/') + link_to 'View page on site', path, link_options + end end