Sha256: 1edf020ea784cb04cc144ea4266033fba8bc24d5cea551bcee4243d1a13ff19c

Contents?: true

Size: 1.06 KB

Versions: 6

Compression:

Stored size: 1.06 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] %>
                <% if value.kind_of?(Hash) %>
                    <td rowspan="<%= value[:rowspan] %>"><%= value[:content] %></td>
                <% elsif record.has_key?(column.humanize) %>
                    <td><%= 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

6 entries across 6 versions & 1 rubygems

Version Path
query_report-1.0.14 app/views/query_report/_records.html.erb
query_report-1.0.13 app/views/query_report/_records.html.erb
query_report-1.0.12 app/views/query_report/_records.html.erb
query_report-1.0.11 app/views/query_report/_records.html.erb
query_report-1.0.10 app/views/query_report/_records.html.erb
query_report-1.0.9 app/views/query_report/_records.html.erb