move checks and links in sidebars

This commit is contained in:
Rafael Schouten
2014-09-26 17:57:45 +10:00
parent e480d3a135
commit dee869a273
6 changed files with 37 additions and 30 deletions

View File

@@ -33,6 +33,9 @@ div.sidebar_item
color: #DA5354
.list-item
.icon-arrow-right
padding-top: 6px
font-size: 20px
border: solid #5498da
border-width: 0px 1px 0px 1px
a.alpha, span.alpha
@@ -40,7 +43,6 @@ div.sidebar_item
margin-left: -1px
padding: 10px 2px 10px 5%
overflow: hidden
max-width: 160px
text-overflow: ellipsis
span.omega
padding: 8px 18px 8px 0px
@@ -72,4 +74,4 @@ div.sidebar_item
background-color: #DA5354
&:hover
background-color: #9fc820

View File

@@ -6,11 +6,13 @@
-# = hidden_field_tag "enterprise[payment_method_ids][]", []
- @payment_methods.each do |payment_method|
%span.four.columns.alpha.list-item{ class: "#{cycle('odd','even')}", ng: { controller: 'paymentMethodCtrl', init: "findPaymentMethodByID(#{payment_method.id})" } }
%span.three.columns.alpha
%label
= f.check_box :payment_method_ids, { multiple: true, 'ng-model' => 'PaymentMethod.selected' }, payment_method.id, nil
= payment_method.name
%a.one.column.omega{ href: "#{edit_admin_payment_method_path(payment_method)}" }Link
%span.four.columns
%span.three.columns.alpha
%label
= f.check_box :payment_method_ids, { multiple: true, 'ng-model' => 'PaymentMethod.selected' }, payment_method.id, nil
= payment_method.name
%a.one.columns.omega{ href: "#{edit_admin_payment_method_path(payment_method)}" }
%span.icon-arrow-right
- else
.four.columns.alpha.list-item
%span.three.columns.alpha None Available

View File

@@ -5,12 +5,13 @@
- if @shipping_methods.count > 0
- @shipping_methods.each do |shipping_method|
%span.four.columns.alpha.list-item{ class: "#{cycle('odd','even')}", ng: { controller: 'shippingMethodCtrl', init: "findShippingMethodByID(#{shipping_method.id})" } }
%span.three.columns.alpha
%label
= f.check_box :shipping_method_ids, { :multiple => true, 'ng-model' => 'ShippingMethod.selected' }, shipping_method.id, nil
= shipping_method.name
%a.one.column.omega{ href: "#{edit_admin_shipping_method_path(shipping_method)}" }
Link
%span.four.columns
%span.three.columns.alpha
%label
= f.check_box :shipping_method_ids, { :multiple => true, 'ng-model' => 'ShippingMethod.selected' }, shipping_method.id, nil
= shipping_method.name
%a.one.columns.omega{ href: "#{edit_admin_shipping_method_path(shipping_method)}" }
%span.one.column.alpha.icon-arrow-right
- else
.four.columns.alpha.list-item
%span.three.columns.alpha None Available

View File

@@ -8,11 +8,13 @@
= hidden_field klass, :distributor_ids, :multiple => true, value: nil
- @hubs.each do |hub|
%span.four.columns.alpha.list-item{ class: "#{cycle('odd','even')}" }
%span.three.columns.omega
%label
= check_box klass, :distributor_ids, { multiple: true }, hub.id, nil
= hub.name
%a.one.column.alpha{ href: "#{main_app.edit_admin_enterprise_path(hub)}" }Link
%span.four.columns
%span.three.columns.alpha
%label
= check_box klass, :distributor_ids, { multiple: true }, hub.id, nil
= hub.name
%a.one.column.omega{ href: "#{main_app.edit_admin_enterprise_path(hub)}" }
%span.icon-arrow-right
- else
.four.columns.alpha.list-item
%span.three.columns.alpha None Available

View File

@@ -28,11 +28,11 @@ Order Total: #{@order.display_total}
Your order will be delivered to:
#{@order.ship_address.to_s}
- if @order.order_cycle.andand.pickup_time_for(@order.distributor)
Delivery on: #{@order.order_cycle.pickup_time_for(@order.distributor)}
- if @order.order_cycle.andand.pickup_time_for(@order.distributor)
Delivery on: #{@order.order_cycle.pickup_time_for(@order.distributor)}
- if @order.order_cycle.andand.pickup_instructions_for(@order.distributor)
Other delivery information: #{@order.order_cycle.pickup_instructions_for(@order.distributor)}
- if @order.order_cycle.andand.pickup_instructions_for(@order.distributor)
Other delivery information: #{@order.order_cycle.pickup_instructions_for(@order.distributor)}
- else
\

View File

@@ -11,11 +11,16 @@ require 'spree/product_filters'
Spree.config do |config|
config.shipping_instructions = true
config.checkout_zone = 'Australia'
config.checkout_zone = ENV["CHECKOUT_ZONE"]
config.address_requires_state = true
# 12 should be Australia. Hardcoded for CI (Jenkins), where countries are not pre-loaded.
config.default_country_id = 12
if Rails.env.test? or Rails.env.development?
config.default_country_id = 12
else
country = Spree::Country.find_by_name(ENV["DEFAULT_COUNTRY"])
config.default_country_id = country.id if country.present?
end
# -- spree_paypal_express
# Auto-capture payments. Without this option, payments must be manually captured in the paypal interface.
@@ -23,11 +28,6 @@ Spree.config do |config|
#config.override_actionmailer_config = false
end
# TODO Work out why this is necessary
# Seems like classes within OFN module become 'uninitialized' when server reloads
# unless the empty module is explicity 'registered' here. Something to do with autoloading?
module OpenFoodNetwork
end
# Add calculators category for enterprise fees
module Spree
@@ -43,7 +43,7 @@ module Spree
end
# Forcing spree to always allow SSL connections
# Since we are using config.force_ssl = true
# Since we are using config.force_ssl = true
# Without this we get a redirect loop: see https://groups.google.com/forum/#!topic/spree-user/NwpqGxJ4klk
SslRequirement.module_eval do
protected