module TooltipHelper
  def tooltip_template(css_class: nil)
    tag.div class: "tooltip #{css_class}", role: "tooltip" do
      concat tag.div(class: "arrow")
      concat tag.div(class: "tooltip-inner")
    end
  end

  def get_approval_data_for_releasable(release)
    if release.approved_by_user_name.present?
      "#{release.approved_by_user_name} [#{release.approved_by_user_email}]"
    else
      release.approved_by_user_email
    end
  end
end
