app/views/presentations/_grid.erb in presenting-2.0.0 vs app/views/presentations/_grid.erb in presenting-2.0.1

- old
+ new

@@ -1,70 +1,70 @@ -<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> +<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>