Tweaking the producer modal

This commit is contained in:
Will Marshall
2014-06-27 14:07:12 +10:00
parent 03c84cbfe5
commit e4c8c19fea
4 changed files with 8 additions and 4 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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