mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-04 07:09:14 +00:00
Using enterprise in modals
This commit is contained in:
@@ -3,6 +3,7 @@ Darkswarm.factory "MapModal", ($modal, $rootScope)->
|
||||
open: (enterprise)->
|
||||
scope = $rootScope.$new(true) # Spawn an isolate to contain the enterprise
|
||||
|
||||
scope.enterprise = enterprise
|
||||
if enterprise.is_distributor
|
||||
scope.hub = enterprise
|
||||
$modal.open(templateUrl: "map_modal_hub.html", scope: scope)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
%div.modal-centered{"bo-if" => "producer.email || producer.website || producer.address.phone"}
|
||||
%div.modal-centered{"bo-if" => "enterprise.email || enterprise.website || enterprise.address.phone"}
|
||||
%h5.modal-header Contact
|
||||
%p{"ng-if" => "producer.address.phone"}
|
||||
{{ producer.address.phone }}
|
||||
%p{"ng-if" => "enterprise.address.phone"}
|
||||
{{ enterprise.address.phone }}
|
||||
|
||||
%p{"bo-if" => "producer.email"}
|
||||
%a{"ng-href" => "mailto:{{producer.email | stripUrl}}", target: "_blank" }
|
||||
{{ producer.email | stripUrl }}
|
||||
%p{"bo-if" => "enterprise.email"}
|
||||
%a{"ng-href" => "mailto:{{enterprise.email | stripUrl}}", target: "_blank" }
|
||||
{{ enterprise.email | stripUrl }}
|
||||
|
||||
%p{"ng-if" => "producer.website"}
|
||||
%a{"ng-href" => "http://{{producer.website | stripUrl}}", target: "_blank" }
|
||||
{{ producer.website | stripUrl }}
|
||||
%p{"ng-if" => "enterprise.website"}
|
||||
%a{"ng-href" => "http://{{enterprise.website | stripUrl}}", target: "_blank" }
|
||||
{{ enterprise.website | stripUrl }}
|
||||
|
||||
Reference in New Issue
Block a user