Class: Decidim::BreadcrumbRootMenuItemPresenter
- Inherits:
-
MenuItemPresenter
- Object
- MenuItemPresenter
- Decidim::BreadcrumbRootMenuItemPresenter
- Includes:
- ActionView::Helpers::AssetUrlHelper, LayoutHelper, Shakapacker::Helper
- Defined in:
- app/presenters/decidim/breadcrumb_root_menu_item_presenter.rb
Overview
A presenter to render menu items of breadcrumb root menu
Instance Method Summary collapse
Methods included from LayoutHelper
#_icon_classes, #apple_favicon, #application_path, #current_url, #current_user_unread_data, #extended_navigation_bar, #external_icon, #favicon, #icon, #legacy_favicon, #role
Methods included from TooltipHelper
Methods included from ModalHelper
Methods included from OrganizationHelper
#current_organization_name, #organization_colors, #organization_description_label, #organization_name
Methods included from TranslatableAttributes
Methods inherited from MenuItemPresenter
Constructor Details
This class inherits a constructor from Decidim::MenuItemPresenter
Instance Method Details
#arrow_link(text, url, args = {}) ⇒ Object
19 20 21 22 23 |
# File 'app/presenters/decidim/breadcrumb_root_menu_item_presenter.rb', line 19 def arrow_link(text, url, args = {}) link_to url, class: args.with_indifferent_access[:class] do "<span>#{text}</span> #{icon("arrow-right-line")}".html_safe end end |
#render ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/presenters/decidim/breadcrumb_root_menu_item_presenter.rb', line 10 def render content_tag :li, class: link_wrapper_classes do output = [arrow_link(label, url, )] output.push(@view.send(:simple_menu, **@menu_item.).render) if @menu_item. safe_join(output) end end |