<% content_for :page_title do %> Enterprises <% end %> <% content_for :page_actions do %> <% end %> <%= form_for @enterprise_set, :url => main_app.bulk_update_admin_enterprises_path do |f| %> <%= f.fields_for :collection do |enterprise_form| %> <% enterprise = enterprise_form.object %> <% end %> <% if @enterprises.empty? %> <% end %>
Name Role Next Collection Date/Time Description
<%= link_to enterprise.name, main_app.admin_enterprise_path(enterprise) %> <%= 'PP ' if enterprise.is_primary_producer %><%= 'D' if enterprise.is_distributor %> <%= enterprise_form.text_field :next_collection_at %> <%= enterprise.description %> <%= link_to_with_icon('icon-edit', 'Edit Profile', main_app.edit_admin_enterprise_path(enterprise), class: 'edit') %>
<%= link_to_delete_enterprise enterprise %>
<% if enterprise.is_distributor %> <%= link_to_with_icon 'icon-chevron-right', 'Payment Methods', spree.admin_payment_methods_path(enterprise_id: enterprise.id) %> (<%= enterprise.payment_methods.count %>)
<%= link_to_with_icon 'icon-plane', 'Shipping Methods', spree.admin_shipping_methods_path(enterprise_id: enterprise.id) %> (<%= enterprise.shipping_methods.count %>)
<% end %> <%= link_to_with_icon 'icon-money', 'Enterprise Fees', main_app.admin_enterprise_fees_path(enterprise_id: enterprise.id) %> (<%= enterprise.enterprise_fees.count %>)
<%= t(:none) %>
<%= f.submit 'Update' %> <% end %>