Sha256: 5d3d0a073c73e9128add039982f874730f3f492bb7496e12ccfbd55e261f323c

Contents?: true

Size: 1.24 KB

Versions: 8

Compression:

Stored size: 1.24 KB

Contents

<% if report.records.size > 0 %>
    <table class="<%= QueryReport.config.record_table_class %>" cellpadding="0" cellspacing="0">
      <thead>
      <% report.columns.each do |column| %>
          <th><%= column.sortable? ? sort_link(report.search, column.name, params, remote: @remote) : column.humanize %></th>
      <% end %>
      </thead>

      <tbody>
      <% records = report.has_any_rowspan? ? report.records_with_rowspan : report.records %>
      <% records.each do |record| %>
          <tr>
            <% report.columns.each do |column| %>
                <% value = record[column.humanize]
                   align = column.align
                   align_attr = align ? "class=queryreport-td-align-#{align.to_s}" : ''
                %>
                <% if value.kind_of?(Hash) %>
                    <td rowspan="<%= value[:rowspan] %>" <%= align_attr %> ><%= value[:content] %></td>
                <% elsif record.has_key?(column.humanize) %>
                    <td <%= align_attr %>><%= value %></td>
                <% end %>
            <% end %>
          </tr>
      <% end %>
      <%= render :partial => "query_report/record_footer", locals: {report: report} %>
      </tbody>
    </table>
<% else %>
    <p>No record found</p>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
query_report-1.0.23 app/views/query_report/_records.html.erb
query_report-1.0.22 app/views/query_report/_records.html.erb
query_report-1.0.21 app/views/query_report/_records.html.erb
query_report-1.0.20 app/views/query_report/_records.html.erb
query_report-1.0.19 app/views/query_report/_records.html.erb
query_report-1.0.18 app/views/query_report/_records.html.erb
query_report-1.0.17 app/views/query_report/_records.html.erb
query_report-1.0.16 app/views/query_report/_records.html.erb