Sha256: f6088b56e01ad8230c59da8f77ab673524fcdec0a13eae2a5b936c8f483df281
Contents?: true
Size: 811 Bytes
Versions: 1
Compression:
Stored size: 811 Bytes
Contents
module Shopapp3Helper def shopapp3_sidebar_icons controller.sidebar_actions_list.map do |sidebar_action| active = if controller.request.path == sidebar_action[:path] 'active' end <<~HTML <li class="nav-item p-1 #{active}"> <a class="nav-link d-flex flex-column justify-content-start align-items-center" href="#{sidebar_action[:path]}"> #{image_tag sidebar_action[:icon].to_s, width: '20', class: 'img-fluid mb-1' if sidebar_action[:icon].present?} #{mdi_tag sidebar_action[:mdi].to_s, class: 'mdi-36px text-light' if sidebar_action[:mdi].present?} <label class="text-light mt-0 text-center">#{ sidebar_action[:tooltip]}</label> </a> </li> HTML end.join("\n").html_safe end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shopapp-0.2.54 | app/helpers/shopapp3_helper.rb |