2012-10-15 21:19:17 +02:00
|
|
|
- if Ordergroup.count > 20
|
|
|
|
= items_per_page
|
|
|
|
= pagination_links_remote @ordergroups
|
|
|
|
%table.table.table-striped
|
2009-01-14 12:46:01 +01:00
|
|
|
%thead
|
|
|
|
%tr
|
2022-05-27 17:06:25 +02:00
|
|
|
%th= sort_link_helper heading_helper(Ordergroup, :name), "name"
|
|
|
|
%th= sort_link_helper heading_helper(Ordergroup, :user_tokens), "members_count"
|
2016-03-04 16:28:18 +01:00
|
|
|
%th= heading_helper Ordergroup, :contact_address
|
2022-05-27 17:06:25 +02:00
|
|
|
%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'
|
2009-01-14 12:46:01 +01:00
|
|
|
%tbody
|
|
|
|
- for ordergroup in @ordergroups
|
|
|
|
%tr{:class => cycle('even','odd', :name => 'groups')}
|
|
|
|
%td= link_to ordergroup.name, [:admin, ordergroup]
|
2016-03-04 16:28:18 +01:00
|
|
|
%td{title: ordergroup_members_title(ordergroup)}
|
|
|
|
%abbr{title: ordergroup_members_title(ordergroup)}= ordergroup.users.size
|
2009-02-02 16:35:43 +01:00
|
|
|
%td= link_to_gmaps ordergroup.contact_address
|
2016-03-04 16:28:18 +01:00
|
|
|
%td= format_date ordergroup.last_user_activity
|
2022-05-27 17:06:25 +02:00
|
|
|
%td= format_date ordergroup.last_order.try(:starts)
|
2009-01-14 12:46:01 +01:00
|
|
|
%td
|
2013-04-04 02:49:52 +02:00
|
|
|
= link_to t('ui.edit'), edit_admin_ordergroup_path(ordergroup), class: 'btn btn-mini'
|
2016-03-04 20:10:11 +01:00
|
|
|
= link_to t('ui.delete'), [:admin, ordergroup], :data => {:confirm => t('ui.confirm_delete', name: ordergroup.name)},
|
2013-04-04 02:49:52 +02:00
|
|
|
:method => :delete, class: 'btn btn-mini btn-danger'
|