module Admin::TestimonialsHelper
  # Provide checkbox to activate/deactivate testimonial
  def admin_testimonial_activation_link(testimonial)
      if testimonial.active?
        link_to deactivate_admin_testimonial_path(testimonial), method: :patch, remote: true, data: {confirm: "Do you want to deactivate user - \"#{testimonial.name}\"?"} do
          check_box_tag 'deactivate', true, true
        end
      else
        link_to activate_admin_testimonial_path(testimonial), method: :patch, remote: true, data: {confirm: "Do you want to activate user - \"#{testimonial.name}\"."} do
          check_box_tag 'activate', true, false
        end
      end
  end


end
