Sha256: 9b9cf3ea65f9a95ed8de041a4c79e6165676b89c305611e4d71a2da6bd9935b7
Contents?: true
Size: 739 Bytes
Versions: 37
Compression:
Stored size: 739 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin class SecondaryMenuPresenter < Decidim::MenuPresenter def render(render_options = {}, &block) styles = %w(secondary-nav) styles.push "secondary-nav--subnav" unless render_options.fetch(:title, false) content_tag :div, class: styles.join(" ") do output = [] output.push render_title(render_options) if render_options.fetch(:title, false) output.push render_menu(&block) safe_join(output) end end protected def render_title(render_options) content_tag :div, class: "secondary-nav__title" do render_options.fetch(:title) end end end end end
Version data entries
37 entries across 37 versions & 1 rubygems