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

26 lines
1.3 KiB
Text
Raw Permalink Normal View History

- if Ordergroup.count > 20
= items_per_page
= pagination_links_remote @ordergroups
%table.table.table-striped
%thead
%tr
%th= sort_link_helper heading_helper(Ordergroup, :name), "name"
%th= sort_link_helper heading_helper(Ordergroup, :user_tokens), "members_count"
%th= heading_helper Ordergroup, :contact_address
%th= sort_link_helper heading_helper(Ordergroup, :last_user_activity), "last_user_activity"
%th= sort_link_helper heading_helper(Ordergroup, :last_order), "last_order"
2013-12-12 00:13:19 +01:00
%th= t 'ui.actions'
%tbody
- for ordergroup in @ordergroups
%tr{:class => cycle('even','odd', :name => 'groups')}
%td= link_to ordergroup.name, [:admin, ordergroup]
%td{title: ordergroup_members_title(ordergroup)}
%abbr{title: ordergroup_members_title(ordergroup)}= ordergroup.users.size
%td= link_to_gmaps ordergroup.contact_address
%td= format_date ordergroup.last_user_activity
%td= format_date ordergroup.last_order.try(:starts)
%td
= link_to t('ui.edit'), edit_admin_ordergroup_path(ordergroup), class: 'btn btn-mini'
= link_to t('ui.delete'), [:admin, ordergroup], :data => {:confirm => t('ui.confirm_delete', name: ordergroup.name)},
:method => :delete, class: 'btn btn-mini btn-danger'