foodsoft/app/views/foodcoop/ordergroups/_ordergroups.html.haml

20 lines
519 B
Plaintext
Raw Normal View History

- if Ordergroup.count > 20
= items_per_page
= pagination_links_remote @ordergroups
%table.table.table-striped
%thead
%tr
%th= t '.name'
%th= t '.user'
%th= t '.last_ordered'
%tbody
- for ordergroup in @ordergroups
%tr
%td= ordergroup.name
%td=h ordergroup.users.collect { |u| u.nick }.join(", ")
%td= format_date ordergroup.orders.order('orders.starts DESC').first.try(:starts)
%td= link_to_new_message(message_params: {group_id: ordergroup.id})