Files
openfoodnetwork/app/views/admin/enterprise_groups/index.html.haml
2013-11-28 16:13:13 +11:00

31 lines
1.2 KiB
Plaintext

= content_for :page_title do
Enterprise Groups
= content_for :page_actions do
%li#new_enterprise_group_link
= button_link_to "New Enterprise Group", main_app.new_admin_enterprise_group_path, :icon => 'add', :id => 'admin_new_enterprise_group_link'
%table.index#listing_enterprise_groups
%thead
%tr
%th Name
%th On front page?
%th Enterprises
%th.actions
%tbody
- @enterprise_groups.each do |enterprise_group|
%tr
%td.name= enterprise_group.name
%td= enterprise_group.on_front_page ? 'Y' : 'N'
%td= enterprise_group.enterprises.map(&:name).join ', '
%td.actions
= link_to '', main_app.edit_admin_enterprise_group_path(enterprise_group), class: 'edit-enterprise-group icon-edit no-text'
= link_to_delete enterprise_group, no_text: true
- if enterprise_group.last?
.blank-action
- else
= link_to_with_icon 'icon-arrow-down', '', main_app.admin_enterprise_group_move_down_path(enterprise_group), class: 'move-down no-text'
= link_to_with_icon 'icon-arrow-up', '', main_app.admin_enterprise_group_move_up_path(enterprise_group), class: 'move-up no-text' unless enterprise_group.first?