Files
openfoodnetwork/app/assets/javascripts/templates/out_of_stock.html.haml
Gaetan Craig-Riou 4a2f22e56d Add OutOfStockModalComponent
It encapsulate the logic for the out of stock modal
2025-02-18 10:47:03 +11:00

17 lines
606 B
Plaintext

// please update the modal html in app/components/out_of_stock_modal_component/out_of_stock_modal_component.html.haml if updating this template
%a.close-reveal-modal{"ng-click" => "$close()"}
%i.ofn-i_009-close
%h3
{{ 'js.out_of_stock.reduced_stock_available' | t }}
%p
{{ 'js.out_of_stock.out_of_stock_text' | t }}
%p{'ng-repeat' => "v in variants"}
%em {{ v.name_to_display }} - {{ v.unit_to_display }}
%span{'ng-if' => "v.on_hand == 0"}
{{ 'js.out_of_stock.now_out_of_stock' | t }}
%span{'ng-if' => "v.on_hand > 0"}
{{ 'js.out_of_stock.only_n_remaining' | t:{ num: v.on_hand } }}