app/helpers/decidim/admin/application_helper.rb in decidim-admin-0.14.4 vs app/helpers/decidim/admin/application_helper.rb in decidim-admin-0.15.0

- old
+ new

@@ -14,8 +14,22 @@ include Decidim::Admin::LogRenderHelper def title current_organization.name end + + # Adds a link to the secondary navigation so admins can easily access the public page of the + # element their working on. + # + # url - The String with the URL to link to. + # + # Returns a String with a link wrapped in a <li> element. + def public_page_link(url) + content_tag(:li) do + link_to url, class: "button", style: "color: #fff", target: "_blank" do + I18n.t("decidim.admin.view_public_page") + end + end + end end end end