mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Tweaking the producer modal
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
Darkswarm.directive "producerModal", ($modal)->
|
||||
restrict: 'E'
|
||||
replace: true
|
||||
template: "<a>{{enterprise.name}}</a>"
|
||||
template: "<a ng-transclude></a>"
|
||||
transclude: true
|
||||
link: (scope, elem, attrs, ctrl)->
|
||||
elem.on "click", =>
|
||||
scope.modalInstance = $modal.open(controller: ctrl, templateUrl: 'producer_modal.html', scope: scope)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user