mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Add informational warnings to admin enterprises index page
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<table class="index" id="listing_enterprises">
|
||||
<colgroup>
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 5%;">
|
||||
<col style="width: 10%;">
|
||||
<col>
|
||||
<col style="width: 20%;">
|
||||
</colgroup>
|
||||
@@ -31,7 +31,13 @@
|
||||
<% enterprise = enterprise_form.object %>
|
||||
<tr class="enterprise-<%= enterprise.id %>">
|
||||
<td><%= link_to enterprise.name, main_app.admin_enterprise_path(enterprise) %></td>
|
||||
<td><%= 'PP ' if enterprise.is_primary_producer %><%= 'D' if enterprise.is_distributor %></td>
|
||||
<td><% if enterprise.is_primary_producer && enterprise.is_distributor %> Producer & Distributor
|
||||
<% elsif enterprise.is_distributor %> Distributor
|
||||
<% elsif enterprise.is_primary_producer %> Producer
|
||||
<% else %>
|
||||
<h1 class = "icon-exclamation-sign with-tip" style = "text-align: center;color: #DA5354" data-powertip = "This enterprise does not have any roles"></h1>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= enterprise.description %></td>
|
||||
<td data-hook="admin_users_index_row_actions">
|
||||
|
||||
@@ -41,16 +47,16 @@
|
||||
<% 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 %>)
|
||||
<% if enterprise.payment_methods.count == 0 %>
|
||||
<span class = "icon-info-sign with-tip" style = "color: #DA5354" data-powertip = "You have no payment methods!"></span>
|
||||
<span class = "icon-exclamation-sign with-tip" style = "font-size: 16px;color: #DA5354" data-powertip = "This enterprise has no payment methods"></span>
|
||||
<% end %><br />
|
||||
<%= 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 %>
|
||||
<span class = "icon-info-sign with-tip" style = "color: #DA5354" data-powertip = "You have no shipping methods!"></span>
|
||||
<span class = "icon-exclamation-sign with-tip" style = "font-size: 16px;color: #DA5354" data-powertip = "This enterprise has shipping methods"></span>
|
||||
<% end %><br />
|
||||
<% 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 %>
|
||||
<span class = "icon-warning-sign with-tip" style = "color: orange" data-powertip = "You have no enterprise fees!"></span>
|
||||
<span class = "icon-warning-sign with-tip" style = "font-size: 16px;color: orange" data-powertip = "This enterprise has no fees"></span>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user