Module: Decidim::Admin::ApplicationHelper
- Includes:
- LogRenderHelper, UserRolesHelper, Decidim::AriaSelectedLinkToHelper, HumanizeBooleansHelper, LocalizedLocalesHelper, MapHelper, MetaTagsHelper, TranslationsHelper
- Defined in:
- app/helpers/decidim/admin/application_helper.rb
Overview
Custom helpers, scoped to the admin panel.
Instance Method Summary collapse
-
#public_page_link(url) ⇒ Object
Adds a link to the secondary navigation so admins can easily access the public page of the element their working on.
- #title ⇒ Object
Methods included from UserRolesHelper
Methods included from LogRenderHelper
Instance Method Details
#public_page_link(url) ⇒ Object
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.
27 28 29 30 31 32 33 |
# File 'app/helpers/decidim/admin/application_helper.rb', line 27 def public_page_link(url) content_tag(:li) do link_to url, class: "button", style: "color: #fff", target: "_blank", rel: "noopener" do I18n.t("decidim.admin.view_public_page") end end end |
#title ⇒ Object
17 18 19 |
# File 'app/helpers/decidim/admin/application_helper.rb', line 17 def title current_organization.name end |