<% if active_scaffold_config.action_links.any? { |link| link.type == :table } -%>
  <div class="actions">
    <% new_params = params_for(:action => :table) %>
    <% active_scaffold_config.action_links.each :table do |link| -%>
      <% next if controller.respond_to? link.security_method and !controller.send(link.security_method) -%>
      <%= render_action_link(link, new_params) -%>
    <% end -%>

    <%= loading_indicator_tag(:action => :table) %>
  </div>
<% end %>
<h2><%= active_scaffold_config.list.user.label %></h2>
<% if active_scaffold_config.action_links.any? { |link| link.type == :table } -%>
  <div class="actions">
    <% new_params = params_for(:action => :table) %>
    <% active_scaffold_config.action_links.each :table do |link| -%>
	  <% next if link.action == 'show_search' && active_scaffold_config.list.always_show_search? %>
      <% next if controller.respond_to? link.security_method and !controller.send(link.security_method) -%>
      <%= render_action_link(link, new_params) -%>
    <% end -%>

    <%= loading_indicator_tag(:action => :table) %>
  </div>
<% end %>
<h2><%= active_scaffold_config.list.user.label %></h2>

Hide search button when always_show_search is true
Hide search button when always_show_search is true
