mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Bunch of minor bugfixes
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
Darkswarm.controller "ProducersTabCtrl", ($scope, CurrentHub) ->
|
||||
Darkswarm.controller "ProducersTabCtrl", ($scope, CurrentHub, Enterprises) ->
|
||||
# Injecting Enterprises so CurrentHub.producers is dereferenced
|
||||
$scope.CurrentHub = CurrentHub
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
{{ enterprise.phone }}
|
||||
|
||||
%p{"ng-if" => "enterprise.email"}
|
||||
%a{"ng-href" => "mailto:{{enterprise.email | stripUrl}}", target: "_blank" }
|
||||
{{ enterprise.email | stripUrl }}
|
||||
%a{"ng-href" => "{{enterprise.email | stripUrl}}", target: "_blank", mailto: true}
|
||||
%span.email
|
||||
{{ enterprise.email | stripUrl }}
|
||||
|
||||
%p{"ng-if" => "enterprise.website"}
|
||||
%a{"ng-href" => "http://{{enterprise.website | stripUrl}}", target: "_blank" }
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
%li{"ng-repeat" => "enterprise in hub.producers"}
|
||||
= render partial: "modals/producer"
|
||||
|
||||
.row.active_table_row.link{"ng-show" => "open()", "bo-if" => "hub.active"}
|
||||
.row.active_table_row.link{"ng-show" => "open()"}
|
||||
.cta-container.columns.small-12
|
||||
.row
|
||||
.columns.small-12
|
||||
|
||||
@@ -13,8 +13,10 @@ end
|
||||
node :delivery do |hub|
|
||||
hub.shipping_methods.where(:require_ship_address => true).present?
|
||||
end
|
||||
node :active do |hub|
|
||||
@active_distributors.include?(hub)
|
||||
if @active_distributors
|
||||
node :active do |hub|
|
||||
@active_distributors.include?(hub)
|
||||
end
|
||||
end
|
||||
node :orders_close_at do |hub|
|
||||
OrderCycle.first_closing_for(hub).andand.orders_close_at
|
||||
|
||||
@@ -23,8 +23,9 @@
|
||||
{{ enterprise.phone }}
|
||||
|
||||
%p{"bo-if" => "enterprise.email"}
|
||||
%a{"ng-href" => "mailto:{{enterprise.email | stripUrl}}", target: "_blank" }
|
||||
{{ enterprise.email | stripUrl }}
|
||||
%a{"ng-href" => "{{enterprise.email | stripUrl}}", target: "_blank", mailto: true }
|
||||
%span.email
|
||||
{{ enterprise.email | stripUrl }}
|
||||
|
||||
%p{"bo-show" => "enterprise.website"}
|
||||
%a{"ng-href" => "http://{{enterprise.website}}", target: "_blank" }
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
name: "variants[{{product.master.id}}]",
|
||||
id: "variants_{{product.master.id}}",
|
||||
"ng-model" => "product.quantity"}
|
||||
%small {{ product.master.unit_to_display }}
|
||||
%small x {{ product.master.unit_to_display }}
|
||||
|
||||
-# WITH GROUP BUY
|
||||
.small-2.columns{"bo-if" => "product.group_buy"}
|
||||
@@ -36,7 +36,7 @@
|
||||
max: "{{product.on_demand && 9999 || product.count_on_hand }}",
|
||||
name: "variant_attributes[{{product.master.id}}][max_quantity]",
|
||||
"ng-model" => "product.max_quantity"}
|
||||
{{ product.master.unit_to_display }}
|
||||
%small x {{ product.master.unit_to_display }}
|
||||
|
||||
.small-2.columns.text-right
|
||||
{{ product.price | currency }}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
max: "{{variant.on_demand && 9999 || variant.count_on_hand }}",
|
||||
name: "variants[{{variant.id}}]", id: "variants_{{variant.id}}",
|
||||
"bo-model" => "variant.quantity"}
|
||||
%small {{ variant.unit_to_display }}
|
||||
%small x {{ variant.unit_to_display }}
|
||||
|
||||
-# WITH GROUP BUY
|
||||
.small-2.columns{"bo-if" => "product.group_buy"}
|
||||
@@ -39,7 +39,7 @@
|
||||
max: "{{variant.on_demand && 9999 || variant.count_on_hand }}",
|
||||
name: "variant_attributes[{{variant.id}}][max_quantity]",
|
||||
"ng-model" => "variant.max_quantity"}
|
||||
%small {{ variant.unit_to_display }}
|
||||
%small x {{ variant.unit_to_display }}
|
||||
|
||||
.small-2.columns.text-right.price
|
||||
{{ variant.price | currency }}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
= inject_enterprises
|
||||
|
||||
.darkswarm
|
||||
- content_for :order_cycle_form do
|
||||
%strong.avenir
|
||||
|
||||
Reference in New Issue
Block a user