Sha256: 2bc4740430b261bf74f279d029024d740117207308a07b02099082442749109e

Contents?: true

Size: 656 Bytes

Versions: 6

Compression:

Stored size: 656 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 py-3 #{active}">
          <a class="nav-link d-flex flex-column justify-content-start align-items-center" href="#{sidebar_action[:path]}">
            #{image_tag sidebar_action[:icon], width: '20', class: 'img-fluid'}
            <label class="text-light mt-2 text-center">#{ sidebar_action[:tooltip]}</label>
          </a>
        </li>
      HTML
    end.join("\n").html_safe
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
shopapp-0.2.52 app/helpers/shopapp3_helper.rb
shopapp-0.2.51 app/helpers/shopapp3_helper.rb
shopapp-0.2.50 app/helpers/shopapp3_helper.rb
shopapp-0.2.49 app/helpers/shopapp3_helper.rb
shopapp-0.2.48 app/helpers/shopapp3_helper.rb
shopapp-0.2.47 app/helpers/shopapp3_helper.rb