Sha256: f0ff89a1a474b080493978f4b91c47de0e09f9a736e01fc5e0dcd9fc9080f5f6
Contents?: true
Size: 1.08 KB
Versions: 6
Compression:
Stored size: 1.08 KB
Contents
//{:buttons=>[{:icon=>:"eye-open", :path=>"/products/1", :options=>{:class=>"btn-success"}}, {:icon=>:pencil, :path=>"/products/1/edit", :options=>{:class=>"btn-warning"}}], :submenu=>[{:icon=>:star, :path=>"/products/1", :label=>"Dolle Sache"}, :divider, {:icon=>:"trash-o", :path=>"/products/1", :label=>"Löschen", :options=>{:confirm=>"echt?", :class=>"btn-danger", :method=>:delete}}]} .btn-group - buttons[:buttons].each do |button| - o = (button[:options] || {}).merge(class: "btn btn-sm btn-default #{button[:options].try(:[], :class)}") = link_to fa_icon(button[:icon]), button[:path], o - if buttons[:submenu].present? button.btn.btn-default.btn-sm.dropdown-toggle data-toggle='dropdown' span.caret ul.dropdown-menu role='menu' - buttons[:submenu].each do |button| - if button == :divider li.divider role="presentation" - else li= link_to button[:path], button[:options] do - if button[:icon].present? => fa_icon(button[:icon]) - if button[:label].present? = button[:label]
Version data entries
6 entries across 6 versions & 1 rubygems