lib/vmdb/global_methods.rb
# Wrap a report html table body with html table tags and headers for the columns
Wrap a report html table body with html table tags and headers for the columns
Wrap a report html table body with html table tags and headers for the columns
def report_build_html_table(report, table_body)
      html = ''
      html << "<table class='table table-striped table-bordered'>"
      html << "<thead>"
      html << "<tr>"
      unless report.headers.nil?
        report.headers.each do |h|
          html << "<th>" << CGI.escapeHTML(h.to_s) << "</th>"
        end
        html << "</tr>"
        html << "</thead>"
      end
      html << '<tbody>'
      html << table_body << '</tbody></table>'
    end
def report_build_html_table ( report , table_body ) html = '' html << "<table class='table table-striped table-bordered'>" html << "<thead>" html << "<tr>" unless report . headers . nil? report . headers . each do | h | html << "<th>" << CGI . escapeHTML ( h . to_s ) << "</th>" end html << "</tr>" html << "</thead>" end html << '<tbody>' html << table_body << '</tbody></table>' end
Wrap a report html table body with html table tags and headers for the columns
Wrap a report html table body with html table tags and headers for the columns
# table headings
report
<not_specific>
table_body
<not_specific>