diff --git a/app/assets/javascripts/darkswarm/directives/producer_modal.js.coffee b/app/assets/javascripts/darkswarm/directives/producer_modal.js.coffee index d64b2663f7..a8d8253289 100644 --- a/app/assets/javascripts/darkswarm/directives/producer_modal.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/producer_modal.js.coffee @@ -1,7 +1,9 @@ Darkswarm.directive "producerModal", ($modal)-> restrict: 'E' replace: true - template: "{{enterprise.name}}" + template: "" + transclude: true link: (scope, elem, attrs, ctrl)-> elem.on "click", => scope.modalInstance = $modal.open(controller: ctrl, templateUrl: 'producer_modal.html', scope: scope) + diff --git a/app/views/groups/index.html.haml b/app/views/groups/index.html.haml index dd37a32b78..059abfe882 100644 --- a/app/views/groups/index.html.haml +++ b/app/views/groups/index.html.haml @@ -42,6 +42,7 @@ %li{"ng-repeat" => "enterprise in group.enterprises", "scroll-after-load" => true} %hub-modal{"ng-if" => "enterprise.is_distributor"} %producer-modal{"ng-if" => "!enterprise.is_distributor", "show-hub-actions" => 'true'} + {{ enterprise.name }} .row.group_footer .small-12.columns diff --git a/app/views/home/_fat.html.haml b/app/views/home/_fat.html.haml index 8de0524ea3..16dc3eaafb 100644 --- a/app/views/home/_fat.html.haml +++ b/app/views/home/_fat.html.haml @@ -28,7 +28,7 @@ Our producers %ul.bullet-list %li{"ng-repeat" => "enterprise in hub.producers"} - %producer-modal + %producer-modal {{ enterprise.name }} .row.active_table_row.link{"ng-show" => "open()"} .cta-container.columns.small-12 diff --git a/app/views/shop/products/_summary.html.haml b/app/views/shop/products/_summary.html.haml index ec018065c8..71982ae682 100644 --- a/app/views/shop/products/_summary.html.haml +++ b/app/views/shop/products/_summary.html.haml @@ -1,10 +1,11 @@ .row.summary .small-1.columns - %img{"bo-src" => "product.master.images[0].small_url"} + %producer-modal + %img{"bo-src" => "product.master.images[0].small_url"} .small-4.columns.summary-header %render-svg{path: "{{product.primary_taxon.icon}}"} - = render partial: "modals/product" + %producer-modal {{ enterprise.name }} .small-5.columns %i.ofn-i_036-producers