diff --git a/app/views/home/_fat.html.haml b/app/views/home/_fat.html.haml index 823e96a37e..67c83b73cb 100644 --- a/app/views/home/_fat.html.haml +++ b/app/views/home/_fat.html.haml @@ -12,8 +12,7 @@ %strong Our producers %ul %li{"ng-repeat" => "producer in hub.producers"} - %ofn-modal{title: "{{ producer.name }}"} - {{ producer || json }} + = render partial: "modals/producer" .row.active_table_row.link{"ng-show" => "open()", "ng-if" => "hub.active"} .columns.small-11 diff --git a/app/views/json/_hubs.rabl b/app/views/json/_hubs.rabl index a6958840bc..60cad8fbbf 100644 --- a/app/views/json/_hubs.rabl +++ b/app/views/json/_hubs.rabl @@ -6,7 +6,11 @@ child distributed_taxons: :taxons do end child suppliers: :producers do - attributes :name, :id + attributes :name, :id, :description, :long_description + + node :promo_image do |producer| + producer.promo_image.url + end end node :pickup do |hub| diff --git a/app/views/modals/_producer.html.haml b/app/views/modals/_producer.html.haml new file mode 100644 index 0000000000..691e9378d3 --- /dev/null +++ b/app/views/modals/_producer.html.haml @@ -0,0 +1,13 @@ +%ofn-modal{title: "{{ producer.name }}"} + #producer_modal{bindonce: true} + .row + .small-12.columns + %img{"bo-src" => "producer.promo_image"} + %h3 {{ producer.name }} + + .row + .small-6.columns + %p + {{ producer.description }} + .small-6.columns + Stay in touch with {{ producer.name }}