app/views/shared/_representatives_table.html.erb
<p class="pull-right"><%= t('app.counts.representative', :count => representatives.size).html_safe %></p>
<table class="table table-striped">
<thead>
<tr>
<th><%= Representative.human_attribute_name :name %></th>
<% if show_party %>
<th><%= Representative.human_attribute_name :party %></th>
<% end %>
<% if show_district %>
<th><%= Representative.human_attribute_name :district %></th>
<% end %>
<th>Møtende</th>
<th>Vara</th>
</tr>
</thead>
<tbody>
<% representatives.each do |rep| %>
<tr>
<td><%= link_to rep.display_name, rep %></td>
<% if show_party && rep.latest_party %>
<td><%= link_to rep.latest_party.name, rep.latest_party %></td>
<% end %>
<% if show_district %>
<td><%= link_to rep.district.name, rep.district %></td>
<% end %>
<td><% if rep.attending? %>★<% end %></td>
<td><% if rep.substitute? %>★<% end %></td>
</tr>
<% end %>
</tbody>
</table>