mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-03 22:06:07 +00:00
Fixes #2112
It looks like this bug was accidentally introduced during a refactor in
e5ca494db8. The `bo-html` attribute was
replaced with `ng-html`, but it appears that it should actually have
used `ng-bind-html`
(https://docs.angularjs.org/api/ng/directive/ngBindHtml) because the
former is not a valid AngularJS directive.
It was also necessary to bubble up the `.cta-container` class in order to
get the appropriate styling on the title.
21 lines
1.2 KiB
Plaintext
21 lines
1.2 KiB
Plaintext
-# Show places to buy products from this producer, when there are any
|
|
-# Do not show this for producer shops selling only their own produce,
|
|
-# Since a shopping link will already have been displayed in hub_details.html.haml
|
|
.row.active_table_row.pad-top{ "ng-if" => "enterprise.is_primary_producer && enterprise.hubs.length > 0 && !(enterprise.hubs.length == 1 && enterprise.hubs[0] == enterprise)"}
|
|
.columns.small-12.cta-container
|
|
.row
|
|
.columns.small-12.fat
|
|
%div{"ng-if" => "::enterprise.name"}
|
|
%label{"ng-bind-html" => "::'shop_for_products_html' | t:{enterprise: enterprise.name}"}
|
|
%div.show-for-medium-up{"ng-if" => "::!enterprise.name"}
|
|
|
|
.row
|
|
.columns.small-12
|
|
%a.cta-hub{"ng-repeat" => "hub in enterprise.hubs | filter:{id: '!'+enterprise.id} | orderBy:'-active'",
|
|
"ng-href" => "{{::hub.path}}", "ofn-empties-cart" => "hub",
|
|
"ng-class" => "::{primary: hub.active, secondary: !hub.active}"}
|
|
.hub-name{"ng-bind" => "::hub.name"}
|
|
%span{"ng-if" => "::hub.active"} ({{'maps_open' | t}})
|
|
%span{"ng-if" => "::!hub.active"} ({{'maps_closed' | t}})
|
|
.button-address{"ng-bind" => "::[hub.address.city, hub.address.state_name] | printArray"}
|