Bunch of minor bugfixes

This commit is contained in:
Will Marshall
2014-06-24 13:01:51 +10:00
parent 9099fca11c
commit f7ba8cade0
8 changed files with 19 additions and 12 deletions

View File

@@ -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

View File

@@ -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" }

View File

@@ -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

View File

@@ -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

View File

@@ -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" }

View File

@@ -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 }}

View File

@@ -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 }}

View File

@@ -1,3 +1,5 @@
= inject_enterprises
.darkswarm
- content_for :order_cycle_form do
%strong.avenir