2012-03-06 15:53:04 +00:00
|
|
|
- collection = instance_variable_get("@#{type}")
|
2014-01-21 04:51:49 +00:00
|
|
|
%table.tablesorter.bmargin5{cellpadding: "0", cellspacing: "0"}
|
2012-03-06 15:53:04 +00:00
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th #{t "layout.#{type}.list_header"} (#{collection.count})
|
|
|
|
%tbody
|
|
|
|
- collection.each do |c|
|
|
|
|
%tr
|
|
|
|
%td= render type.singularize, type.singularize.to_sym => c
|
2014-01-21 04:51:49 +00:00
|
|
|
= link_to t('layout.search.all'), search_index_path(query: @query, type: type) if collection.present?
|