<% items.each do |item| %> <% if item[:hook].present? %> <% hook_output = render_hook(item[:hook]) %> <% next if hook_output.blank? %> <%= content_tag :div, data: item[:data_attributes] do %> <%= icon item[:icon] if item[:icon].present? %> <%= hook_output %> <% end %> <% else %> <%= content_tag :div, data: item[:data_attributes] do %> <%= icon item[:icon] if item[:icon].present? %> <% if item[:text].present? %> <%= link_to_if enable_links? && item.has_key?(:url), item[:text], item[:url] %> <% elsif item[:cell].present? && item[:args].is_a?(Enumerable) %> <%= cell(item[:cell], *item[:args]) %> <% elsif item[:cell].present? %> <%= cell(item[:cell], item[:args]) %> <% end %> <% end %> <% end %> <% end %>