2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'app/helpers/shopapp3_helper.rb', line 2
def
controller..map do ||
active = if controller.request.path == [: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="#{[:path]}">
#{image_tag [:icon].to_s, width: '20', class: 'img-fluid mb-1' if [:icon].present?}
#{mdi_tag [:mdi].to_s, class: 'mdi-36px text-light' if [:mdi].present?}
<label class="text-light mt-0 text-center">#{ [:tooltip]}</label>
</a>
</li>
HTML
end.join("\n").html_safe
end
|