Sha256: 51ec6d0289246de7516baee13c26123f46647c3ab7e768d98dc19034fb9c40b1

Contents?: true

Size: 534 Bytes

Versions: 13

Compression:

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
shopapp-0.2.46 app/helpers/shopapp3_helper.rb
shopapp-0.2.45 app/helpers/shopapp3_helper.rb
shopapp-0.2.44 app/helpers/shopapp3_helper.rb
shopapp-0.2.43 app/helpers/shopapp3_helper.rb
shopapp-0.2.42 app/helpers/shopapp3_helper.rb
shopapp-0.2.41 app/helpers/shopapp3_helper.rb
shopapp-0.2.40 app/helpers/shopapp3_helper.rb
shopapp-0.2.39 app/helpers/shopapp3_helper.rb
shopapp-0.2.38 app/helpers/shopapp3_helper.rb
shopapp-0.2.37 app/helpers/shopapp3_helper.rb
shopapp-0.2.36 app/helpers/shopapp3_helper.rb
shopapp-0.2.35 app/helpers/shopapp3_helper.rb
shopapp-0.2.34 app/helpers/shopapp3_helper.rb