From 29cf40a5bf583d9c47bd2dea8faa391ce0228f29 Mon Sep 17 00:00:00 2001 From: Rob H Date: Thu, 24 Apr 2014 15:35:59 +1000 Subject: [PATCH] Add visual indication that no payment/shipping/fees exist to enterprise index --- app/views/admin/enterprises/index.html.erb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/views/admin/enterprises/index.html.erb b/app/views/admin/enterprises/index.html.erb index 7ff2d597bb..c44759be3f 100644 --- a/app/views/admin/enterprises/index.html.erb +++ b/app/views/admin/enterprises/index.html.erb @@ -39,10 +39,19 @@ <%= 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 %>)
+ <%= link_to_with_icon 'icon-chevron-right', 'Payment Methods', spree.admin_payment_methods_path(enterprise_id: enterprise.id) %> (<%= enterprise.payment_methods.count %>) + <% if enterprise.payment_methods.count == 0 %> + + <% end %>
+ <%= link_to_with_icon 'icon-plane', 'Shipping Methods', spree.admin_shipping_methods_path(enterprise_id: enterprise.id) %> (<%= enterprise.shipping_methods.count %>) + <% if enterprise.shipping_methods.count == 0 %> + + <% end %>
<% end %> <%= link_to_with_icon 'icon-money', 'Enterprise Fees', main_app.admin_enterprise_fees_path(enterprise_id: enterprise.id) %> (<%= enterprise.enterprise_fees.count %>) + <% if enterprise.enterprise_fees.count == 0 %> + + <% end %> <% end %>