def smart_listing_item_actions actions = []
      content_tag(:span) do
        actions.each do |action|
          next unless action.is_a?(Hash)

          locals = {
            :action_if => action.has_key?(:if) ? action[:if] : true,
            :url => action.delete(:url),
            :icon => action.delete(:icon),
            :title => action.delete(:title),
          }

          template = nil
          action_name = action[:name].to_sym

          case action_name
          when :show
            locals[:icon] ||= smart_listing_config.classes(:icon_show)
						template = 'action_show'
          when :edit
            locals[:icon] ||= smart_listing_config.classes(:icon_edit)
						template = 'action_edit'
          when :destroy
            locals[:icon] ||= smart_listing_config.classes(:icon_trash)
            locals.merge!(
              :confirmation => action.delete(:confirmation),
            )
            template = 'action_delete'
          when :custom
            locals.merge!(
              :html_options => action,
            )
            template = 'action_custom'
          end

          locals[:icon] = [locals[:icon], smart_listing_config.classes(:muted)] if !locals[:action_if]

          if template
            concat(render(:partial => "smart_listing/#{template}", :locals => locals))
          else
            concat(render(:partial => "smart_listing/action_#{action_name}", :locals => {:action => action}))
          end
        end
      end
    end
def smart_listing_item_actions actions = []
      content_tag(:span) do
        actions.each do |action|
          next unless action.is_a?(Hash)

          locals = {
            :action_if => action.has_key?(:if) ? action[:if] : true,
            :url => action.delete(:url),
            :icon => action.delete(:icon),
            :title => action.delete(:title),
          }

          template = nil
          action_name = action[:name].to_sym

          case action_name
          when :show
            locals[:icon] ||= smart_listing_config.classes(:icon_show)
						template = 'action_show'
          when :edit
            locals[:icon] ||= smart_listing_config.classes(:icon_edit)
						template = 'action_edit'
          when :destroy
            locals[:icon] ||= smart_listing_config.classes(:icon_trash)
            locals.merge!(
              :confirmation => action.delete(:confirmation),
            )
            template = 'action_delete'
          when :custom
            locals.merge!(
              :html_options => action,
            )
            template = 'action_custom'
          end

          locals[:icon] = [locals[:icon], smart_listing_config.classes(:muted)] if !locals[:action_if]

          if template
            concat(render(:partial => "smart_listing/#{template}", :locals => locals))
          else
            concat(render(:partial => "smart_listing/action_#{action_name}", :locals => {:action => action}))
          end
        end
      end
    end
Render item action buttons (ie. edit, destroy and custom ones)