Files
openfoodnetwork/app/views/enterprises/show.html.haml
2013-11-06 15:36:39 +11:00

19 lines
609 B
Plaintext

- if @enterprise != current_distributor
%h2= @enterprise.name
.enterprise-description= @enterprise.long_description.andand.html_safe
- if current_distributor
= render :template => 'spree/products/index'
- else
%h3 Hubs that distribute our products
%p.hint Select a hub to start shopping:
%ul#supplier-distributors
- if @distributors.delete @enterprise
%li= link_to "Buy direct from the farm", shop_enterprise_path(@enterprise), {class: distributor_link_class(@enterprise)}
- @distributors.each do |distributor|
%li= render partial: "shared/distributor", object: distributor