mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-25 05:45:15 +00:00
Added bindonce and ng-if improvements to Producers templates
This commit is contained in:
@@ -1,68 +1,68 @@
|
||||
.row.active_table_row{"ng-show" => "open()", "ng-click" => "toggle()", "ng-class" => "{'open' : !ofn-i_032-closed-sign()}"}
|
||||
.row.active_table_row{"ng-if" => "open()", "ng-click" => "toggle()", "ng-class" => "{'open' : !ofn-i_032-closed-sign()}"}
|
||||
|
||||
.columns.small-12.medium-7.large-7.fat
|
||||
/ Will add in long description available once clean up HTML formatting producer.long_description
|
||||
%div{"bo-if" => "producer.description"}
|
||||
%label About us
|
||||
%img.right.show-for-medium-up{"ng-src" => "{{producer.logo}}" }
|
||||
%p.text-small
|
||||
{{ producer.description }}
|
||||
%img.right.show-for-medium-up{"bo-src" => "producer.logo" }
|
||||
%p.text-small{ "bo-text" => "producer.description"}
|
||||
%div.show-for-medium-up{"bo-if" => "producer.description.length==0"}
|
||||
%label
|
||||
|
||||
.columns.small-12.medium-5.large-5.fat
|
||||
|
||||
%div{"ng-if" => "producer.supplied_taxons"}
|
||||
%div{"bo-if" => "producer.supplied_taxons"}
|
||||
%label Shop for
|
||||
%p.trans-sentence
|
||||
%span.fat-taxons{"ng-repeat" => "taxon in producer.supplied_taxons"}
|
||||
%render-svg{path: "{{taxon.icon}}"}
|
||||
{{taxon.name}}
|
||||
%span{"bo-text" => "taxon.name"}
|
||||
|
||||
%div.show-for-medium-up{"ng-if" => "producer.supplied_taxons.length==0"}
|
||||
|
||||
|
||||
%div{"ng-if" => "producer.email || producer.website || producer.phone"}
|
||||
%div{"bo-if" => "producer.email || producer.website || producer.phone"}
|
||||
%label Contact
|
||||
|
||||
%p.word-wrap{"ng-if" => "producer.phone"}
|
||||
Call {{ producer.phone }}
|
||||
%p.word-wrap{"bo-if" => "producer.phone"}
|
||||
Call
|
||||
%span{"bo-text" => "producer.phone"}
|
||||
|
||||
%p.word-wrap{"ng-if" => "producer.email"}
|
||||
%a{"ng-href" => "{{producer.email | stripUrl}}", target: "_blank", mailto: true}
|
||||
%span.email {{ producer.email | stripUrl }}
|
||||
%p.word-wrap{"bo-if" => "producer.email"}
|
||||
%a{"bo-href" => "producer.email | stripUrl", target: "_blank", mailto: true}
|
||||
%span.email{"bo-bind" => "producer.email | stripUrl"}
|
||||
|
||||
%p.word-wrap{"ng-if" => "producer.website"}
|
||||
%a{"ng-href" => "http://{{producer.website | stripUrl}}", target: "_blank" }
|
||||
%span {{ producer.website | stripUrl }}
|
||||
%p.word-wrap{"bo-if" => "producer.website"}
|
||||
%a{"bo-href-i" => "http://{{producer.website | stripUrl}}", target: "_blank" }
|
||||
%span{"bo-bind" => "producer.website | stripUrl"}
|
||||
|
||||
%div{"ng-if" => "producer.twitter || producer.facebook || producer.linkedin || producer.instagram"}
|
||||
%div{"bo-if" => "producer.twitter || producer.facebook || producer.linkedin || producer.instagram"}
|
||||
%label Follow
|
||||
.follow-icons{bindonce: true}
|
||||
%span{"ng-if" => "producer.twitter"}
|
||||
%a{"ng-href" => "http://twitter.com/{{producer.twitter}}", target: "_blank"}
|
||||
%span{"bo-if" => "producer.twitter"}
|
||||
%a{"bo-href-i" => "http://twitter.com/{{producer.twitter}}", target: "_blank"}
|
||||
%i.ofn-i_041-twitter
|
||||
|
||||
%span{"ng-if" => "producer.facebook"}
|
||||
%a{"ng-href" => "http://{{producer.facebook | stripUrl}}", target: "_blank"}
|
||||
%span{"bo-if" => "producer.facebook"}
|
||||
%a{"bo-href-i" => "http://{{producer.facebook | stripUrl}}", target: "_blank"}
|
||||
%i.ofn-i_044-facebook
|
||||
|
||||
%span{"ng-if" => "producer.linkedin"}
|
||||
%a{"ng-href" => "http://{{producer.linkedin | stripUrl}}", target: "_blank"}
|
||||
%span{"bo-if" => "producer.linkedin"}
|
||||
%a{"bo-href-i" => "http://{{producer.linkedin | stripUrl}}", target: "_blank"}
|
||||
%i.ofn-i_042-linkedin
|
||||
|
||||
%span{"ng-if" => "producer.instagram"}
|
||||
%a{"ng-href" => "http://instagram.com/{{producer.instagram}}", target: "_blank"}
|
||||
%span{"bo-if" => "producer.instagram"}
|
||||
%a{"bo-href-i" => "http://instagram.com/{{producer.instagram}}", target: "_blank"}
|
||||
%i.ofn-i_043-instagram
|
||||
|
||||
.row.active_table_row.pad-top{"ng-show" => "open()", "bo-if" => "producer.hubs"}
|
||||
.row.active_table_row.pad-top{"ng-if" => "open()", "bo-if" => "producer.hubs"}
|
||||
.columns.small-12
|
||||
.row
|
||||
.columns.small-12.fat
|
||||
%div{"bo-if" => "producer.name"}
|
||||
%label
|
||||
Shop for
|
||||
%span.turquoise {{ producer.name }}
|
||||
%span.turquoise{"bo-text" => "producer.name"}
|
||||
products at:
|
||||
%div.show-for-medium-up{"bo-if" => "!producer.name"}
|
||||
|
||||
@@ -73,6 +73,6 @@
|
||||
"bo-class" => "{primary: hub.active, secondary: !hub.active}"}
|
||||
%i.ofn-i_033-open-sign{"bo-if" => "hub.active"}
|
||||
%i.ofn-i_032-closed-sign{"bo-if" => "!hub.active"}
|
||||
.hub-name {{hub.name}}
|
||||
.button-address {{ [hub.address.city, hub.address.state_name] | printArray }}
|
||||
.hub-name{"bo-text" => "hub.name"}
|
||||
.button-address{"bo-bind" => "[hub.address.city, hub.address.state_name] | printArray"}
|
||||
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
.columns.small-12.medium-4.large-4.skinny-head
|
||||
%span{"bo-if" => "producer.is_distributor" }
|
||||
%a.is_distributor{"bo-href" => "producer.path" }
|
||||
%i{ng: {class: "producer.producer_icon_font"}}
|
||||
%i{bo: {class: "producer.producer_icon_font"}}
|
||||
%span.margin-top
|
||||
%strong {{ producer.name }}
|
||||
%strong{"bo-text" => "producer.name"}
|
||||
%span.producer-name{"bo-if" => "!producer.is_distributor" }
|
||||
%i{ng: {class: "producer.producer_icon_font"}}
|
||||
%i{bo: {class: "producer.producer_icon_font"}}
|
||||
%span.margin-top
|
||||
%strong {{ producer.name }}
|
||||
%strong{"bo-text" => "producer.name"}
|
||||
|
||||
|
||||
.columns.small-6.medium-3.large-3
|
||||
%span.margin-top {{ producer.address.city }}
|
||||
%span.margin-top{"bo-text" => "producer.address.city"}
|
||||
.columns.small-4.medium-3.large-4
|
||||
%span.margin-top {{ producer.address.state_name | uppercase }}
|
||||
%span.margin-top{"bo-bind" => "producer.address.state_name | uppercase"}
|
||||
.columns.small-2.medium-2.large-1.text-right
|
||||
%span.margin-top
|
||||
%i{"ng-class" => "{'ofn-i_005-caret-down' : !open(), 'ofn-i_006-caret-up' : open()}"}
|
||||
|
||||
Reference in New Issue
Block a user