Sha256: 518cc014ad310143d3b3fd36044b260eb94eaffc957a7864aa211fe76ab77826
Contents?: true
Size: 1.98 KB
Versions: 1
Compression:
Stored size: 1.98 KB
Contents
<div id="<%= @grid.id %>" class="presentation-grid"> <table> <% unless @grid.title.blank? and @grid.links.empty? %> <caption> <% unless @grid.links.empty? %> <ul class="actions"> <% @grid.links.each do |link| %> <li><%= link %></li> <% end %> </ul> <% end %> <%= @grid.title %> </caption> <% end %> <thead> <tr> <% @grid.fields.each do |field| %> <th class="<%= field.id %>"> <% if field.sortable? %> <%= link_to field.name, field.sorted_url(request), :class => "sortable" %> <% else %> <%= field.name %> <% end %> </th> <% end %> <% unless @grid.record_links.empty? %> <th></th> <% end %> </tr> </thead> <tbody> <% if @grid.presentable.blank? %> <tr> <td colspan="<%= @grid.colspan %>"> No records found. </td> </tr> <% else %> <% @grid.presentable.each do |record| %> <tr class="<%= cycle('odd', 'even') %>"> <% @grid.fields.each do |field| %> <td class="<%= [field.id, ('sorted' if field.is_sorted?(request))].compact.join(' ') %>"> <%= present(field.value_from(record), :raw => !field.sanitize?) %> </td> <% end %> <% unless @grid.record_links.empty? %> <td> <ul class="actions"> <% @grid.record_links.each do |link| %> <li><%= link.call(record) %></li> <% end %> </ul> </td> <% end %> </tr> <% end %> <% end %> </tbody> <% if @grid.paginate? %> <tfoot> <tr> <td colspan="<%= @grid.colspan %>"> <%= will_paginate @grid.presentable %> </td> </tr> </tfoot> <% end %> </table> </div>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
presenting-2.0.0 | app/views/presentations/_grid.erb |