mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-08 22:56:06 +00:00
Merge remote-tracking branch 'origin/master' into transifex
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -21,7 +21,6 @@ gem 'spree_paypal_express', :github => "openfoodfoundation/better_spree_paypal_e
|
||||
|
||||
gem 'delayed_job_active_record'
|
||||
gem 'daemons'
|
||||
gem 'comfortable_mexican_sofa'
|
||||
|
||||
# Fix bug in simple_form preventing collection_check_boxes usage within form_for block
|
||||
# When merged, revert to upstream gem
|
||||
|
||||
12
Gemfile.lock
12
Gemfile.lock
@@ -121,7 +121,6 @@ GEM
|
||||
rack-cache (~> 1.2)
|
||||
rack-test (~> 0.6.1)
|
||||
sprockets (~> 2.2.1)
|
||||
active_link_to (1.0.0)
|
||||
active_model_serializers (0.8.3)
|
||||
activemodel (>= 3.0)
|
||||
activemerchant (1.57.0)
|
||||
@@ -202,10 +201,6 @@ GEM
|
||||
coffee-script-source (1.10.0)
|
||||
colorize (0.7.7)
|
||||
columnize (0.9.0)
|
||||
comfortable_mexican_sofa (1.6.24)
|
||||
active_link_to (~> 1.0.0)
|
||||
paperclip (>= 2.3.0)
|
||||
rails (>= 3.0.0)
|
||||
compass (1.0.3)
|
||||
chunky_png (~> 1.2)
|
||||
compass-core (~> 1.0.2)
|
||||
@@ -226,7 +221,7 @@ GEM
|
||||
safe_yaml (~> 0.9.0)
|
||||
css_parser (1.3.5)
|
||||
addressable
|
||||
css_splitter (0.4.1)
|
||||
css_splitter (0.4.5)
|
||||
sprockets (>= 2.0.0)
|
||||
daemons (1.2.2)
|
||||
dalli (2.7.2)
|
||||
@@ -456,7 +451,7 @@ GEM
|
||||
railties (>= 3.1)
|
||||
money (5.1.1)
|
||||
i18n (~> 0.6.0)
|
||||
multi_json (1.12.0)
|
||||
multi_json (1.12.1)
|
||||
multi_xml (0.5.5)
|
||||
newrelic_rpm (3.12.0.288)
|
||||
nokogiri (1.6.7.2)
|
||||
@@ -659,7 +654,6 @@ DEPENDENCIES
|
||||
bugsnag
|
||||
capybara
|
||||
coffee-rails (~> 3.2.1)
|
||||
comfortable_mexican_sofa
|
||||
compass-rails
|
||||
css_splitter
|
||||
custom_error_message!
|
||||
@@ -735,4 +729,4 @@ DEPENDENCIES
|
||||
wkhtmltopdf-binary
|
||||
|
||||
BUNDLED WITH
|
||||
1.11.2
|
||||
1.12.5
|
||||
|
||||
2
Rakefile
2
Rakefile
@@ -2,7 +2,7 @@
|
||||
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
||||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
||||
|
||||
require File.expand_path('../config/application', __FILE__)
|
||||
require_relative 'config/application'
|
||||
|
||||
Openfoodnetwork::Application.load_tasks
|
||||
|
||||
|
||||
@@ -1,10 +1,2 @@
|
||||
Darkswarm.controller "CartCtrl", ($scope, Cart, $timeout) ->
|
||||
$scope.Cart = Cart
|
||||
initializing = true
|
||||
|
||||
$scope.$watchCollection "Cart.line_items_present()", ->
|
||||
if initializing
|
||||
$timeout ->
|
||||
initializing = false
|
||||
else
|
||||
$scope.Cart.orderChanged()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "EnterprisesCtrl", ($scope, $rootScope, $timeout, Enterprises, Search, $document, HashNavigation, FilterSelectorsService, EnterpriseModal, enterpriseMatchesNameQueryFilter, distanceWithinKmFilter) ->
|
||||
Darkswarm.controller "EnterprisesCtrl", ($scope, $rootScope, $timeout, $location, Enterprises, Search, $document, HashNavigation, FilterSelectorsService, EnterpriseModal, enterpriseMatchesNameQueryFilter, distanceWithinKmFilter) ->
|
||||
$scope.Enterprises = Enterprises
|
||||
$scope.producers_to_filter = Enterprises.producers
|
||||
$scope.filterSelectors = FilterSelectorsService.createSelectors()
|
||||
@@ -21,6 +21,12 @@ Darkswarm.controller "EnterprisesCtrl", ($scope, $rootScope, $timeout, Enterpris
|
||||
Enterprises.calculateDistance query, $scope.firstNameMatch()
|
||||
$rootScope.$broadcast 'enterprisesChanged'
|
||||
|
||||
$timeout ->
|
||||
if $location.search()['show_closed']?
|
||||
$scope.showClosedShops()
|
||||
|
||||
$scope.$watch "filtersActive", (value) ->
|
||||
$scope.$broadcast 'filtersToggled'
|
||||
|
||||
$rootScope.$on "enterprisesChanged", ->
|
||||
$scope.filterEnterprises()
|
||||
@@ -30,7 +36,7 @@ Darkswarm.controller "EnterprisesCtrl", ($scope, $rootScope, $timeout, Enterpris
|
||||
# When filter settings change, this could change which name match is at the top, or even
|
||||
# result in no matches. This affects the reference point that the distance matches are
|
||||
# calculated from, so we need to recalculate distances.
|
||||
$scope.$watch '[activeTaxons, shippingTypes, show_profiles]', ->
|
||||
$scope.$watch '[activeTaxons, activeProperties, shippingTypes, show_profiles]', ->
|
||||
$timeout ->
|
||||
Enterprises.calculateDistance $scope.query, $scope.firstNameMatch()
|
||||
$rootScope.$broadcast 'enterprisesChanged'
|
||||
@@ -69,6 +75,8 @@ Darkswarm.controller "EnterprisesCtrl", ($scope, $rootScope, $timeout, Enterpris
|
||||
|
||||
$scope.showClosedShops = ->
|
||||
delete $scope.filterExpression['active']
|
||||
$location.search('show_closed', '1')
|
||||
|
||||
$scope.hideClosedShops = ->
|
||||
$scope.filterExpression['active'] = true
|
||||
$location.search('show_closed', null)
|
||||
|
||||
@@ -8,3 +8,6 @@ Darkswarm.controller "GroupEnterprisesCtrl", ($scope, Search, FilterSelectorsSer
|
||||
|
||||
$scope.$watch "query", (query)->
|
||||
Search.search query
|
||||
|
||||
$scope.$watch "filtersActive", (value) ->
|
||||
$scope.$broadcast 'filtersToggled'
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Darkswarm.controller "LineItemCtrl", ($scope)->
|
||||
$scope.$watch '[line_item.quantity, line_item.max_quantity]', (newValue, oldValue)->
|
||||
if newValue != oldValue
|
||||
$scope.Cart.orderChanged()
|
||||
, true
|
||||
@@ -1,18 +1,41 @@
|
||||
Darkswarm.controller "ProductsCtrl", ($scope, $rootScope, Products, OrderCycle, FilterSelectorsService, Cart, Taxons, Properties) ->
|
||||
Darkswarm.controller "ProductsCtrl", ($scope, $filter, $rootScope, Products, OrderCycle, FilterSelectorsService, Cart, Taxons, Properties) ->
|
||||
$scope.Products = Products
|
||||
$scope.Cart = Cart
|
||||
$scope.query = ""
|
||||
$scope.taxonSelectors = FilterSelectorsService.createSelectors()
|
||||
$scope.propertySelectors = FilterSelectorsService.createSelectors()
|
||||
$scope.filtersActive = true
|
||||
$scope.limit = 3
|
||||
$scope.limit = 10
|
||||
$scope.order_cycle = OrderCycle.order_cycle
|
||||
# $scope.infiniteDisabled = true
|
||||
|
||||
# All of this logic basically just replicates the functionality filtering an ng-repeat
|
||||
# except that it allows us to filter a separate list before rendering, meaning that
|
||||
# we can get much better performance when applying filters by resetting the limit on the
|
||||
# number of products being rendered each time a filter is changed.
|
||||
|
||||
$scope.$watch "Products.loading", (newValue, oldValue) ->
|
||||
$scope.updateFilteredProducts()
|
||||
$scope.$broadcast("loadFilterSelectors") if !newValue
|
||||
|
||||
$scope.incrementLimit = ->
|
||||
if $scope.limit < Products.products.length
|
||||
$scope.limit = $scope.limit + 1
|
||||
$scope.limit += 10
|
||||
$scope.updateVisibleProducts()
|
||||
|
||||
$scope.$watch 'query', -> $scope.updateFilteredProducts()
|
||||
$scope.$watchCollection 'activeTaxons', -> $scope.updateFilteredProducts()
|
||||
$scope.$watchCollection 'activeProperties', -> $scope.updateFilteredProducts()
|
||||
|
||||
$scope.updateFilteredProducts = ->
|
||||
$scope.limit = 10
|
||||
f1 = $filter('products')(Products.products, $scope.query)
|
||||
f2 = $filter('taxons')(f1, $scope.activeTaxons)
|
||||
$scope.filteredProducts = $filter('properties')(f2, $scope.activeProperties)
|
||||
$scope.updateVisibleProducts()
|
||||
|
||||
$scope.updateVisibleProducts = ->
|
||||
$scope.visibleProducts = $filter('limitTo')($scope.filteredProducts, $scope.limit)
|
||||
|
||||
$scope.searchKeypress = (e)->
|
||||
code = e.keyCode || e.which
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
Darkswarm.directive "shopVariant", ->
|
||||
Darkswarm.directive "shopVariant", ->
|
||||
restrict: 'E'
|
||||
replace: true
|
||||
templateUrl: 'shop_variant.html'
|
||||
scope:
|
||||
variant: '='
|
||||
controller: ($scope, Cart) ->
|
||||
$scope.$watchGroup ['variant.line_item.quantity', 'variant.line_item.max_quantity'], ->
|
||||
Cart.adjust($scope.variant.line_item)
|
||||
|
||||
@@ -6,40 +6,15 @@ Darkswarm.directive 'singleLineSelectors', ($timeout, $filter) ->
|
||||
objects: "&"
|
||||
activeSelectors: "="
|
||||
selectorName: "@activeSelectors"
|
||||
link: (scope,element,attrs) ->
|
||||
link: (scope, element, attrs) ->
|
||||
scope.fitting = false
|
||||
|
||||
scope.overFlowSelectors = ->
|
||||
return [] unless scope.allSelectors?
|
||||
$filter('filter')(scope.allSelectors, { fits: false })
|
||||
|
||||
scope.selectedOverFlowSelectors = ->
|
||||
$filter('filter')(scope.overFlowSelectors(), { active: true })
|
||||
|
||||
# had to duplicate this to make overflow selectors work
|
||||
scope.emit = ->
|
||||
scope.activeSelectors = scope.allSelectors.filter (selector)->
|
||||
selector.active
|
||||
.map (selector)->
|
||||
selector.object.id
|
||||
|
||||
# From: http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing
|
||||
debouncer = (func, timeout) ->
|
||||
timeoutID = undefined
|
||||
timeout = timeout or 50
|
||||
->
|
||||
subject = this
|
||||
args = arguments
|
||||
clearTimeout timeoutID
|
||||
timeoutID = setTimeout(->
|
||||
func.apply subject, Array::slice.call(args)
|
||||
, timeout)
|
||||
|
||||
loadWidths = ->
|
||||
$(element).find("li").not(".more").each (i) ->
|
||||
scope.allSelectors[i].width = $(this).outerWidth(true)
|
||||
return null # So we don't exit the loop weirdly
|
||||
|
||||
scope.refit = ->
|
||||
if scope.allSelectors?
|
||||
scope.fitting = true
|
||||
selector.fits = true for selector in scope.allSelectors
|
||||
$timeout(loadWidths, 0, true).then ->
|
||||
$timeout fit, 0, true
|
||||
|
||||
fit = ->
|
||||
used = $(element).find("li.more").outerWidth(true)
|
||||
@@ -61,12 +36,45 @@ Darkswarm.directive 'singleLineSelectors', ($timeout, $filter) ->
|
||||
available += selector.width
|
||||
scope.fitting = false
|
||||
|
||||
loadWidths = ->
|
||||
$(element).find("li").not(".more").each (i) ->
|
||||
if i < scope.allSelectors.length
|
||||
scope.allSelectors[i].width = $(this).outerWidth(true)
|
||||
return null # So we don't exit the loop weirdly
|
||||
|
||||
scope.overFlowSelectors = ->
|
||||
return [] unless scope.allSelectors?
|
||||
$filter('filter')(scope.allSelectors, { fits: false })
|
||||
|
||||
scope.selectedOverFlowSelectors = ->
|
||||
$filter('filter')(scope.overFlowSelectors(), { active: true })
|
||||
|
||||
# had to duplicate this to make overflow selectors work
|
||||
scope.emit = ->
|
||||
scope.activeSelectors = scope.allSelectors.filter (selector)->
|
||||
selector.active
|
||||
.map (selector) ->
|
||||
selector.object.id
|
||||
|
||||
# From: http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing
|
||||
debouncer = (func, timeout) ->
|
||||
timeoutID = undefined
|
||||
timeout = timeout or 50
|
||||
->
|
||||
subject = this
|
||||
args = arguments
|
||||
clearTimeout timeoutID
|
||||
timeoutID = setTimeout(->
|
||||
func.apply subject, Array::slice.call(args)
|
||||
, timeout)
|
||||
|
||||
|
||||
# -- Event management
|
||||
scope.$watchCollection "allSelectors", ->
|
||||
if scope.allSelectors?
|
||||
scope.fitting = true
|
||||
selector.fits = true for selector in scope.allSelectors
|
||||
$timeout(loadWidths, 0, true).then ->
|
||||
$timeout fit, 0, true
|
||||
scope.refit()
|
||||
|
||||
scope.$on "filtersToggled", ->
|
||||
scope.refit()
|
||||
|
||||
$(window).resize debouncer (e) ->
|
||||
scope.fitting = true
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
Darkswarm.directive "ofnSmoothScrollTo", ($location, $document)->
|
||||
# Onclick sets $location.hash to attrs.ofnScrollTo
|
||||
# Then triggers $document.scrollTo
|
||||
restrict: 'A'
|
||||
link: (scope, element, attrs)->
|
||||
element.bind 'click', (ev)->
|
||||
ev.stopPropagation()
|
||||
$location.hash attrs.ofnScrollTo
|
||||
target = $("a[name='#{attrs.ofnSmoothScrollTo}']")
|
||||
# Scrolling is confused by our position:fixed top bar and page alert bar
|
||||
# - add an offset to scroll to the correct location, plus 5px buffer
|
||||
offset = $("nav.top-bar").height()
|
||||
offset += $(".page-alert.move-down").height()
|
||||
offset += 5
|
||||
$document.scrollTo target, offset, 1000
|
||||
@@ -2,6 +2,7 @@ Darkswarm.filter 'products', (Matcher) ->
|
||||
(products, text) ->
|
||||
products ||= []
|
||||
text ?= ""
|
||||
return products if text == ""
|
||||
products.filter (product) =>
|
||||
propertiesToMatch = [product.name, product.supplier.name, product.primary_taxon.name]
|
||||
Matcher.match propertiesToMatch, text
|
||||
|
||||
@@ -11,7 +11,15 @@ Darkswarm.factory 'Cart', (CurrentOrder, Variants, $timeout, $http, $modal, $roo
|
||||
for line_item in @line_items
|
||||
line_item.variant.line_item = line_item
|
||||
Variants.register line_item.variant
|
||||
line_item.variant.extended_name = @extendedVariantName(line_item.variant)
|
||||
|
||||
adjust: (line_item) =>
|
||||
line_item.total_price = line_item.variant.price_with_fees * line_item.quantity
|
||||
if line_item.quantity > 0
|
||||
@line_items.push line_item unless line_item in @line_items
|
||||
else
|
||||
index = @line_items.indexOf(line_item)
|
||||
@line_items.splice(index, 1) if index >= 0
|
||||
@orderChanged()
|
||||
|
||||
orderChanged: =>
|
||||
@unsaved()
|
||||
@@ -48,7 +56,7 @@ Darkswarm.factory 'Cart', (CurrentOrder, Variants, $timeout, $http, $modal, $roo
|
||||
# TODO: These changes to quantity/max_quantity trigger another cart update, which
|
||||
# is unnecessary.
|
||||
|
||||
for li in @line_items_present()
|
||||
for li in @line_items when li.quantity > 0
|
||||
if stockLevels[li.variant.id]?
|
||||
li.variant.count_on_hand = stockLevels[li.variant.id].on_hand
|
||||
if li.quantity > li.variant.count_on_hand
|
||||
@@ -67,7 +75,7 @@ Darkswarm.factory 'Cart', (CurrentOrder, Variants, $timeout, $http, $modal, $roo
|
||||
|
||||
data: =>
|
||||
variants = {}
|
||||
for li in @line_items_present()
|
||||
for li in @line_items when li.quantity > 0
|
||||
variants[li.variant.id] =
|
||||
quantity: li.quantity
|
||||
max_quantity: li.max_quantity
|
||||
@@ -89,45 +97,21 @@ Darkswarm.factory 'Cart', (CurrentOrder, Variants, $timeout, $http, $modal, $roo
|
||||
$(window).bind "beforeunload", ->
|
||||
t 'order_not_saved_yet'
|
||||
|
||||
line_items_present: =>
|
||||
@line_items.filter (li)->
|
||||
li.quantity > 0
|
||||
|
||||
total_item_count: =>
|
||||
@line_items_present().reduce (sum,li) ->
|
||||
@line_items.reduce (sum,li) ->
|
||||
sum = sum + li.quantity
|
||||
, 0
|
||||
|
||||
empty: =>
|
||||
@line_items_present().length == 0
|
||||
@line_items.length == 0
|
||||
|
||||
total: =>
|
||||
@line_items_present().map (li)->
|
||||
li.variant.totalPrice()
|
||||
@line_items.map (li)->
|
||||
li.total_price
|
||||
.reduce (t, price)->
|
||||
t + price
|
||||
, 0
|
||||
|
||||
register_variant: (variant)=>
|
||||
exists = @line_items.some (li)-> li.variant == variant
|
||||
@create_line_item(variant) unless exists
|
||||
|
||||
clear: ->
|
||||
@line_items = []
|
||||
storage.clearAll() # One day this will have to be moar GRANULAR
|
||||
|
||||
create_line_item: (variant)->
|
||||
variant.extended_name = @extendedVariantName(variant)
|
||||
variant.line_item =
|
||||
variant: variant
|
||||
quantity: null
|
||||
max_quantity: null
|
||||
@line_items.push variant.line_item
|
||||
|
||||
extendedVariantName: (variant) =>
|
||||
if variant.product_name == variant.name_to_display
|
||||
variant.product_name
|
||||
else
|
||||
name = "#{variant.product_name} - #{variant.name_to_display}"
|
||||
name += " (#{variant.options_text})" if variant.options_text
|
||||
name
|
||||
|
||||
@@ -17,7 +17,6 @@ Darkswarm.factory 'Products', ($resource, Enterprises, Dereferencer, Taxons, Pro
|
||||
@extend()
|
||||
@dereference()
|
||||
@registerVariants()
|
||||
@registerVariantsWithCart()
|
||||
@loading = false
|
||||
|
||||
extend: ->
|
||||
@@ -44,15 +43,7 @@ Darkswarm.factory 'Products', ($resource, Enterprises, Dereferencer, Taxons, Pro
|
||||
registerVariants: ->
|
||||
for product in @products
|
||||
if product.variants
|
||||
product.variants = (Variants.register variant for variant in product.variants)
|
||||
variant.product = product for variant in product.variants
|
||||
if product.master
|
||||
product.master.product = product
|
||||
product.master = Variants.register product.master
|
||||
|
||||
registerVariantsWithCart: ->
|
||||
for product in @products
|
||||
if product.variants
|
||||
for variant in product.variants
|
||||
Cart.register_variant variant
|
||||
Cart.register_variant product.master if product.master
|
||||
product.variants = for variant in product.variants
|
||||
variant = Variants.register variant
|
||||
variant.product = product
|
||||
variant
|
||||
|
||||
@@ -9,8 +9,21 @@ Darkswarm.factory 'Variants', ->
|
||||
@variants[variant.id] ||= @extend variant
|
||||
|
||||
extend: (variant)->
|
||||
# Add totalPrice method to calculate line item total. This should be on a line item!
|
||||
variant.totalPrice = ->
|
||||
variant.price_with_fees * variant.line_item.quantity
|
||||
variant.basePricePercentage = Math.round(variant.price / variant.price_with_fees * 100)
|
||||
variant.extended_name = @extendedVariantName(variant)
|
||||
variant.base_price_percentage = Math.round(variant.price / variant.price_with_fees * 100)
|
||||
variant.line_item ||= @lineItemFor(variant) # line_item may have been initialised in Cart#constructor
|
||||
variant.line_item.total_price = variant.price_with_fees * variant.line_item.quantity
|
||||
variant
|
||||
|
||||
extendedVariantName: (variant) =>
|
||||
if variant.product_name == variant.name_to_display
|
||||
variant.product_name
|
||||
else
|
||||
name = "#{variant.product_name} - #{variant.name_to_display}"
|
||||
name += " (#{variant.options_text})" if variant.options_text
|
||||
name
|
||||
|
||||
lineItemFor: (variant) ->
|
||||
variant: variant
|
||||
quantity: null
|
||||
max_quantity: null
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
/* ng-infinite-scroll - v1.0.0 - 2013-02-23 */
|
||||
var mod;mod=angular.module("infinite-scroll",[]),mod.directive("infiniteScroll",["$rootScope","$window","$timeout",function(i,n,e){return{link:function(t,l,o){var r,c,f,a;return n=angular.element(n),f=0,null!=o.infiniteScrollDistance&&t.$watch(o.infiniteScrollDistance,function(i){return f=parseInt(i,10)}),a=!0,r=!1,null!=o.infiniteScrollDisabled&&t.$watch(o.infiniteScrollDisabled,function(i){return a=!i,a&&r?(r=!1,c()):void 0}),c=function(){var e,c,u,d;return d=n.height()+n.scrollTop(),e=l.offset().top+l.height(),c=e-d,u=n.height()*f>=c,u&&a?i.$$phase?t.$eval(o.infiniteScroll):t.$apply(o.infiniteScroll):u?r=!0:void 0},n.on("scroll",c),t.$on("$destroy",function(){return n.off("scroll",c)}),e(function(){return o.infiniteScrollImmediateCheck?t.$eval(o.infiniteScrollImmediateCheck)?c():void 0:c()},0)}}}]);
|
||||
/* ng-infinite-scroll - v1.3.0 - 2016-06-30 */
|
||||
angular.module("infinite-scroll",[]).value("THROTTLE_MILLISECONDS",null).directive("infiniteScroll",["$rootScope","$window","$interval","THROTTLE_MILLISECONDS",function(a,b,c,d){return{scope:{infiniteScroll:"&",infiniteScrollContainer:"=",infiniteScrollDistance:"=",infiniteScrollDisabled:"=",infiniteScrollUseDocumentBottom:"=",infiniteScrollListenForEvent:"@"},link:function(e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;return z=angular.element(b),u=null,v=null,j=null,k=null,r=!0,y=!1,x=null,i=!1,q=function(a){return a=a[0]||a,isNaN(a.offsetHeight)?a.document.documentElement.clientHeight:a.offsetHeight},s=function(a){if(a[0].getBoundingClientRect&&!a.css("none"))return a[0].getBoundingClientRect().top+t(a)},t=function(a){return a=a[0]||a,isNaN(window.pageYOffset)?a.document.documentElement.scrollTop:a.ownerDocument.defaultView.pageYOffset},p=function(){var b,d,g,h,l;return k===z?(b=q(k)+t(k[0].document.documentElement),g=s(f)+q(f)):(b=q(k),d=0,void 0!==s(k)&&(d=s(k)),g=s(f)-d+q(f)),y&&(g=q((f[0].ownerDocument||f[0].document).documentElement)),h=g-b,l=h<=q(k)*u+1,l?(j=!0,v?e.$$phase||a.$$phase?e.infiniteScroll():e.$apply(e.infiniteScroll):void 0):(i&&c.cancel(i),j=!1)},w=function(a,b){var d,e,f;return f=null,e=0,d=function(){return e=(new Date).getTime(),c.cancel(f),f=null,a.call()},function(){var g,h;return g=(new Date).getTime(),h=b-(g-e),h<=0?(c.cancel(f),f=null,e=g,a.call()):f?void 0:f=c(d,h,1)}},null!=d&&(p=w(p,d)),e.$on("$destroy",function(){if(k.unbind("scroll",p),null!=x&&(x(),x=null),i)return c.cancel(i)}),n=function(a){return u=parseFloat(a)||0},e.$watch("infiniteScrollDistance",n),n(e.infiniteScrollDistance),m=function(a){if(v=!a,v&&j)return j=!1,p()},e.$watch("infiniteScrollDisabled",m),m(e.infiniteScrollDisabled),o=function(a){return y=a},e.$watch("infiniteScrollUseDocumentBottom",o),o(e.infiniteScrollUseDocumentBottom),h=function(a){if(null!=k&&k.unbind("scroll",p),k=a,null!=a)return k.bind("scroll",p)},h(z),e.infiniteScrollListenForEvent&&(x=a.$on(e.infiniteScrollListenForEvent,p)),l=function(a){if(null!=a&&0!==a.length){if(a.nodeType&&1===a.nodeType?a=angular.element(a):"function"==typeof a.append?a=angular.element(a[a.length-1]):"string"==typeof a&&(a=angular.element(document.querySelector(a))),null!=a)return h(a);throw new Error("invalid infinite-scroll-container attribute.")}},e.$watch("infiniteScrollContainer",l),l(e.infiniteScrollContainer||[]),null!=g.infiniteScrollParent&&h(angular.element(f.parent())),null!=g.infiniteScrollImmediateCheck&&(r=e.$eval(g.infiniteScrollImmediateCheck)),i=c(function(){return r&&p(),c.cancel(i)})}}}]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="infinite-scroll");
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"ng-model" => "variant.line_item.quantity",
|
||||
"ofn-on-hand" => "{{variant.on_demand && 9999 || variant.count_on_hand }}",
|
||||
"ng-disabled" => "!variant.on_demand && variant.count_on_hand == 0",
|
||||
name: "variants[{{variant.id}}]", id: "variants_{{variant.id}}"}
|
||||
name: "variants[{{::variant.id}}]", id: "variants_{{::variant.id}}"}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
.small-5.medium-3.large-3.columns.text-right{"ng-if" => "::variant.product.group_buy"}
|
||||
|
||||
%span.bulk-input-container
|
||||
%span.bulk-input
|
||||
%input.bulk.first{type: :number,
|
||||
@@ -6,18 +7,18 @@
|
||||
integer: true,
|
||||
min: 0,
|
||||
"ng-model" => "variant.line_item.quantity",
|
||||
placeholder: "{{'shop_variant_quantity_min' | t}}",
|
||||
placeholder: "{{::'shop_variant_quantity_min' | t}}",
|
||||
"ofn-disable-scroll" => true,
|
||||
"ofn-on-hand" => "{{variant.on_demand && 9999 || variant.count_on_hand }}",
|
||||
name: "variants[{{variant.id}}]", id: "variants_{{variant.id}}"}
|
||||
name: "variants[{{::variant.id}}]", id: "variants_{{::variant.id}}"}
|
||||
%span.bulk-input
|
||||
%input.bulk.second{type: :number,
|
||||
"ng-disabled" => "!variant.line_item.quantity",
|
||||
integer: true,
|
||||
min: 0,
|
||||
"ng-model" => "variant.line_item.max_quantity",
|
||||
placeholder: "{{'shop_variant_quantity_max' | t}}",
|
||||
placeholder: "{{::'shop_variant_quantity_max' | t}}",
|
||||
"ofn-disable-scroll" => true,
|
||||
min: "{{variant.line_item.quantity}}",
|
||||
name: "variant_attributes[{{variant.id}}][max_quantity]",
|
||||
id: "variants_{{variant.id}}_max"}
|
||||
name: "variant_attributes[{{::variant.id}}][max_quantity]",
|
||||
id: "variants_{{::variant.id}}_max"}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
%span.joyride-nub.right
|
||||
.joyride-content-wrapper
|
||||
.collapsed{"ng-show" => "!expanded"}
|
||||
%price-percentage{percentage: 'variant.basePricePercentage'}
|
||||
%price-percentage{percentage: 'variant.base_price_percentage'}
|
||||
%a{"ng-click" => "expanded = !expanded"}
|
||||
%span{"ng-bind" => "::'price_breakdown' | t"}
|
||||
%i.ofn-i_005-caret-down
|
||||
@@ -10,26 +10,26 @@
|
||||
.expanded{"ng-show" => "expanded"}
|
||||
%ul
|
||||
%li.cost
|
||||
.right {{ variant.price | localizeCurrency }}
|
||||
.right {{ ::variant.price | localizeCurrency }}
|
||||
%span{"ng-bind" => "::'item_cost' | t"}
|
||||
%li.admin-fee{"ng-if" => "::variant.fees.admin"}
|
||||
.right {{ variant.fees.admin | localizeCurrency }}
|
||||
.right {{ ::variant.fees.admin | localizeCurrency }}
|
||||
%span{"ng-bind" => "::'admin_fee' | t"}
|
||||
%li.sales-fee{"ng-if" => "::variant.fees.sales"}
|
||||
.right {{ variant.fees.sales | localizeCurrency }}
|
||||
.right {{ ::variant.fees.sales | localizeCurrency }}
|
||||
%span{"ng-bind" => "::'sales_fee' | t"}
|
||||
%li.packing-fee{"ng-if" => "::variant.fees.packing"}
|
||||
.right {{ variant.fees.packing | localizeCurrency }}
|
||||
.right {{ ::variant.fees.packing | localizeCurrency }}
|
||||
%span{"ng-bind" => "::'packing_fee' | t"}
|
||||
%li.transport-fee{"ng-if" => "::variant.fees.transport"}
|
||||
.right {{ variant.fees.transport | localizeCurrency }}
|
||||
.right {{ ::variant.fees.transport | localizeCurrency }}
|
||||
%span{"ng-bind" => "::'transport_fee' | t"}
|
||||
%li.fundraising-fee{"ng-if" => "::variant.fees.fundraising"}
|
||||
.right {{ variant.fees.fundraising | localizeCurrency }}
|
||||
.right {{ ::variant.fees.fundraising | localizeCurrency }}
|
||||
%span{"ng-bind" => "::'fundraising_fee' | t"}
|
||||
%li.total
|
||||
%strong
|
||||
.right = {{ variant.price_with_fees | localizeCurrency }}
|
||||
.right = {{ ::variant.price_with_fees | localizeCurrency }}
|
||||
|
||||
|
||||
%a{"ng-click" => "expanded = !expanded"}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
.progress
|
||||
.right {{'fees' | t}}
|
||||
.right {{::'fees' | t}}
|
||||
.meter
|
||||
{{'item_cost' | t}}
|
||||
|
||||
{{::'item_cost' | t}}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
.variants.row
|
||||
.small-12.medium-4.large-4.columns.variant-name
|
||||
.table-cell
|
||||
.inline {{ variant.name_to_display }}
|
||||
.inline {{ ::variant.name_to_display }}
|
||||
.bulk-buy.inline{"ng-if" => "::variant.product.group_buy"}
|
||||
%i.ofn-i_056-bulk><
|
||||
%em><
|
||||
\ {{'bulk' | t}}
|
||||
\ {{::'bulk' | t}}
|
||||
|
||||
%ng-include{src: "'partials/shop_variant_no_group_buy.html'"}
|
||||
%ng-include{src: "'partials/shop_variant_with_group_buy.html'"}
|
||||
|
||||
.small-3.medium-1.large-1.columns.variant-unit
|
||||
.table-cell
|
||||
%em {{ variant.unit_to_display }}
|
||||
%em {{ ::variant.unit_to_display }}
|
||||
|
||||
.small-4.medium-2.large-2.columns.variant-price
|
||||
.table-cell.price
|
||||
%i.ofn-i_009-close
|
||||
{{ variant.price_with_fees | localizeCurrency }}
|
||||
{{ ::variant.price_with_fees | localizeCurrency }}
|
||||
|
||||
-# Now in a template in app/assets/javascripts/templates !
|
||||
%price-breakdown{"price-breakdown" => "_", variant: "variant",
|
||||
@@ -27,5 +27,5 @@
|
||||
|
||||
.small-12.medium-2.large-2.columns.total-price.text-right
|
||||
.table-cell
|
||||
%strong{"ng-class" => "{filled: variant.totalPrice()}"}
|
||||
{{ variant.totalPrice() | localizeCurrency }}
|
||||
%strong{"ng-class" => "{filled: variant.line_item.total_price}"}
|
||||
{{ variant.line_item.total_price | localizeCurrency }}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
html {
|
||||
height: auto;
|
||||
background-color: transparent;
|
||||
}
|
||||
@@ -92,6 +92,12 @@
|
||||
span.filter-label
|
||||
opacity: 0.75
|
||||
|
||||
// singleLineSelectors directive provides a drop-down that can overlap
|
||||
// content. Ensure that the dropdown appears above the content.
|
||||
.filter-row
|
||||
position: relative
|
||||
z-index: 100
|
||||
|
||||
.filter-shopfront
|
||||
&.taxon-selectors, &.property-selectors
|
||||
background: transparent
|
||||
|
||||
@@ -30,7 +30,7 @@ footer
|
||||
background-color: transparent
|
||||
border: none
|
||||
padding: 0
|
||||
a.alert-cta
|
||||
.alert-cta
|
||||
@include csstrans
|
||||
width: 100%
|
||||
border: 1px solid rgba($dark-grey, 0.35)
|
||||
@@ -44,7 +44,7 @@ footer
|
||||
color: #333
|
||||
strong
|
||||
letter-spacing: 0.5px
|
||||
&:hover, &:active, &:focus
|
||||
a:hover, a:active, a:focus
|
||||
text-decoration: none
|
||||
border-color: white
|
||||
&, & *
|
||||
|
||||
@@ -4,11 +4,7 @@
|
||||
|
||||
// Search page
|
||||
#groups
|
||||
background-color: lighten($clr-brick, 56%)
|
||||
background-image: url("/assets/groups.svg")
|
||||
background-position: center 50px
|
||||
background-repeat: no-repeat
|
||||
background-size: 922px 922px
|
||||
@include groupsbg
|
||||
@include sidepaddingSm
|
||||
@include panepadding
|
||||
h1, p.text
|
||||
@@ -23,13 +19,13 @@
|
||||
text-align: right
|
||||
a
|
||||
font-size: 1.5em
|
||||
|
||||
|
||||
.groups-header
|
||||
border: 2px solid $clr-brick-light-bright
|
||||
@include border-radius-mixed(0.5em, 0.5em, 0, 0)
|
||||
margin: -1rem 0 1rem
|
||||
padding: 1rem 0.9375rem
|
||||
@media screen and (min-width: 640px)
|
||||
@media screen and (min-width: 640px)
|
||||
border: 0 none
|
||||
@include border-radius(0)
|
||||
margin: 0
|
||||
@@ -44,12 +40,12 @@
|
||||
.ofn-i_035-groups
|
||||
font-size: 120%
|
||||
vertical-align: middle
|
||||
|
||||
|
||||
// Individual Page
|
||||
#group-page
|
||||
.group-logo, .group-header
|
||||
text-align: center
|
||||
.group-logo
|
||||
text-align: center
|
||||
.group-logo
|
||||
padding-bottom: 1em
|
||||
max-height: 200px
|
||||
.group-name
|
||||
@@ -57,7 +53,7 @@
|
||||
@media screen and (min-width: 768px)
|
||||
.group-logo, .group-header
|
||||
text-align: left
|
||||
.group-logo
|
||||
.group-logo
|
||||
max-height: 120px
|
||||
float: left
|
||||
padding-right: 1em
|
||||
@@ -72,18 +68,18 @@
|
||||
margin-right: 2px
|
||||
text-transform: capitalize
|
||||
@include headingFont
|
||||
@include border-radius(1em 0.25em 0 0)
|
||||
@include border-radius(1em 0.25em 0 0)
|
||||
@include gradient($disabled-light, $disabled-bright)
|
||||
@media screen and (min-width: 768px)
|
||||
.tabs dd a
|
||||
padding: 0.5rem 1rem 0.25em
|
||||
font-size: 0.875rem
|
||||
@include border-radius(1.5em 0.25em 0 0)
|
||||
@include border-radius(1.5em 0.25em 0 0)
|
||||
@media screen and (min-width: 1024px)
|
||||
.tabs dd a
|
||||
padding: 0.75rem 1.5rem 0.5em
|
||||
font-size: 1rem
|
||||
@include border-radius(2em 0.25em 0 0)
|
||||
@include border-radius(2em 0.25em 0 0)
|
||||
.tabs dd.active a
|
||||
@include gradient(white, white)
|
||||
margin-bottom: -1px
|
||||
@@ -110,4 +106,3 @@
|
||||
background-image: none
|
||||
padding-top: 0
|
||||
padding-bottom: 0
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
@import animations
|
||||
@import variables
|
||||
|
||||
|
||||
// Styling for big panes on homepage \\
|
||||
#panes
|
||||
.pane
|
||||
@@ -22,9 +21,15 @@
|
||||
#system.pane
|
||||
background-color: white
|
||||
|
||||
#brand-story.pane, #cta.pane, #shops.pane
|
||||
#brand-story.pane, #cta.pane, #shops.pane, #sell.pane
|
||||
@include tiledPane
|
||||
|
||||
#connect.pane
|
||||
@include groupsbg
|
||||
|
||||
#learn.pane
|
||||
@include hubsbg
|
||||
|
||||
#stats.pane
|
||||
background-image: url("/assets/home/background-blurred-oranges.jpg")
|
||||
background-position: center center
|
||||
@@ -94,10 +99,6 @@
|
||||
@media all and (max-width: 640px)
|
||||
font-size: 45px
|
||||
|
||||
|
||||
a
|
||||
color: $brand-colour
|
||||
|
||||
.home-icon-box-bottom
|
||||
margin-top: 1rem
|
||||
width: 100%
|
||||
@@ -147,3 +148,9 @@
|
||||
|
||||
#shops-signup.pane
|
||||
background-color: $brand-colour
|
||||
|
||||
#sell-detail.pane
|
||||
margin: 50px 0
|
||||
.row
|
||||
padding-top: 25px
|
||||
padding-bottom: 25px
|
||||
|
||||
@@ -170,3 +170,23 @@
|
||||
// W3C
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$gradient-clr1', endColorstr='$gradient-clr2',GradientType=0 )
|
||||
// IE6-8
|
||||
|
||||
|
||||
@mixin producersbg
|
||||
background-color: lighten($clr-turquoise, 68%)
|
||||
background-image: url("/assets/producers.svg")
|
||||
background-position: center 50px
|
||||
background-repeat: no-repeat
|
||||
background-size: 922px 763px
|
||||
|
||||
@mixin hubsbg
|
||||
background-color: $brand-colour
|
||||
background-image: url("/assets/hubs-bg.jpg")
|
||||
background-position: center center
|
||||
|
||||
@mixin groupsbg
|
||||
background-color: lighten($clr-brick, 56%)
|
||||
background-image: url("/assets/groups.svg")
|
||||
background-position: center 50px
|
||||
background-repeat: no-repeat
|
||||
background-size: 922px 922px
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
font-size: 10px
|
||||
line-height: 24px
|
||||
|
||||
a.alert-cta
|
||||
.alert-cta
|
||||
&, & *
|
||||
@include csstrans
|
||||
color: #333
|
||||
strong
|
||||
letter-spacing: 0.5px
|
||||
&:hover, &:active, &:focus
|
||||
a:hover, a:active, a:focus
|
||||
&, & *
|
||||
text-decoration: none
|
||||
color: white
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
@import mixins
|
||||
|
||||
.producers
|
||||
background-color: lighten($clr-turquoise, 68%)
|
||||
background-image: url("/assets/producers.svg")
|
||||
background-position: center 50px
|
||||
background-repeat: no-repeat
|
||||
background-size: 922px 763px
|
||||
@include producersbg
|
||||
@include sidepaddingSm
|
||||
@include panepadding
|
||||
a
|
||||
|
||||
@@ -18,11 +18,9 @@
|
||||
|
||||
|
||||
#producer-case-studies, #shops-case-studies
|
||||
@include hubsbg
|
||||
padding-top: 100px
|
||||
padding-bottom: 100px
|
||||
background-color: $brand-colour
|
||||
background-image: url("/assets/hubs-bg.jpg")
|
||||
background-position: center center
|
||||
-webkit-filter: brightness(1.1)
|
||||
filter: brightness(1.1)
|
||||
h2
|
||||
|
||||
@@ -26,13 +26,14 @@ class EnterprisesController < BaseController
|
||||
end
|
||||
|
||||
def check_permalink
|
||||
return render text: params[:permalink], status: 409 if Enterprise.find_by_permalink params[:permalink]
|
||||
render text: params[:permalink], status: 409 and return if Enterprise.find_by_permalink params[:permalink]
|
||||
|
||||
path = Rails.application.routes.recognize_path("/#{params[:permalink].to_s}")
|
||||
if path && path[:controller] == "cms_content"
|
||||
render text: params[:permalink], status: 200
|
||||
else
|
||||
begin
|
||||
Rails.application.routes.recognize_path( "/#{ params[:permalink].to_s }" )
|
||||
render text: params[:permalink], status: 409
|
||||
|
||||
rescue ActionController::RoutingError
|
||||
render text: params[:permalink], status: 200
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -9,4 +9,8 @@ class HomeController < BaseController
|
||||
@num_orders = Spree::Order.complete.count
|
||||
end
|
||||
end
|
||||
|
||||
def sell
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
module ApplicationHelper
|
||||
include FoundationRailsHelper::FlashHelper
|
||||
|
||||
|
||||
def home_page_cms_content
|
||||
if controller.controller_name == 'home' && controller.action_name == 'index'
|
||||
cms_page_content(:content, Cms::Page.find_by_full_path('/'))
|
||||
end
|
||||
def feature?(feature)
|
||||
OpenFoodNetwork::FeatureToggle.enabled? feature
|
||||
end
|
||||
|
||||
|
||||
def ng_form_for(name, *args, &block)
|
||||
options = args.extract_options!
|
||||
|
||||
|
||||
@@ -67,10 +67,6 @@ module OrderCyclesHelper
|
||||
@order_cycles_simple_form ||= @order_cycle.coordinator.sells == 'own'
|
||||
end
|
||||
|
||||
def order_cycles_enabled?
|
||||
OpenFoodNetwork::FeatureToggle.enabled? :order_cycles
|
||||
end
|
||||
|
||||
def pickup_time(order_cycle = current_order_cycle)
|
||||
order_cycle.exchanges.to_enterprises(current_distributor).outgoing.first.pickup_time
|
||||
end
|
||||
|
||||
@@ -74,11 +74,7 @@ Spree::Order.class_eval do
|
||||
# -- Methods
|
||||
def products_available_from_new_distribution
|
||||
# Check that the line_items in the current order are available from a newly selected distribution
|
||||
if OpenFoodNetwork::FeatureToggle.enabled? :order_cycles
|
||||
errors.add(:base, "Distributor or order cycle cannot supply the products in your cart") unless DistributionChangeValidator.new(self).can_change_to_distribution?(distributor, order_cycle)
|
||||
else
|
||||
errors.add(:distributor_id, "cannot supply the products in your cart") unless DistributionChangeValidator.new(self).can_change_to_distributor?(distributor)
|
||||
end
|
||||
errors.add(:base, "Distributor or order cycle cannot supply the products in your cart") unless DistributionChangeValidator.new(self).can_change_to_distribution?(distributor, order_cycle)
|
||||
end
|
||||
|
||||
def empty_with_clear_shipping_and_payments!
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/admin/shared/_configuration_menu",
|
||||
:name => "add_cms_admin_to_admin_configurations_menu",
|
||||
:insert_bottom => "[data-hook='admin_configurations_sidebar_menu']",
|
||||
:text => "<li><%= link_to 'CMS Admin', main_app.cms_admin_path %></li>",
|
||||
:original => '29e0ab9c171ffab1988cb439b5d42300b78fe088' )
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/checkout/_delivery",
|
||||
:insert_before => "fieldset#shipping_method",
|
||||
:text => "<%= cms_snippet_content(Cms::Snippet.find_by_identifier('distribution')) %>",
|
||||
:name => "add_cms_checkout_distribution",
|
||||
:original => '3b417788fb9a63f464fdaeb8202f483f20518f80')
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/shared/_main_nav_bar",
|
||||
:name => "add_cms_tabs_to_main_nav_bar",
|
||||
:insert_after => "li#home-link",
|
||||
:partial => "spree/shared/cms_tabs",
|
||||
:original => '05c6495f8760e58eb68e2cce67433cf7f5299fa4')
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/orders/edit",
|
||||
:insert_after => "h1",
|
||||
:text => "<%= cms_snippet_content(Cms::Snippet.find_by_identifier('cart')) %>",
|
||||
:name => "add_cms_to_cart",
|
||||
:original => '206a92e6f50966b057e877321b573bc293787894')
|
||||
@@ -1,9 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/products/index",
|
||||
:insert_after => "[data-hook='homepage_products']",
|
||||
:partial => 'spree/shared/multi_cart.html',
|
||||
:name => 'multi_cart_home')
|
||||
|
||||
Deface::Override.new(:virtual_path => "spree/home/index",
|
||||
:insert_after => "[data-hook='homepage_products']",
|
||||
:partial => 'spree/shared/multi_cart.html',
|
||||
:name => 'multi_cart_products')
|
||||
@@ -1,14 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/home/index",
|
||||
:insert_before => "[data-hook='homepage_products']",
|
||||
:partial => "order_cycles/selection",
|
||||
:name => "order_cycle_selection_home")
|
||||
|
||||
Deface::Override.new(:virtual_path => "spree/products/index",
|
||||
:insert_before => "[data-hook='homepage_products']",
|
||||
:partial => "order_cycles/selection",
|
||||
:name => "order_cycle_selection_products")
|
||||
|
||||
Deface::Override.new(:virtual_path => "spree/taxons/show",
|
||||
:insert_top => "[data-hook='homepage_products']",
|
||||
:partial => "order_cycles/selection",
|
||||
:name => "order_cycle_selection_taxon")
|
||||
@@ -1,7 +0,0 @@
|
||||
# In sidebar, always render both taxonomies and filters
|
||||
|
||||
Deface::Override.new(:virtual_path => "spree/home/index",
|
||||
:replace => "[data-hook='homepage_sidebar_navigation']",
|
||||
:partial => 'spree/sidebar',
|
||||
:name => 'sidebar_home_index',
|
||||
:original => 'f5a06c5f558ec681c172ad62ddcf8f84ad0a99c4')
|
||||
@@ -1,7 +0,0 @@
|
||||
# In sidebar, always render both taxonomies and filters
|
||||
|
||||
Deface::Override.new(:virtual_path => "spree/products/index",
|
||||
:replace => "[data-hook='homepage_sidebar_navigation']",
|
||||
:partial => 'spree/sidebar',
|
||||
:name => 'sidebar_product_index',
|
||||
:original => 'd9d1b3d18721e1c68eeaac898ca006bf8afb176c')
|
||||
@@ -1,7 +0,0 @@
|
||||
# In sidebar, always render both taxonomies and filters
|
||||
|
||||
Deface::Override.new(:virtual_path => "spree/taxons/show",
|
||||
:replace => "[data-hook='taxon_sidebar_navigation']",
|
||||
:partial => 'spree/sidebar',
|
||||
:name => 'sidebar_taxons_show',
|
||||
:original => '697641363ffdb1fce91d8eea7cc883e983236ed2')
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/home/index",
|
||||
:replace => "[data-hook='homepage_products']",
|
||||
:partial => "spree/shared/products_by_distribution",
|
||||
:name => "split_products_by_distribution_on_home",
|
||||
:original => '589053f6f3e534b0be729081bdfc0378beb29cca')
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/products/index",
|
||||
:replace => "[data-hook='homepage_products']",
|
||||
:partial => "spree/shared/products_by_distribution",
|
||||
:name => "split_products_by_distribution_on_products_home",
|
||||
:original => '22097416de0a5851d43c572301779de06ed84d17')
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/products/index",
|
||||
:replace => "[data-hook='search_results']",
|
||||
:partial => "spree/shared/products_by_distribution",
|
||||
:name => "split_products_by_distribution_on_products_search",
|
||||
:original => '5a764faee41bd3f2bb13b60bfeb61e63fede9fac')
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/taxons/show",
|
||||
:replace => "[data-hook='taxon_products']",
|
||||
:partial => "spree/shared/products_by_distribution",
|
||||
:name => "split_products_by_distribution_on_taxons_show",
|
||||
:original => '27b6ecd3954022246568b3ddf5e80462aa511ece')
|
||||
@@ -1,7 +0,0 @@
|
||||
/ replace_contents "[data-hook='homepage_products']"
|
||||
|
||||
- if current_order_cycle
|
||||
- if @products.empty?
|
||||
%h6.search-results-title= t(:no_products_found)
|
||||
- else
|
||||
= render :partial => 'spree/shared/products', :locals => { :products => @products, :taxon => @taxon }
|
||||
@@ -21,6 +21,7 @@ end
|
||||
|
||||
class Api::UncachedEnterpriseSerializer < ActiveModel::Serializer
|
||||
attributes :orders_close_at, :active
|
||||
has_many :properties, serializer: Api::PropertySerializer
|
||||
|
||||
def orders_close_at
|
||||
options[:data].earliest_closing_times[object.id]
|
||||
@@ -29,6 +30,14 @@ class Api::UncachedEnterpriseSerializer < ActiveModel::Serializer
|
||||
def active
|
||||
options[:data].active_distributors.andand.include? object
|
||||
end
|
||||
|
||||
def properties
|
||||
# This results in 3 queries per enterprise
|
||||
product_properties = Spree::Property.applied_by(object)
|
||||
producer_properties = object.properties
|
||||
|
||||
OpenFoodNetwork::PropertyMerge.merge product_properties, producer_properties
|
||||
end
|
||||
end
|
||||
|
||||
class Api::CachedEnterpriseSerializer < ActiveModel::Serializer
|
||||
@@ -49,8 +58,6 @@ class Api::CachedEnterpriseSerializer < ActiveModel::Serializer
|
||||
attributes :taxons, :supplied_taxons
|
||||
|
||||
has_one :address, serializer: Api::AddressSerializer
|
||||
has_many :properties, serializer: Api::PropertySerializer
|
||||
|
||||
def taxons
|
||||
ids_to_objs options[:data].distributed_taxons[object.id]
|
||||
end
|
||||
@@ -59,14 +66,6 @@ class Api::CachedEnterpriseSerializer < ActiveModel::Serializer
|
||||
ids_to_objs options[:data].supplied_taxons[object.id]
|
||||
end
|
||||
|
||||
def properties
|
||||
# This results in 3 queries per enterprise
|
||||
product_properties = Spree::Property.applied_by(object)
|
||||
producer_properties = object.properties
|
||||
|
||||
OpenFoodNetwork::PropertyMerge.merge product_properties, producer_properties
|
||||
end
|
||||
|
||||
def pickup
|
||||
services = options[:data].shipping_method_services[object.id]
|
||||
services ? services[:pickup] : false
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
.small-12.columns
|
||||
.active_table
|
||||
%producer.active_table_node.row.animate-repeat{id: "{{producer.path}}",
|
||||
"ng-repeat" => "producer in filteredEnterprises = (group_producers | searchEnterprises:query | taxons:activeTaxons)",
|
||||
"ng-repeat" => "producer in filteredEnterprises = (group_producers | searchEnterprises:query | taxons:activeTaxons | properties:activeProperties)",
|
||||
"ng-controller" => "GroupEnterpriseNodeCtrl",
|
||||
"ng-class" => "{'closed' : !open(), 'open' : open(), 'inactive' : !producer.active}",
|
||||
id: "{{producer.hash}}"}
|
||||
|
||||
7
app/views/home/_connect.html.haml
Normal file
7
app/views/home/_connect.html.haml
Normal file
@@ -0,0 +1,7 @@
|
||||
#connect.pane
|
||||
.row
|
||||
.small-12.medium-6.medium-offset-3.columns.text-center
|
||||
%h2= t :label_connect
|
||||
%p.text-normal= t :connect_body
|
||||
%a.button.transparent{href: "https://openfoodnetwork.org/au/connect/"}
|
||||
= t :connect_cta
|
||||
7
app/views/home/_learn.html.haml
Normal file
7
app/views/home/_learn.html.haml
Normal file
@@ -0,0 +1,7 @@
|
||||
#learn.pane
|
||||
.row
|
||||
.small-12.medium-6.medium-offset-3.columns.text-center
|
||||
%h2= t :label_learn
|
||||
%p.text-normal= t :learn_body
|
||||
%a.button.transparent{href: "https://openfoodnetwork.org/au/learn/"}
|
||||
= t :learn_cta
|
||||
9
app/views/home/_tagline.html.haml
Normal file
9
app/views/home/_tagline.html.haml
Normal file
@@ -0,0 +1,9 @@
|
||||
#tagline
|
||||
.row
|
||||
.small-12.text-center.columns
|
||||
%h1
|
||||
/ TODO: Rohan - logo asset & width is content manageable:
|
||||
%img{src: "/assets/logo-white-notext.png", width: "250", title: Spree::Config.site_name}
|
||||
%br/
|
||||
%a.button.transparent{href: "/shops"}
|
||||
= t :home_shop
|
||||
@@ -3,23 +3,21 @@
|
||||
|
||||
|
||||
%div{"ng-controller" => "HomeCtrl"}
|
||||
= render partial: "shared/menu/alert"
|
||||
|
||||
#tagline
|
||||
.row
|
||||
.small-12.text-center.columns
|
||||
%h1
|
||||
/ TODO: Rohan - logo asset & width is content manageable:
|
||||
%img{src: "/assets/logo-white-notext.png", width: "250", title: Spree::Config.site_name}
|
||||
%br/
|
||||
%a.button.transparent{href: "/shops"}
|
||||
= t :home_shop
|
||||
|
||||
= render "shared/menu/alert"
|
||||
= render "home/tagline"
|
||||
|
||||
#panes
|
||||
= render partial: "home/brandstory"
|
||||
= render partial: "home/system"
|
||||
= render partial: "home/cta"
|
||||
= render partial: "home/stats"
|
||||
= render "home/brandstory"
|
||||
|
||||
= render partial: "shared/footer"
|
||||
- if feature? :connect_learn_homepage
|
||||
= render "home/learn"
|
||||
= render "home/connect"
|
||||
= render "home/system"
|
||||
- else
|
||||
= render "home/system"
|
||||
= render "home/cta"
|
||||
|
||||
= render "home/stats"
|
||||
|
||||
|
||||
= render "shared/footer"
|
||||
|
||||
50
app/views/home/sell.html.haml
Normal file
50
app/views/home/sell.html.haml
Normal file
@@ -0,0 +1,50 @@
|
||||
- content_for(:title) do
|
||||
= t :sell_title
|
||||
|
||||
#panes
|
||||
#sell.pane
|
||||
.row.header
|
||||
.small-12.medium-12.columns.text-center
|
||||
%h2
|
||||
= t :sell_headline
|
||||
.row.content
|
||||
.small-12.medium-6.medium-offset-3.columns.text-center
|
||||
%p.text-big
|
||||
= t :sell_motivation
|
||||
|
||||
#sell-detail.pane
|
||||
.row
|
||||
.small-12.medium-4.columns.text-center
|
||||
%h3= t :sell_producers
|
||||
%p
|
||||
= t :sell_producers_detail
|
||||
%a{href: "https://openfoodnetwork.org/user-guide/"}= t(:sell_user_guide)
|
||||
%a.button.transparent{href: signup_producers_path}
|
||||
= t :register_title
|
||||
|
||||
.small-12.medium-4.columns.text-center
|
||||
%h3= t :sell_hubs
|
||||
%p
|
||||
= t :sell_hubs_detail
|
||||
%a{href: "https://openfoodnetwork.org/user-guide/"}= t(:sell_user_guide)
|
||||
%a.button.transparent{href: signup_shops_path}
|
||||
= t :register_title
|
||||
|
||||
.small-12.medium-4.columns.text-center
|
||||
%h3= t :sell_groups
|
||||
%p
|
||||
= t :sell_groups_detail
|
||||
%a{href: "https://openfoodnetwork.org/user-guide/"}= t(:sell_user_guide)
|
||||
%a.button.transparent{href: signup_groups_path}
|
||||
= t :register_title
|
||||
|
||||
.row
|
||||
.small-12.medium-12.columns.text-center
|
||||
%p= t :sell_listing_price
|
||||
|
||||
%p
|
||||
= t :sell_embed
|
||||
%a{href: "hello@openfoodnetwork.org".reverse, target: '_blank', mailto: true}
|
||||
= t :sell_ask_services
|
||||
|
||||
= render "shared/footer"
|
||||
@@ -1 +0,0 @@
|
||||
%li= link_to 'Spree Admin', spree.admin_path
|
||||
@@ -1,34 +0,0 @@
|
||||
/ %script = Spree.api_key = raw(try_spree_current_user.try(:spree_api_key).to_s.inspect)
|
||||
|
||||
= t :ofn_cart_headline
|
||||
= spree_current_user.andand.email
|
||||
%div{ 'ng-app' => 'store', 'ng-controller' => 'CartCtrl', 'ng-init' => "loadCart(#{spree_current_user.andand.cart.andand.id});" }
|
||||
{{cart}} {{state}}
|
||||
%br
|
||||
%br
|
||||
%ul
|
||||
%li(ng-repeat="order in cart.orders")
|
||||
%strong
|
||||
= t :ofn_cart_distributor
|
||||
{{order.distributor}}
|
||||
%strong
|
||||
= t :ofn_cart_oc
|
||||
{{order.order_cycle.andand.name}}
|
||||
%strong
|
||||
= t :ofn_cart_from
|
||||
{{order.order_cycle.andand.orders_open_at}}
|
||||
%strong
|
||||
= t :ofn_cart_to
|
||||
{{order.order_cycle.andand.orders_close_at}}
|
||||
%ul
|
||||
%li(ng-repeat="line_item in order.line_items")
|
||||
%strong
|
||||
= t :ofn_cart_product
|
||||
{{line_item.name}}
|
||||
%strong
|
||||
= t :ofn_cart_quatity
|
||||
{{line_item.quantity}}
|
||||
%button
|
||||
= t :ofn_cart_send
|
||||
%br
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
- if order_cycles_enabled?
|
||||
#distribution-choice
|
||||
- if current_distributor.present?
|
||||
%p
|
||||
%strong
|
||||
= t :ocs_choice_distributor
|
||||
= current_distributor.name
|
||||
|
||||
- if current_order_cycle.present?
|
||||
%p
|
||||
%strong
|
||||
= t :ocs_choice_oc
|
||||
= current_order_cycle.name
|
||||
|
||||
- if current_distributor.nil? && current_order_cycle.nil?
|
||||
%p
|
||||
= t :ocs_choice_text
|
||||
@@ -1,17 +0,0 @@
|
||||
.columns.two= image_tag 'pickup.png'
|
||||
.columns.nine
|
||||
%h2
|
||||
= t :ocs_closed_headline
|
||||
%p
|
||||
- if most_recently_closed = OrderCycle.most_recently_closed_for(@enterprise)
|
||||
= t :ocs_closed_time, time: distance_of_time_in_words_to_now(most_recently_closed.orders_close_at)
|
||||
= t :ocs_closed_contact
|
||||
|
||||
- if next_oc = OrderCycle.first_opening_for(@enterprise)
|
||||
%h4
|
||||
= t :ocs_closed_opens, time: distance_of_time_in_words_to_now(next_oc.orders_open_at)
|
||||
|
||||
%p
|
||||
= t(:ocs_closed_email, email: current_distributor.email_address) if current_distributor.email_address
|
||||
%br/
|
||||
= t(:ocs_closed_phone, phone: current_distributor.phone) if current_distributor.phone
|
||||
@@ -1,12 +0,0 @@
|
||||
.columns.six
|
||||
%h1
|
||||
= t :ocs_pickup_time, pickup_time: pickup_time
|
||||
%i
|
||||
= link_to t(:ocs_change_date), spree.clear_orders_path, :id => 'reset_order_cycle'
|
||||
= t :ocs_change_date_notice
|
||||
.columns.five
|
||||
.row
|
||||
%strong
|
||||
= t :ocs_close_time
|
||||
.countdown-panel
|
||||
%h1= distance_of_time_in_words_to_now(current_order_cycle.orders_close_at)
|
||||
@@ -1,12 +0,0 @@
|
||||
.columns.two= image_tag 'pickup.png'
|
||||
.columns.six
|
||||
%h2
|
||||
= t :ocs_when_headline
|
||||
%p
|
||||
= t :ocs_when_text
|
||||
.columns.three
|
||||
= form_for current_order(true), :html => {:id => 'order_cycle_select'} do |f|
|
||||
= f.hidden_field :distributor_id, :value => @enterprise.id
|
||||
.order-cycles
|
||||
= f.select :order_cycle_id, order_cycle_options, {include_blank: t(:ocs_when_closing)}
|
||||
= hidden_field_tag :commit, t(:ocs_when_choose)
|
||||
@@ -1,15 +0,0 @@
|
||||
- if order_cycles_enabled?
|
||||
#distribution-selection.row
|
||||
|
||||
- if current_order_cycle# && current_order_cycle.exchanges.to_enterprises(current_distributor).outgoing.any?
|
||||
= render partial: "order_cycles/orders_current"
|
||||
|
||||
- elsif order_cycle_options.empty?
|
||||
= render partial: "order_cycles/orders_closed"
|
||||
|
||||
- else
|
||||
= render partial: "order_cycles/orders_open"
|
||||
|
||||
%p
|
||||
%strong= link_to t(:ocs_list), shop_path
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.small-12.medium-6.columns.text-right
|
||||
|
||||
|
||||
.row.animate-show{"ng-show" => "filtersActive"}
|
||||
.row.animate-show.filter-row{"ng-show" => "filtersActive"}
|
||||
.small-12.columns
|
||||
.row.filter-box
|
||||
.small-12.columns
|
||||
@@ -12,4 +12,12 @@
|
||||
= t :producers_filter
|
||||
= t :producers_filter_type
|
||||
%filter-selector.small-block-grid-2.medium-block-grid-4.large-block-grid-6{"selector-set" => "filterSelectors", objects: "producers_to_filter | searchEnterprises:query | taxonsOf", "active-selectors" => "activeTaxons"}
|
||||
|
||||
%h5.tdhead
|
||||
.light
|
||||
= t :producers_filter
|
||||
= t :producers_filter_property
|
||||
.filter-shopfront.property-selectors
|
||||
%single-line-selectors{ selectors: "filterSelectors", objects: "producers_to_filter | searchEnterprises:query | propertiesOf", "active-selectors" => "activeProperties"}
|
||||
|
||||
= render partial: 'shared/components/filter_box'
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
.small-12.columns
|
||||
.active_table
|
||||
%producer.active_table_node.row.animate-repeat{id: "{{producer.path}}",
|
||||
"ng-repeat" => "producer in filteredEnterprises = (Enterprises.producers | visible | searchEnterprises:query | taxons:activeTaxons)",
|
||||
"ng-repeat" => "producer in filteredEnterprises = (Enterprises.producers | visible | searchEnterprises:query | taxons:activeTaxons | properties:activeProperties)",
|
||||
"ng-controller" => "ProducerNodeCtrl",
|
||||
"ng-class" => "{'closed' : !open(), 'open' : open(), 'inactive' : !producer.active}",
|
||||
id: "{{producer.hash}}"}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
-# Include all stylesheets except reset (which overrides Spree styles)
|
||||
-# Then restore styles which override Spree's
|
||||
-# See cms/app/views/layouts/cms_admin/_head.html.erb
|
||||
= stylesheet_link_tag 'comfortable_mexican_sofa/structure',
|
||||
'comfortable_mexican_sofa/typography',
|
||||
'comfortable_mexican_sofa/form',
|
||||
'comfortable_mexican_sofa/content',
|
||||
'comfortable_mexican_sofa/files',
|
||||
'comfortable_mexican_sofa/elrte',
|
||||
'comfortable_mexican_sofa/codemirror',
|
||||
'comfortable_mexican_sofa/jquery_ui',
|
||||
'comfortable_mexican_sofa/dialogs',
|
||||
'comfortable_mexican_sofa/widgets',
|
||||
'admin/restore_spree_from_cms'
|
||||
|
||||
= javascript_include_tag('comfortable_mexican_sofa/application')
|
||||
|
||||
%meta{:name => "cms-admin-path", :content => ComfortableMexicanSofa.config.admin_route_prefix}
|
||||
%meta{:name => "cms-locale", :content => I18n.locale}
|
||||
12
app/views/shared/_connect_learn_call.html.haml
Normal file
12
app/views/shared/_connect_learn_call.html.haml
Normal file
@@ -0,0 +1,12 @@
|
||||
:css
|
||||
.page-alert .alert-box { background-color: #fdddac; }
|
||||
|
||||
.alert-cta
|
||||
%h6
|
||||
Open Food Network
|
||||
%strong
|
||||
= link_to t(:label_connect), "https://openfoodnetwork.org/au/connect/", target: '_blank'
|
||||
and
|
||||
%strong
|
||||
= link_to t(:label_learn), "https://openfoodnetwork.org/au/learn/", target: '_blank'
|
||||
\- Go exploring and get inspired!
|
||||
@@ -113,17 +113,9 @@
|
||||
%h4
|
||||
= t :footer_join_headline
|
||||
%p
|
||||
%a{href: "/producers/signup"}
|
||||
= t :footer_join_producers
|
||||
%p
|
||||
%a{href: "/shops/signup"}
|
||||
= t :footer_join_hubs
|
||||
%p
|
||||
%a{href: "/groups/signup"}
|
||||
= t :footer_join_groups
|
||||
%p
|
||||
%a{href: "http://www.openfoodnetwork.org/platform/food-system-partners/", target: "_blank"}
|
||||
= t :footer_join_partners
|
||||
= t :footer_join_body
|
||||
%a{href: "/sell"}
|
||||
= t :footer_join_cta
|
||||
|
||||
.medium-2.columns.text-center
|
||||
/ Placeholder
|
||||
|
||||
5
app/views/shared/_page_alert.html.haml
Normal file
5
app/views/shared/_page_alert.html.haml
Normal file
@@ -0,0 +1,5 @@
|
||||
- if feature? :connect_learn_homepage
|
||||
= render "shared/connect_learn_call"
|
||||
|
||||
- else
|
||||
= render "shared/register_call"
|
||||
@@ -1,7 +1,8 @@
|
||||
%a.alert-cta{href: registration_path, target: "_blank"}
|
||||
.alert-cta
|
||||
%h6
|
||||
= t '.selling_on_ofn'
|
||||
|
||||
%strong
|
||||
= t '.register'
|
||||
%i.ofn-i_054-point-right
|
||||
%a{href: registration_path, target: "_blank"}
|
||||
= t '.selling_on_ofn'
|
||||
|
||||
%strong
|
||||
= t '.register'
|
||||
%i.ofn-i_054-point-right
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.text-center.page-alert.fixed{ "ofn-page-alert" => true }
|
||||
.alert-box
|
||||
= render 'shared/register_call'
|
||||
= render 'shared/page_alert'
|
||||
%a.close{ ng: { click: "close()" } } ×
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
%a.button.primary.tiny{href: checkout_path, "ng-disabled" => "Cart.dirty || Cart.empty()"}
|
||||
= t 'checkout'
|
||||
%table
|
||||
%tr.product-cart{"ng-repeat" => "line_item in Cart.line_items_present()",
|
||||
"ng-controller" => "LineItemCtrl", "id" => "cart-variant-{{ line_item.variant.id }}"}
|
||||
%tr.product-cart{"ng-repeat" => "line_item in Cart.line_items", "id" => "cart-variant-{{ line_item.variant.id }}"}
|
||||
%td
|
||||
%small
|
||||
%strong
|
||||
@@ -33,9 +32,9 @@
|
||||
%small
|
||||
\=
|
||||
%strong
|
||||
.total-price.right {{ line_item.variant.totalPrice() | localizeCurrency }}
|
||||
.total-price.right {{ line_item.total_price | localizeCurrency }}
|
||||
|
||||
%table{"ng-show" => "Cart.line_items_present().length > 0"}
|
||||
%table{"ng-show" => "Cart.line_items.length > 0"}
|
||||
%tr.total-cart
|
||||
%td
|
||||
%em
|
||||
|
||||
@@ -17,14 +17,25 @@
|
||||
%a{href: main_app.producers_path}
|
||||
%span.nav-primary
|
||||
= t 'label_producers'
|
||||
%li
|
||||
%a{href: main_app.groups_path}
|
||||
%span.nav-primary
|
||||
= t 'label_groups'
|
||||
%li
|
||||
%a{href: ContentConfig.footer_about_url}
|
||||
%span.nav-primary
|
||||
= t 'label_about'
|
||||
- if feature? :connect_learn_homepage
|
||||
%li
|
||||
%a{href: "https://openfoodnetwork.org/au/connect/"}
|
||||
%span.nav-primary
|
||||
= t 'label_connect'
|
||||
%li
|
||||
%a{href: "https://openfoodnetwork.org/au/learn/"}
|
||||
%span.nav-primary
|
||||
= t 'label_learn'
|
||||
- else
|
||||
%li
|
||||
%a{href: main_app.groups_path}
|
||||
%span.nav-primary
|
||||
= t 'label_groups'
|
||||
%li
|
||||
%a{href: ContentConfig.footer_about_url}
|
||||
%span.nav-primary
|
||||
= t 'label_about'
|
||||
|
||||
%ul.right
|
||||
- if spree_current_user.nil?
|
||||
= render 'shared/signed_out'
|
||||
|
||||
@@ -41,15 +41,15 @@
|
||||
%i.ofn-i_036-producers
|
||||
= t 'label_producers'
|
||||
%li.li-menu
|
||||
%a{href: main_app.groups_path}
|
||||
%a{href: "https://openfoodnetwork.org/au/connect/"}
|
||||
%span.nav-primary
|
||||
%i.ofn-i_035-groups
|
||||
= t 'label_groups'
|
||||
= t 'label_connect'
|
||||
%li.li-menu
|
||||
%a{href: ContentConfig.footer_about_url}
|
||||
%a{href: "https://openfoodnetwork.org/au/learn/"}
|
||||
%span.nav-primary
|
||||
%i.ofn-i_013-help
|
||||
= t 'label_about'
|
||||
= t 'label_learn'
|
||||
|
||||
%li
|
||||
- if spree_current_user.nil?
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
.footer-pad.small-12.columns
|
||||
%products{"ng-controller" => "ProductsCtrl", "ng-show" => "order_cycle.order_cycle_id != null", "ng-cloak" => true,
|
||||
"infinite-scroll" => "incrementLimit()", "infinite-scroll-distance" => "1"}
|
||||
%products{"ng-controller" => "ProductsCtrl", "ng-show" => "order_cycle.order_cycle_id != null", "ng-cloak" => true }
|
||||
|
||||
// TODO: Needs an ng-show to slide content down
|
||||
.row.animate-slide{ "ng-show" => "query || appliedPropertiesList() || appliedTaxonsList()" }
|
||||
@@ -29,12 +28,18 @@
|
||||
.small-12.medium-6.large-6.large-offset-1.columns
|
||||
= render partial: "shop/products/filters"
|
||||
|
||||
%div.pad-top
|
||||
%product.animate-repeat{"ng-controller" => "ProductNodeCtrl", "ng-repeat" => "product in filteredProducts = (Products.products | products:query | taxons:activeTaxons | properties: activeProperties) track by product.id ", "id" => "product-{{ product.id }}"}
|
||||
%div.pad-top{ "infinite-scroll" => "incrementLimit()", "infinite-scroll-distance" => "1", "infinite-scroll-disabled" => 'filteredProducts.length <= limit' }
|
||||
%product.animate-repeat{"ng-controller" => "ProductNodeCtrl", "ng-repeat" => "product in visibleProducts track by product.id", "id" => "product-{{ product.id }}"}
|
||||
= render "shop/products/summary"
|
||||
%shop-variant{variant: 'product.master', "ng-if" => "::!product.hasVariants", "id" => "variant-{{ product.master.id }}"}
|
||||
%shop-variant{variant: 'variant', "ng-repeat" => "variant in product.variants track by variant.id", "id" => "variant-{{ variant.id }}", "ng-class" => "{'out-of-stock': !variant.on_demand && variant.count_on_hand == 0}"}
|
||||
|
||||
-# Load more button, which can be used to initiate infinite scrolling.
|
||||
-# %product{ "ng-hide" => "Products.loading || !infiniteDisabled || limit >= filteredProducts.length" }
|
||||
-# .row.summary
|
||||
-# .small-12.columns.text-center
|
||||
-# %a.button{ ng: { click: 'infiniteDisabled = false; incrementLimit();' } }
|
||||
-# Load More Products
|
||||
|
||||
%product{"ng-show" => "Products.loading"}
|
||||
.row.summary
|
||||
.small-12.columns.text-center
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
%span{"ng-bind" => "::enterprise.name"}
|
||||
.small-2.medium-2.large-1.columns.text-center
|
||||
.taxon-flag
|
||||
%render-svg{path: "{{product.primary_taxon.icon}}"}
|
||||
%render-svg{path: "{{::product.primary_taxon.icon}}"}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
= render :partial => 'order_cycles/choice'
|
||||
= render :partial => 'spree/shared/taxonomies'
|
||||
= render :partial => 'spree/shared/filters'
|
||||
= render :partial => 'spree/products/source_sidebar'
|
||||
@@ -7,7 +7,7 @@
|
||||
- elsif !distributor_available_for?(order, @product)
|
||||
= render 'add_to_cart_distributor_unavailable'
|
||||
|
||||
- elsif !order_cycle_available_for?(order, @product) and order_cycles_enabled?
|
||||
- elsif !order_cycle_available_for?(order, @product)
|
||||
= render 'add_to_cart_order_cycle_unavailable'
|
||||
|
||||
- else
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
%nav#filters
|
||||
%div#distributor_filter
|
||||
%h6.filter_name Shop by Distributor
|
||||
%ul.filter_choices
|
||||
- order = current_order(false)
|
||||
- validator = DistributionChangeValidator.new(order)
|
||||
- @sidebar_distributors.each do |distributor|
|
||||
%li.nowrap
|
||||
- if order.nil? || order.distributor == distributor || validator.can_change_to_distributor?(distributor)
|
||||
= link_to distributor.name, [main_app, distributor]
|
||||
- else
|
||||
%abbr(title="One or more of the products in your cart is not available from this distributor")= distributor.name
|
||||
- if @total_distributors > @sidebar_distributors.length
|
||||
- distributors_more = @total_distributors - @sidebar_distributors.length
|
||||
%span.filter_more
|
||||
= "#{distributors_more} more..."
|
||||
= button_to 'Browse All Distributors', main_app.distributors_enterprises_path, :method => :get
|
||||
|
||||
%div#supplier_filter
|
||||
%h6.filter_name Shop by Supplier
|
||||
%ul.filter_choices
|
||||
- @sidebar_suppliers.each do |supplier|
|
||||
%li.nowrap= link_to supplier.name, [main_app, supplier]
|
||||
- if @total_suppliers > @sidebar_suppliers.length
|
||||
- suppliers_more = @total_suppliers - @sidebar_suppliers.length
|
||||
%span.filter_more
|
||||
= "#{suppliers_more} more..."
|
||||
= button_to 'Browse All Suppliers', main_app.suppliers_enterprises_path, :method => :get
|
||||
@@ -1,3 +0,0 @@
|
||||
- if @cms_site
|
||||
- @cms_site.pages.root.children.published.each do |page|
|
||||
%li= link_to page.label, page.full_path
|
||||
@@ -1,3 +0,0 @@
|
||||
|
||||
- if OpenFoodNetwork::FeatureToggle.enabled? :multi_cart
|
||||
= render :partial => 'open_food_network/cart/show'
|
||||
@@ -1,16 +0,0 @@
|
||||
%div(data-hook='homepage_products')
|
||||
= home_page_cms_content
|
||||
|
||||
- if @products
|
||||
#products= render 'spree/shared/products', :products => @products, :taxon => @taxon
|
||||
- else
|
||||
#products-local
|
||||
%h2
|
||||
= t :products
|
||||
= t :products_in, oc: current_order_cycle.name if current_order_cycle
|
||||
= t :products_at, distributor: current_distributor.name if current_distributor
|
||||
= render 'spree/shared/products', :products => @products_local, :taxon => @taxon
|
||||
#products-remote
|
||||
%h2
|
||||
= t :products_elsewhere
|
||||
= render 'spree/shared/products', :products => @products_remote, :taxon => @taxon
|
||||
@@ -1,4 +1,4 @@
|
||||
require File.expand_path('../boot', __FILE__)
|
||||
require_relative 'boot'
|
||||
|
||||
require 'rails/all'
|
||||
|
||||
@@ -100,10 +100,9 @@ module Openfoodnetwork
|
||||
# http://stackoverflow.com/questions/8012434/what-is-the-purpose-of-config-assets-precompile
|
||||
config.assets.initialize_on_precompile = true
|
||||
config.assets.precompile += ['store/all.css', 'store/all.js', 'store/shop_front.js', 'iehack.js']
|
||||
config.assets.precompile += ['admin/all.css', 'admin/restore_spree_from_cms.css', 'admin/*.js', 'admin/**/*.js']
|
||||
config.assets.precompile += ['admin/all.css', 'admin/*.js', 'admin/**/*.js']
|
||||
config.assets.precompile += ['darkswarm/all.css', 'darkswarm/all_split2.css', 'darkswarm/all.js']
|
||||
config.assets.precompile += ['mail/all.css']
|
||||
config.assets.precompile += ['comfortable_mexican_sofa/*']
|
||||
config.assets.precompile += ['search/all.css', 'search/*.js']
|
||||
config.assets.precompile += ['shared/*']
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Load the rails application
|
||||
require File.expand_path('../application', __FILE__)
|
||||
require_relative 'application'
|
||||
|
||||
# Initialize the rails application
|
||||
Openfoodnetwork::Application.initialize!
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
# encoding: utf-8
|
||||
|
||||
ComfortableMexicanSofa.configure do |config|
|
||||
# Title of the admin area
|
||||
# config.cms_title = 'ComfortableMexicanSofa CMS Engine'
|
||||
|
||||
# Module responsible for authentication. You can replace it with your own.
|
||||
# It simply needs to have #authenticate method. See http_auth.rb for reference.
|
||||
config.admin_auth = 'CmsSpreeAuth'
|
||||
|
||||
# Module responsible for public authentication. Similar to the above. You also
|
||||
# will have access to @cms_site, @cms_layout, @cms_page so you can use them in
|
||||
# your logic. Default module doesn't do anything.
|
||||
# config.public_auth = 'ComfortableMexicanSofa::DummyAuth'
|
||||
|
||||
# Default url to access admin area is http://yourhost/cms-admin/
|
||||
# You can change 'cms-admin' to 'admin', for example. To disable admin area
|
||||
# entirely set this to '' or nil
|
||||
# config.admin_route_prefix = 'cms-admin'
|
||||
|
||||
# When arriving at /cms-admin you may chose to redirect to arbirtary path,
|
||||
# for example '/cms-admin/users'
|
||||
# config.admin_route_redirect = ''
|
||||
|
||||
# Normally we include default routes from https://github.com/comfy/comfortable-mexican-sofa/blob/master/config/routes.rb
|
||||
# If you want to include the routes manually set this to false
|
||||
# config.use_default_routes = true
|
||||
|
||||
# /sitemap.xml that is used by search engines for indexing. It's enabled by
|
||||
# default, but you may turn it off.
|
||||
# config.enable_sitemap = true
|
||||
|
||||
# File uploads use Paperclip and can support filesystem or s3 uploads. Override
|
||||
# the upload method and appropriate settings based on Paperclip. For S3 see:
|
||||
# http://rdoc.info/gems/paperclip/2.3.8/Paperclip/Storage/S3, and for
|
||||
# filesystem see: http://rdoc.info/gems/paperclip/2.3.8/Paperclip/Storage/Filesystem
|
||||
config.upload_file_options = {
|
||||
:storage => 's3',
|
||||
:s3_protocol => :https,
|
||||
:s3_credentials => {
|
||||
:bucket => Spree::Config[:s3_bucket],
|
||||
:access_key_id => Spree::Config[:s3_access_key],
|
||||
:secret_access_key => Spree::Config[:s3_secret]
|
||||
}
|
||||
}
|
||||
|
||||
# Sofa allows you to setup entire site from files. Database is updated with each
|
||||
# request (if necessary). Please note that database entries are destroyed if there's
|
||||
# no corresponding file. Fixtures are disabled by default.
|
||||
# config.enable_fixtures = false
|
||||
|
||||
# Path where fixtures can be located.
|
||||
# config.fixtures_path = File.expand_path('db/cms_fixtures', Rails.root)
|
||||
|
||||
# Importing fixtures into Database
|
||||
# To load fixtures into the database just run this rake task:
|
||||
# local: $ rake comfortable_mexican_sofa:fixtures:import FROM=example.local TO=localhost
|
||||
# Heroku: $ heroku run rake comfortable_mexican_sofa:fixtures:import FROM=example.local TO=yourapp.herokuapp.com
|
||||
# From indicates folder the fixtures are in and to is the Site hostname you have defined in the database.
|
||||
|
||||
# Exporting fixtures into Files
|
||||
# If you need to dump database contents into fixture files run:
|
||||
# local: $ rake comfortable_mexican_sofa:fixtures:export FROM=localhost TO=example.local
|
||||
# Heroku: $ heroku run rake comfortable_mexican_sofa:fixtures:export FROM=yourapp.herokuapp.com TO=example.local
|
||||
# This will create example.local folder and dump all content from example.com Site.
|
||||
|
||||
# Content for Layouts, Pages and Snippets has a revision history. You can revert
|
||||
# a previous version using this system. You can control how many revisions per
|
||||
# object you want to keep. Set it to 0 if you wish to turn this feature off.
|
||||
# config.revisions_limit = 25
|
||||
|
||||
# Locale definitions. If you want to define your own locale merge
|
||||
# {:locale => 'Locale Title'} with this.
|
||||
# config.locales = {:en => 'English', :es => 'Español'}
|
||||
|
||||
# Admin interface will respect the locale of the site being managed. However you can
|
||||
# force it to English by setting this to `:en`
|
||||
# config.admin_locale = nil
|
||||
|
||||
# If you want to keep your CMS tables in a location other than the default database
|
||||
# add a database_config. For example, setting it to 'cms' will look for a cms_#{Rails.env}
|
||||
# definition in your database.yml file
|
||||
# config.database_config = nil
|
||||
|
||||
# A class that is included as a sweeper to admin base controller if it's set
|
||||
# config.admin_cache_sweeper = nil
|
||||
|
||||
# By default you cannot have irb code inside your layouts/pages/snippets.
|
||||
# Generally this is to prevent putting something like this:
|
||||
# <% User.delete_all %> but if you really want to allow it...
|
||||
# config.allow_irb = false
|
||||
|
||||
# Whitelist of all helper methods that can be used via {{cms:helper}} tag. By default
|
||||
# all helpers are allowed except `eval`, `send`, `call` and few others. Empty array
|
||||
# will prevent rendering of all helpers.
|
||||
# config.allowed_helpers = nil
|
||||
|
||||
# Whitelist of partials paths that can be used via {{cms:partial}} tag. All partials
|
||||
# are accessible by default. Empty array will prevent rendering of all partials.
|
||||
# config.allowed_partials = nil
|
||||
|
||||
# Site aliases, if you want to have aliases for your site. Good for harmonizing
|
||||
# production env with dev/testing envs.
|
||||
# e.g. config.site_aliases = {'host.com' => 'host.inv', 'host_a.com' => ['host.lvh.me', 'host.dev']}
|
||||
# Default is nil (not used)
|
||||
# config.hostname_aliases = nil
|
||||
|
||||
end
|
||||
|
||||
module CmsSpreeAuth
|
||||
def authenticate
|
||||
unless spree_current_user && spree_current_user.has_spree_role?('admin')
|
||||
redirect_to spree.login_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Default credentials for ComfortableMexicanSofa::HttpAuth
|
||||
# YOU REALLY WANT TO CHANGE THIS BEFORE PUTTING YOUR SITE LIVE
|
||||
ComfortableMexicanSofa::HttpAuth.username = 'username'
|
||||
ComfortableMexicanSofa::HttpAuth.password = 'password'
|
||||
|
||||
# If you need to inject some html in cms admin views you can define what partial
|
||||
# should be rendered into the following areas:
|
||||
# ComfortableMexicanSofa::ViewHooks.add(:navigation, '/layouts/admin/navigation')
|
||||
# ComfortableMexicanSofa::ViewHooks.add(:html_head, '/layouts/admin/html_head')
|
||||
# ComfortableMexicanSofa::ViewHooks.add(:page_form, '/layouts/admin/page_form')
|
||||
ComfortableMexicanSofa::ViewHooks.add(:navigation, 'layouts/cms_nav_spree')
|
||||
|
||||
# Provide some Spree helpers to the CMS controller so it can render Spree's layout
|
||||
ComfortableMexicanSofa::CmsContentController.class_eval do
|
||||
helper 'spree/base'
|
||||
include Spree::Core::ControllerHelpers
|
||||
include Spree::Core::Engine.routes.url_helpers
|
||||
end
|
||||
9
config/initializers/postgres.rb
Normal file
9
config/initializers/postgres.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
module ActiveRecord
|
||||
module ConnectionAdapters # :nodoc:
|
||||
module SchemaStatements
|
||||
def drop_table_cascade(table_name, options = {})
|
||||
execute "DROP TABLE #{quote_table_name(table_name)} CASCADE"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,22 +1,26 @@
|
||||
# Localization file for British English. Add more files in this directory for other locales.
|
||||
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
||||
# English language file
|
||||
# ---------------------
|
||||
#
|
||||
# This is the source language file maintained by the Australian OFN team.
|
||||
# Visit Transifex to translate this file into other languages:
|
||||
#
|
||||
# https://www.transifex.com/open-food-foundation/open-food-network/
|
||||
#
|
||||
# If you translate this file in a text editor, please share your results with us by
|
||||
#
|
||||
# - uploading the file to Transifex or
|
||||
# - opening a pull request at GitHub.
|
||||
#
|
||||
#
|
||||
# See http://community.openfoodnetwork.org/t/localisation-ofn-in-your-language/397
|
||||
|
||||
|
||||
en-GB:
|
||||
en_GB:
|
||||
activerecord:
|
||||
errors:
|
||||
models:
|
||||
spree/user:
|
||||
attributes:
|
||||
password:
|
||||
confirmation: you have successfully registered
|
||||
too_short: pick a longer name
|
||||
# Overridden here due to a bug in spree i18n (Issue #870)
|
||||
attributes:
|
||||
spree/order:
|
||||
payment_state: Payment State
|
||||
shipment_state: Shipment State
|
||||
|
||||
devise:
|
||||
failure:
|
||||
invalid: |
|
||||
@@ -28,13 +32,18 @@ en-GB:
|
||||
not_confirmed: Your email address could not be confirmed. Perhaps you have already completed this step?
|
||||
confirmation_sent: "Confirmation email sent!"
|
||||
confirmation_not_sent: "Could not send a confirmation email."
|
||||
enterprise_mailer:
|
||||
confirmation_instructions:
|
||||
subject: "Please confirm the email address for %{enterprise}"
|
||||
welcome:
|
||||
subject: "%{enterprise} is now on %{sitename}"
|
||||
home: "OFN"
|
||||
title: Open Food Network
|
||||
welcome_to: 'Welcome to '
|
||||
site_meta_description: "We begin from the ground up. With farmers and growers ready to tell their stories proudly and truly. With distributors ready to connect people with products fairly and honestly. With buyers who believe that better weekly shopping decisions can…"
|
||||
site_meta_description: "We begin from the ground up. With farmers and growers ready to tell their stories proudly and truly. With distributors ready to connect people with products fairly and honestly. With buyers who believe that better weekly shopping decisions can seriously change the world."
|
||||
search_by_name: Search by name...
|
||||
producers: UK Producers
|
||||
producers_join: UK producers are now welcome to join Open Food Network UK.
|
||||
producers: 'UK Producers'
|
||||
producers_join: UK producers are now welcome to join Open Food Network UK. #FIXME
|
||||
charges_sales_tax: Charges VAT?
|
||||
print_invoice: "Print Invoice"
|
||||
send_invoice: "Send Invoice"
|
||||
@@ -45,6 +54,7 @@ en-GB:
|
||||
cancel_order: "Cancel Order"
|
||||
confirm_send_invoice: "An invoice for this order will be sent to the customer. Are you sure you want to continue?"
|
||||
confirm_resend_order_confirmation: "Are you sure you want to resend the order confirmation email?"
|
||||
must_have_valid_business_number: "Please enter your company number."
|
||||
invoice: "Invoice"
|
||||
percentage_of_sales: "%{percentage} of sales"
|
||||
percentage_of_turnover: "Percentage of turnover"
|
||||
@@ -53,31 +63,41 @@ en-GB:
|
||||
per_month: "per month"
|
||||
free: "free"
|
||||
free_trial: "free trial"
|
||||
plus_tax: "plus GST"
|
||||
total_monthly_bill_incl_tax: "Total Monthly Bill (Incl. Tax)"
|
||||
plus_tax: "plus VAT"
|
||||
total_monthly_bill_incl_tax: "Total Monthly Bill (Incl. VAT)"
|
||||
min_bill_turnover_desc: "once turnover exceeds %{mbt_amount}"
|
||||
business_model_configuration: "Business model configuration"
|
||||
say_no: "No"
|
||||
say_yes: "Yes"
|
||||
then: then
|
||||
|
||||
sort_order_cycles_on_shopfront_by: "Sort Order Cycles On Shopfront By"
|
||||
|
||||
# To customise text in emails.
|
||||
producer_mail_greeting: "Dear"
|
||||
producer_mail_text_before: "We now have all the consumer orders for the next food drop."
|
||||
producer_mail_order_text: "Here is a summary of the orders for your products:"
|
||||
producer_mail_delivery_instructions: "Stock pickup/delivery instructions:"
|
||||
producer_mail_text_after: "Please confirm that you have got this email. Please send me an invoice for this amount so that we can send you payment. If you need to phone me on the day, please use the number below."
|
||||
producer_mail_signoff: "Thanks and best wishes"
|
||||
|
||||
admin:
|
||||
# Common properties / models
|
||||
date: Date
|
||||
email: Email
|
||||
name: Name
|
||||
on_hand: In Stock
|
||||
on_demand: On Demand
|
||||
on_demand?: On Demand?
|
||||
order_cycle: Order Cycle
|
||||
phone: Phone
|
||||
price: Price
|
||||
producer: Producer
|
||||
product: Product
|
||||
quantity: Quantity
|
||||
shop: Shop
|
||||
sku: SKU
|
||||
tags: Tags
|
||||
variant: Variant
|
||||
|
||||
# General form elements
|
||||
quick_search: Quick Search
|
||||
clear_all: Clear All
|
||||
producer: Producer
|
||||
shop: Shop
|
||||
product: Product
|
||||
variant: Variant
|
||||
start_date: "Start Date"
|
||||
end_date: "End Date"
|
||||
|
||||
columns: Columns
|
||||
actions: Actions
|
||||
@@ -85,42 +105,86 @@ en-GB:
|
||||
|
||||
whats_this: What's this?
|
||||
|
||||
tag_has_rules: "Existing rules for this tag: %{num}"
|
||||
has_one_rule: "has one rule"
|
||||
has_n_rules: "has %{num} rules"
|
||||
|
||||
customers:
|
||||
index:
|
||||
add_customer: "Add customer"
|
||||
add_customer: "Add Customer"
|
||||
new_customer: "New Customer"
|
||||
customer_placeholder: "customer@example.org"
|
||||
inventory:
|
||||
title: Inventory
|
||||
description: Use this page to manage inventories for your enterprises. Any product details set here will override those set on the 'Products' page
|
||||
sku: SKU
|
||||
price: Price
|
||||
on_hand: On Hand
|
||||
on_demand: On Demand?
|
||||
enable_reset: Enable Stock Level Reset?
|
||||
inherit: Inherit?
|
||||
add: Add
|
||||
hide: Hide
|
||||
select_a_shop: Select A Shop
|
||||
review_now: Review Now
|
||||
new_products_alert_message: There are %{new_product_count} new products available to add to your inventory.
|
||||
currently_empty: Your inventory is currently empty
|
||||
no_matching_products: No matching products found in your inventory
|
||||
no_hidden_products: No products have been hidden from this inventory
|
||||
no_matching_hidden_products: No hidden products match your search criteria
|
||||
no_new_products: No new products are available to add to this inventory
|
||||
no_matching_new_products: No new products match your search criteria
|
||||
inventory_powertip: This is your inventory of products. To add products to your inventory, select 'New Products' from the Viewing dropdown.
|
||||
hidden_powertip: These products have been hidden from your inventory and will not be available to add to your shop. You can click 'Add' to add a product to you inventory.
|
||||
new_powertip: These products are available to be added to your inventory. Click 'Add' to add a product to your inventory, or 'Hide' to hide it from view. You can always change your mind later!
|
||||
valid_email_error: Please enter a valid email address
|
||||
add_a_new_customer_for: Add a new customer for %{shop_name}
|
||||
code: Code
|
||||
duplicate_code: "This code is used already."
|
||||
|
||||
products:
|
||||
bulk_edit:
|
||||
unit: Unit
|
||||
display_as: Display As
|
||||
category: Category
|
||||
tax_category: Tax Category
|
||||
inherits_properties?: Inherits Properties?
|
||||
available_on: Available On
|
||||
av_on: "Av. On"
|
||||
|
||||
order_cycle:
|
||||
choose_products_from: "Choose Products From:"
|
||||
variant_overrides:
|
||||
index:
|
||||
title: Inventory
|
||||
description: Use this page to manage inventories for your enterprises. Any product details set here will override those set on the 'Products' page
|
||||
enable_reset?: Enable Stock Reset?
|
||||
inherit?: Inherit?
|
||||
add: Add
|
||||
hide: Hide
|
||||
select_a_shop: Select A Shop
|
||||
review_now: Review Now
|
||||
new_products_alert_message: ''
|
||||
currently_empty: Your inventory is currently empty
|
||||
no_matching_products: No matching products found in your inventory
|
||||
no_hidden_products: No products have been hidden from this inventory
|
||||
no_matching_hidden_products: No hidden products match your search criteria
|
||||
no_new_products: No new products are available to add to this inventory
|
||||
no_matching_new_products: No new products match your search criteria
|
||||
inventory_powertip: This is your inventory of products. To add products to your inventory, select 'New Products' from the Viewing dropdown.
|
||||
hidden_powertip: These products have been hidden from your inventory and will not be available to add to your shop. You can click 'Add' to add a product to you inventory.
|
||||
new_powertip: These products are available to be added to your inventory. Click 'Add' to add a product to your inventory, or 'Hide' to hide it from view. You can always change your mind later!
|
||||
|
||||
orders:
|
||||
bulk_management:
|
||||
tip: "Use this page to alter product quantities across multiple orders. Products may also be removed from orders entirely, if required."
|
||||
shared: "Shared Resource?"
|
||||
order_no: "Order No."
|
||||
order_date: "Order Date"
|
||||
max: "Max"
|
||||
product_unit: "Product: Unit"
|
||||
weight_volume: "Weight/Volume"
|
||||
ask: "Ask?"
|
||||
page_title: "Bulk Order Management"
|
||||
actions_delete: "Delete Selected"
|
||||
loading: "Loading orders"
|
||||
no_results: "No orders found."
|
||||
group_buy_unit_size: "Group Buy Unit Size"
|
||||
total_qtt_ordered: "Total Quantity Ordered"
|
||||
max_qtt_ordered: "Max Quantity Ordered"
|
||||
current_fulfilled_units: "Current Fulfilled Units"
|
||||
max_fulfilled_units: "Max Fulfilled Units"
|
||||
order_error: "Some errors must be resolved before you can update orders.\nAny fields with red borders contain errors."
|
||||
variants_without_unit_value: "WARNING: Some variants do not have a unit value"
|
||||
|
||||
order_cycles:
|
||||
edit:
|
||||
choose_products_from: "Choose Products From:"
|
||||
|
||||
enterprise:
|
||||
select_outgoing_oc_products_from: Select outgoing OC products from
|
||||
|
||||
enterprises:
|
||||
index:
|
||||
producer?: ''
|
||||
package: ''
|
||||
status: ''
|
||||
manage: ''
|
||||
form:
|
||||
primary_details:
|
||||
shopfront_requires_login: "Shopfront requires login?"
|
||||
@@ -135,7 +199,7 @@ en-GB:
|
||||
show_on_map: "Show all on the map"
|
||||
shared:
|
||||
register_call:
|
||||
selling_on_ofn: "Interested in getting on the Open Food Network?"
|
||||
selling_on_ofn: "Interested in selling through the Open Food Network?"
|
||||
register: "Register here"
|
||||
shop:
|
||||
messages:
|
||||
@@ -157,7 +221,7 @@ en-GB:
|
||||
logo_mobile_svg: "Mobile logo (SVG)" #FIXME
|
||||
home_hero: "Hero image"
|
||||
home_show_stats: "Show statistics"
|
||||
footer_logo: "Logo (220x76)"
|
||||
footer_logo: "Logo (220x76)" #FIXME
|
||||
footer_facebook_url: "Facebook URL"
|
||||
footer_twitter_url: "Twitter URL"
|
||||
footer_instagram_url: "Instagram URL"
|
||||
@@ -183,11 +247,9 @@ en-GB:
|
||||
country: Country
|
||||
unauthorized: Unauthorized
|
||||
terms_of_service: "Terms of service"
|
||||
on_demand: On demand
|
||||
on_demand: To Order
|
||||
none: None
|
||||
|
||||
alert_selling_on_ofn: "Interested in selling food on the Open Food Network?"
|
||||
alert_start_here: "Start here"
|
||||
label_shops: "Shops"
|
||||
label_map: "Map"
|
||||
label_producers: "Producers"
|
||||
@@ -200,8 +262,9 @@ en-GB:
|
||||
label_administration: "Administration"
|
||||
label_admin: "Admin"
|
||||
label_account: "Account"
|
||||
label_more: "More"
|
||||
label_more: "Show more"
|
||||
label_less: "Show less"
|
||||
label_notices: "Community Forum"
|
||||
|
||||
items: "items"
|
||||
cart_headline: "Your shopping cart"
|
||||
@@ -308,7 +371,7 @@ en-GB:
|
||||
checkout_cart_total: Cart total
|
||||
checkout_shipping_price: Shipping
|
||||
checkout_total_price: Total
|
||||
checkout_back_to_cart: "Back to Cart"
|
||||
checkout_back_to_cart: "Back to cart"
|
||||
|
||||
order_paid: PAID
|
||||
order_not_paid: NOT PAID
|
||||
@@ -319,28 +382,12 @@ en-GB:
|
||||
order_delivery_address: Delivery address
|
||||
order_special_instructions: "Your notes:"
|
||||
order_pickup_time: Ready for collection
|
||||
order_pickup_instructions: Collection Instructions
|
||||
order_pickup_instructions: Collection instructions
|
||||
order_produce: Produce
|
||||
order_total_price: Total
|
||||
order_includes_tax: (includes tax)
|
||||
order_payment_paypal_successful: Your payment via PayPal has been processed successfully.
|
||||
order_hub_info: Hub Info
|
||||
|
||||
bom_tip: "Use this page to alter product quantities across multiple orders. Products may also be removed from orders entirely, if required."
|
||||
bom_shared: "Shared Resource?"
|
||||
bom_page_title: "Bulk Order Management"
|
||||
bom_no: "Order no."
|
||||
bom_date: "Order date"
|
||||
bom_cycle: "Order cycle"
|
||||
bom_max: "Max"
|
||||
bom_hub: "Hub"
|
||||
bom_variant: "Product: Unit"
|
||||
bom_final_weigth_volume: "Weight/Volume"
|
||||
bom_quantity: "Quantity"
|
||||
bom_actions_delete: "Delete Selected"
|
||||
bom_loading: "Loading orders"
|
||||
bom_no_results: "No orders found."
|
||||
bom_order_error: "Some errors must be resolved before you can update orders.\nAny fields with red borders contain errors."
|
||||
order_hub_info: Hub info
|
||||
|
||||
unsaved_changes_warning: "Unsaved changes exist and will be lost if you continue."
|
||||
unsaved_changes_error: "Fields with red borders contain errors."
|
||||
@@ -353,19 +400,15 @@ en-GB:
|
||||
email_welcome: "Welcome"
|
||||
email_confirmed: "Thank you for confirming your email address."
|
||||
email_registered: "is now part of"
|
||||
email_userguide_html: "The User Guide with detailed support for setting up your Producer or Hub is here:
|
||||
%{link}"
|
||||
email_userguide_html: "The User Guide with detailed support for setting up your Producer or Hub is here: %{link}"
|
||||
email_admin_html: "You can manage your account by logging into the %{link} or by clicking on the cog in the top right hand side of the homepage, and selecting Administration."
|
||||
email_community_html: "We also have an online forum for community discussion related to OFN software and the unique challenges of running a food enterprise. You are encouraged to join in. We are constantly evolving and your input into this forum will shape what happens next.
|
||||
%{link}"
|
||||
email_community_html: "We also have an online forum for community discussion related to OFN software and the unique challenges of running a food enterprise. You are encouraged to join in. We are constantly evolving and your input into this forum will shape what happens next. %{link}"
|
||||
email_help: "If you have any difficulties, check out our FAQs, browse the forum or post a 'Support' topic and someone will help you out!"
|
||||
email_confirmation_greeting: "Hi, %{contact}!"
|
||||
email_confirmation_profile_created: "A profile for %{name} has been successfully created!
|
||||
To activate your Profile we need to confirm this email address."
|
||||
email_confirmation_profile_created: "A profile for %{name} has been successfully created! To activate your Profile we need to confirm this email address."
|
||||
email_confirmation_click_link: "Please click the link below to confirm your email and to continue setting up your profile."
|
||||
email_confirmation_link_label: "Confirm this email address »"
|
||||
email_confirmation_help_html: "After confirming your email you can access your administration account for this enterprise.
|
||||
See the %{link} to find out more about %{sitename}'s features and to start using your profile or online store."
|
||||
email_confirmation_help_html: "After confirming your email you can access your administration account for this enterprise. See the %{link} to find out more about %{sitename}'s features and to start using your profile or online store."
|
||||
email_confirmation_userguide: "User Guide"
|
||||
email_social: "Connect with Us:"
|
||||
email_contact: "Email us:"
|
||||
@@ -402,11 +445,16 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
email_signup_login: Your login
|
||||
email_signup_email: Your login email is
|
||||
email_signup_shop_html: "You can start shopping online now at %{link}."
|
||||
email_signup_text: "Thanks for joining the network.
|
||||
If you are a customer, we look forward to introducing you to many fantastic farmers, wonderful food hubs and delicious food!
|
||||
If you are a producer or food enterprise, we are excited to have you as a part of the network."
|
||||
email_signup_text: "Thanks for joining the network. If you are a customer, we look forward to introducing you to many fantastic farmers, wonderful food hubs and delicious food! If you are a producer or food enterprise, we are excited to have you as a part of the network."
|
||||
email_signup_help_html: "We welcome all your questions and feedback; you can use the <em>Send Feedback</em> button on the site or email us at"
|
||||
|
||||
producer_mail_greeting: ""
|
||||
producer_mail_text_before: ""
|
||||
producer_mail_order_text: ""
|
||||
producer_mail_delivery_instructions: ""
|
||||
producer_mail_text_after: ""
|
||||
producer_mail_signoff: ""
|
||||
|
||||
shopping_oc_closed: Orders are closed
|
||||
shopping_oc_closed_description: "Please wait until the next cycle opens (or contact us directly to see if we can accept any late orders)"
|
||||
shopping_oc_last_closed: "The last cycle closed %{distance_of_time} ago"
|
||||
@@ -532,9 +580,9 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
ocs_close_time: "ORDERS CLOSE"
|
||||
ocs_when_headline: When do you want your order?
|
||||
ocs_when_text: No products are displayed until you select a date.
|
||||
ocs_when_closing: "Closing On"
|
||||
ocs_when_closing: "Closing on"
|
||||
ocs_when_choose: "Choose Order Cycle"
|
||||
ocs_list: "List View"
|
||||
ocs_list: "List view"
|
||||
|
||||
producers_about: About us
|
||||
producers_buy: Shop for
|
||||
@@ -561,20 +609,9 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
products_description: Description
|
||||
products_variant: Variant
|
||||
products_quantity: Quantity
|
||||
products_availabel: Available?
|
||||
products_available: ''
|
||||
products_producer: "Producer"
|
||||
products_price: "Price"
|
||||
products_sku: "SKU"
|
||||
products_name: "name"
|
||||
products_unit: "unit"
|
||||
products_on_hand: "on hand"
|
||||
products_on_demand: "On demand?"
|
||||
products_category: "Category"
|
||||
products_tax_category: "tax category"
|
||||
products_available_on: "Available On"
|
||||
products_inherit: "Inherit?"
|
||||
products_inherits_properties: "Inherits Properties?"
|
||||
products_stock_level_reset: "Enable Stock Level Reset?"
|
||||
|
||||
register_title: Register
|
||||
|
||||
@@ -592,7 +629,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
shops_signup_detail: Here's the detail.
|
||||
|
||||
orders_fees: Fees...
|
||||
orders_edit_title: Shopping Cart
|
||||
orders_edit_title: Shopping cart
|
||||
orders_edit_headline: Your shopping cart
|
||||
orders_edit_time: Order ready for
|
||||
orders_edit_continue: Continue shopping
|
||||
@@ -620,14 +657,14 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
products_oc_is: "Your order cycle for this order is %{name}."
|
||||
products_oc_error: "Please complete your order from %{link} before shopping in a different order cycle."
|
||||
products_oc_current: "your current order cycle"
|
||||
products_quantity: Quantity
|
||||
products_max_quantity: Max quantity
|
||||
products_distributor: Distributor
|
||||
products_distributor_info: When you select a distributor for your order, their address and pickup times will be displayed here.
|
||||
|
||||
shop_trial_length: "Shop Trial Length (Days)"
|
||||
shop_trial_expires_in: "Your shopfront trial expires in"
|
||||
shop_trial_expired_notice: "Open Food Network UK is currently free while we prepare for our soft launch in April, 2016."
|
||||
shop_trial_length: ""
|
||||
shop_trial_expires_in: ""
|
||||
shop_trial_expired_notice: ""
|
||||
|
||||
|
||||
# keys used in javascript
|
||||
password: Password
|
||||
@@ -674,15 +711,15 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
confirm_password: "Confirm password"
|
||||
action_signup: "Sign up now"
|
||||
welcome_to_ofn: "Welcome to the Open Food Network!"
|
||||
signup_or_login: "Start By Signing Up (or logging in)"
|
||||
signup_or_login: "Start By signing up (or logging in)"
|
||||
have_an_account: "Already have an account?"
|
||||
action_login: "Log in now."
|
||||
forgot_password: "Forgot Password?"
|
||||
forgot_password: "Forgot password?"
|
||||
password_reset_sent: "An email with instructions on resetting your password has been sent!"
|
||||
reset_password: "Reset password"
|
||||
registration_greeting: "Greetings!"
|
||||
who_is_managing_enterprise: "Who is responsible for managing %{enterprise}?"
|
||||
enterprise_contact: "Primary Contact"
|
||||
enterprise_contact: "Primary contact"
|
||||
enterprise_contact_required: "You need to enter a primary contact."
|
||||
enterprise_email_address: "Email address"
|
||||
enterprise_phone: "Phone number"
|
||||
@@ -692,20 +729,20 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
limit_reached_message: "You have reached the limit!"
|
||||
limit_reached_text: "You have reached the limit for the number of enterprises you are allowed to own on the"
|
||||
limit_reached_action: "Return to the homepage"
|
||||
select_promo_image: "Step 3. Select Promo Image"
|
||||
select_promo_image: "Step 3. Select promo image"
|
||||
promo_image_tip: "Tip: Shown as a banner, preferred size is 1200×260px"
|
||||
promo_image_label: "Choose a promo image"
|
||||
action_or: "OR"
|
||||
promo_image_drag: "Drag and drop your promo here"
|
||||
review_promo_image: "Step 4. Review Your Promo Banner"
|
||||
review_promo_image: "Step 4. Review your promo banner"
|
||||
review_promo_image_tip: "Tip: for best results, your promo image should fill the available space"
|
||||
promo_image_placeholder: "Your logo will appear here for review once uploaded"
|
||||
uploading: "Uploading..."
|
||||
select_logo: "Step 1. Select Logo Image"
|
||||
select_logo: "Step 1. Select logo image"
|
||||
logo_tip: "Tip: Square images will work best, preferably at least 300×300px"
|
||||
logo_label: "Choose a logo image"
|
||||
logo_drag: "Drag and drop your logo here"
|
||||
review_logo: "Step 2. Review Your Logo"
|
||||
review_logo: "Step 2. Review your logo"
|
||||
review_logo_tip: "Tip: for best results, your logo should fill the available space"
|
||||
logo_placeholder: "Your logo will appear here for review once uploaded"
|
||||
enterprise_about_headline: "Nice one!"
|
||||
@@ -752,8 +789,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
registration_finished_thanks: "Thanks for filling out the details for %{enterprise}."
|
||||
registration_finished_login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin."
|
||||
registration_finished_activate: "Activate %{enterprise}."
|
||||
registration_finished_activate_instruction_html: "We've sent a confirmation email to <strong>%{email}</strong> if it hasn't been activated before.<br/>
|
||||
Please follow the instructions there to make your enterprise visible on the Open Food Network."
|
||||
registration_finished_activate_instruction_html: "We've sent a confirmation email to <strong>%{email}</strong> if it hasn't been activated before.<br/> Please follow the instructions there to make your enterprise visible on the Open Food Network."
|
||||
registration_finished_action: "Open Food Network home"
|
||||
registration_type_headline: "Last step to add %{enterprise}!"
|
||||
registration_type_question: "Are you a producer?"
|
||||
@@ -762,14 +798,14 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
registration_type_error: "Please choose one. Are you are producer?"
|
||||
registration_type_producer_help: "Producers make yummy things to eat and/or drink. You're a producer if you grow it, raise it, brew it, bake it, ferment it, milk it or mould it."
|
||||
registration_type_no_producer_help: "If you’re not a producer, you’re probably someone who sells and distributes food. You might be a hub, coop, buying group, retailer, wholesaler or other."
|
||||
create_profile: "Create Profile"
|
||||
create_profile: "Create profile"
|
||||
registration_images_headline: "Thanks!"
|
||||
registration_images_description: "Let's upload some pretty pictures so your profile looks great! :)"
|
||||
registration_detail_headline: "Let's Get Started"
|
||||
registration_detail_headline: "Let's get started"
|
||||
registration_detail_enterprise: "Woot! First we need to know a little bit about your enterprise:"
|
||||
registration_detail_producer: "Woot! First we need to know a little bit about your farm:"
|
||||
registration_detail_name_enterprise: "Enterprise Name:"
|
||||
registration_detail_name_producer: "Farm Name:"
|
||||
registration_detail_name_enterprise: "Enterprise name:"
|
||||
registration_detail_name_producer: "Farm name:"
|
||||
registration_detail_name_placeholder: "e.g. Charlie's Awesome Farm"
|
||||
registration_detail_name_error: "Please choose a unique name for your enterprise"
|
||||
registration_detail_address1: "Address line 1:"
|
||||
@@ -826,26 +862,23 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
admin_entreprise_groups: "Enterprise Groups"
|
||||
admin_entreprise_groups_name: "Name"
|
||||
admin_entreprise_groups_owner: "Owner"
|
||||
admin_entreprise_groups_on_front_page: "On front page ?"
|
||||
admin_entreprise_groups_on_front_page: "On front page?"
|
||||
admin_entreprise_groups_entreprise: "Enterprises"
|
||||
admin_entreprise_groups_primary_details: "Primary Details"
|
||||
admin_entreprise_groups_data_powertip: "The primary user responsible for this group."
|
||||
admin_entreprise_groups_data_powertip_logo: "This is the logo for the group"
|
||||
admin_entreprise_groups_data_powertip_promo_image: "This image is displayed at the top of the Group profile"
|
||||
admin_entreprise_groups_about: "About"
|
||||
admin_entreprise_groups_images: "Images"
|
||||
admin_entreprise_groups_contact: "Contact"
|
||||
admin_entreprise_groups_contact_phone_placeholder: "eg. 98 7654 3210"
|
||||
admin_entreprise_groups_contact_address1_placeholder: "eg. 123 High Street"
|
||||
admin_entreprise_groups_contact_city: "Suburb"
|
||||
admin_entreprise_groups_contact_city_placeholder: "eg. Northcote"
|
||||
admin_entreprise_groups_contact_city_placeholder: "eg. Camden"
|
||||
admin_entreprise_groups_contact_zipcode: "Postcode"
|
||||
admin_entreprise_groups_contact_zipcode_placeholder: "eg. 3070"
|
||||
admin_entreprise_groups_contact_state_id: "State"
|
||||
admin_entreprise_groups_contact_zipcode_placeholder: "eg. NW1 0AA"
|
||||
admin_entreprise_groups_contact_state_id: "County"
|
||||
admin_entreprise_groups_contact_country_id: "Country"
|
||||
admin_entreprise_groups_web: "Web Resources"
|
||||
admin_entreprise_groups_web_twitter: "eg. @the_prof"
|
||||
admin_entreprise_groups_web_website_placeholder: "eg. www.truffles.com"
|
||||
admin_entreprise_groups_web_twitter: "eg. @openfoodnetuk"
|
||||
admin_entreprise_groups_web_website_placeholder: "eg. www.truffles.co.uk"
|
||||
admin_order_cycles: "Admin Order Cycles"
|
||||
open: "Open"
|
||||
close: "Close"
|
||||
@@ -859,7 +892,7 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
calculator: "Calculator"
|
||||
calculator_values: "Calculator values"
|
||||
new_order_cycles: "New Order Cycles"
|
||||
select_a_coordinator_for_your_order_cycle: "select a coordinator for your order cycle"
|
||||
select_a_coordinator_for_your_order_cycle: ""
|
||||
edit_order_cycle: "Edit Order Cycle"
|
||||
roles: "Roles"
|
||||
update: "Update"
|
||||
@@ -868,8 +901,8 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
update_invoice: "Update Invoices"
|
||||
finalise_invoice: "Finalise Invoices"
|
||||
finalise_user_invoices: "Finalise User Invoices"
|
||||
finalise_user_invoice_explained: "Use this button to finalize all invoices in the system for the previous calendar month. This task can be set up to run automatically once a month."
|
||||
manually_run_task: "Manually Run Task "
|
||||
finalise_user_invoice_explained: "Use this button to finalise all invoices in the system for the previous calendar month. This task can be set up to run automatically once a month."
|
||||
manually_run_task: "Manually Run Task"
|
||||
update_user_invoices: "Update User Invoices"
|
||||
update_user_invoice_explained: "Use this button to immediately update invoices for the month to date for each enterprise user in the system. This task can be set up to run automatically every night."
|
||||
auto_finalise_invoices: "Auto-finalise invoices monthly on the 2nd at 1:30am"
|
||||
@@ -889,7 +922,7 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
producer: "Producer"
|
||||
product: "Product"
|
||||
price: "Price"
|
||||
on_hand: "On hand"
|
||||
on_hand: "In stock"
|
||||
save_changes: "Save Changes"
|
||||
spree_admin_overview_enterprises_header: "My Enterprises"
|
||||
spree_admin_overview_enterprises_footer: "MANAGE MY ENTERPRISES"
|
||||
@@ -917,7 +950,7 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
spree_admin_single_enterprise_alert_mail_confirmation: "Please confirm the email address for"
|
||||
spree_admin_single_enterprise_alert_mail_sent: "We've sent an email to"
|
||||
spree_admin_overview_action_required: "Action Required"
|
||||
spree_admin_overview_check_your_inbox: "Please check you inbox for furher instructions. Thanks!"
|
||||
spree_admin_overview_check_your_inbox: "Please check you inbox for further instructions. Thanks!"
|
||||
change_package: "Change Package"
|
||||
spree_admin_single_enterprise_hint: "Hint: To allow people to find you, turn on your visibility under"
|
||||
your_profil_live: "Your profile live"
|
||||
@@ -932,19 +965,7 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
manage_products: "Manage products"
|
||||
edit_profile_details: "Edit profile details"
|
||||
edit_profile_details_etc: "Change your profile description, images, etc."
|
||||
start_date: "Start Date"
|
||||
end_date: "End Date"
|
||||
order_cycle: "Order Cycle"
|
||||
group_buy_unit_size: "Group Buy Unit Size"
|
||||
total_qtt_ordered: "Total Quantity Ordered"
|
||||
max_qtt_ordered: "Max Quantity Ordered"
|
||||
current_fulfilled_units: "Current Fulfilled Units"
|
||||
max_fulfilled_units: "Max Fulfilled Units"
|
||||
bulk_management_warning: "WARNING: Some variants do not have a unit value"
|
||||
ask: "Ask?"
|
||||
no_orders_found: "No orders found."
|
||||
order_no: "Order No."
|
||||
weight_volume: "Weight/Volume"
|
||||
remove_tax: "Remove tax"
|
||||
tax_settings: "Tax Settings"
|
||||
products_require_tax_category: "products require tax category"
|
||||
@@ -953,7 +974,7 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
admin_share_city: "City"
|
||||
admin_share_zipcode: "Postcode"
|
||||
admin_share_country: "Country"
|
||||
admin_share_state: "State"
|
||||
admin_share_state: "County"
|
||||
hub_sidebar_hubs: "Hubs"
|
||||
hub_sidebar_none_available: "None Available"
|
||||
hub_sidebar_manage: "Manage"
|
||||
@@ -961,32 +982,32 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
hub_sidebar_blue: "blue"
|
||||
hub_sidebar_red: "red"
|
||||
shop_trial_in_progress: "Your shopfront trial expires in %{days}."
|
||||
shop_trial_expired: "Good news! We have decided to extend shopfront trials until further notice (probably around March 2015)." #FIXME
|
||||
shop_trial_expired: "To view or change your current Open Food Network plan go to the Dashboard -> Change Package." #FIXME
|
||||
report_customers_distributor: "Distributor"
|
||||
report_customers_supplier: "Supplier"
|
||||
report_customers_cycle: "Order Cycle"
|
||||
report_customers_type: "Report Type"
|
||||
report_customers_csv: "Download as csv"
|
||||
report_producers: "Producers: "
|
||||
report_type: "Report Type: "
|
||||
report_hubs: "Hubs: "
|
||||
report_payment: "Payment Methods: "
|
||||
report_distributor: "Distributor: "
|
||||
report_producers: "Producers:"
|
||||
report_type: "Report Type:"
|
||||
report_hubs: "Hubs:"
|
||||
report_payment: "Payment Methods:"
|
||||
report_distributor: "Distributor:"
|
||||
report_payment_by: 'Payments By Type'
|
||||
report_itemised_payment: 'Itemised Payment Totals'
|
||||
report_payment_totals: 'Payment Totals'
|
||||
report_all: 'all'
|
||||
report_order_cycle: "Order Cycle: "
|
||||
report_entreprises: "Enterprises: "
|
||||
report_users: "Users: "
|
||||
report_order_cycle: "Order Cycle:"
|
||||
report_entreprises: "Enterprises:"
|
||||
report_users: "Users:"
|
||||
initial_invoice_number: "Initial invoice number:"
|
||||
invoice_date: "Invoice date:"
|
||||
due_date: "Due date:"
|
||||
due_date: "Invoice date:"
|
||||
account_code: "Account code:"
|
||||
equals: "Equals"
|
||||
contains: "contains"
|
||||
discount: "Discount"
|
||||
filter_products: "Filter Products"
|
||||
filter_products: " Filter Products"
|
||||
delete_product_variant: "The last variant cannot be deleted!"
|
||||
progress: "progress"
|
||||
saving: "Saving.."
|
||||
@@ -997,7 +1018,7 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
products_unsaved: "Changes to %{n} products remain unsaved."
|
||||
add_manager: "Add a manager"
|
||||
is_already_manager: "is already a manager!"
|
||||
no_change_to_save: " No change to save"
|
||||
no_change_to_save: "No change to save"
|
||||
add_manager: "Add a manager"
|
||||
users: "Users"
|
||||
about: "About"
|
||||
@@ -1012,6 +1033,7 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
properties: "Properties"
|
||||
shipping_methods: "Shipping Methods"
|
||||
payment_methods: "Payment Methods"
|
||||
payment_method_fee: ""
|
||||
enterprise_fees: "Enterprise Fees"
|
||||
inventory_settings: "Inventory Settings"
|
||||
tag_rules: "Tag Rules"
|
||||
@@ -1039,7 +1061,7 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
pending: pending
|
||||
processing: processing
|
||||
void: void
|
||||
invalid: invalid
|
||||
invalid: ''
|
||||
order_state:
|
||||
address: address
|
||||
adjustments: adjustments
|
||||
|
||||
@@ -255,6 +255,8 @@ en:
|
||||
label_producers: "Producers"
|
||||
label_groups: "Groups"
|
||||
label_about: "About"
|
||||
label_connect: "Connect"
|
||||
label_learn: "Learn"
|
||||
label_shopping: "Shopping"
|
||||
label_login: "Login"
|
||||
label_logout: "Logout"
|
||||
@@ -313,10 +315,8 @@ en:
|
||||
|
||||
footer_nav_headline: "Navigate"
|
||||
footer_join_headline: "Join us"
|
||||
footer_join_producers: "Producers sign-up"
|
||||
footer_join_hubs: "Hubs sign-up"
|
||||
footer_join_groups: "Groups sign-up"
|
||||
footer_join_partners: "Food systems partners"
|
||||
footer_join_body: "Create a listing, shop or group directory on the Open Food Network."
|
||||
footer_join_cta: "Tell me more!"
|
||||
|
||||
footer_legal_call: "Read our"
|
||||
footer_legal_tos: "Terms and conditions"
|
||||
@@ -334,7 +334,13 @@ en:
|
||||
brandstory_part5_strong: "We call it Open Food Network."
|
||||
brandstory_part6: "We all love food. Now we can love our food system too."
|
||||
|
||||
system_headline: "Here's how it works."
|
||||
learn_body: "Explore models, stories and resources to support you to develop your fair food business or organisation. Find training, events and other opportunities to learn from peers."
|
||||
learn_cta: "Get Inspired"
|
||||
|
||||
connect_body: "Search our full directories of producers, hubs and groups to find fair food traders near you. List your business or organisation on the OFN so buyers can find you. Join the community to get advice and solve problems together."
|
||||
connect_cta: "Go Exploring"
|
||||
|
||||
system_headline: "Shopping - here's how it works."
|
||||
system_step1: "1. Search"
|
||||
system_step1_text: "Search our diverse, independent shops for seasonal local food. Search by neighbourhood and food category, or whether you prefer delivery or pickup."
|
||||
system_step2: "2. Shop"
|
||||
@@ -571,25 +577,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
modal_producers: "Producers"
|
||||
modal_producers_explained: "Our producers make all the delicious food you can shop for on the Open Food Network."
|
||||
|
||||
ocs_choice_hub: "Hub:"
|
||||
ocs_choice_oc: "Order Cycle:"
|
||||
ocs_choice_text: "You have not yet picked where you will get your order from."
|
||||
ocs_closed_headline: Orders are currently closed for this hub
|
||||
ocs_closed_time: "The last cycle closed %{time} ago."
|
||||
ocs_closed_contact: "Please contact your hub directly to see if they accept late orders, or wait until the next cycle opens."
|
||||
ocs_closed_opens: "The next order cycle opens in %{time}"
|
||||
ocs_closed_email: "Email: %{email}"
|
||||
ocs_closed_phone: "Phone: %{phone}"
|
||||
ocs_pickup_time: "Your order will be ready on %{pickup_time}"
|
||||
ocs_change_date: "Change Collection Date"
|
||||
ocs_change_date_notice: "(This will reset your cart)"
|
||||
ocs_close_time: "ORDERS CLOSE"
|
||||
ocs_when_headline: When do you want your order?
|
||||
ocs_when_text: No products are displayed until you select a date.
|
||||
ocs_when_closing: "Closing On"
|
||||
ocs_when_choose: "Choose Order Cycle"
|
||||
ocs_list: "List View"
|
||||
|
||||
producers_about: About us
|
||||
producers_buy: Shop for
|
||||
producers_contact: Contact
|
||||
@@ -598,6 +585,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
producers_buy_at_html: "Shop for %{enterprise} products at:"
|
||||
producers_filter: Filter by
|
||||
producers_filter_type: Type
|
||||
producers_filter_property: Property
|
||||
producers_title: Producers
|
||||
producers_headline: Find local producers
|
||||
producers_signup_title: Sign up as a producer
|
||||
@@ -621,6 +609,20 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
|
||||
register_title: Register
|
||||
|
||||
sell_title: "Register"
|
||||
sell_headline: "Get on the Open Food Network!"
|
||||
sell_motivation: "Showcase your beautiful food."
|
||||
sell_producers: "Producers"
|
||||
sell_hubs: "Hubs"
|
||||
sell_groups: "Groups"
|
||||
sell_producers_detail: "Set up a profile for your business on the OFN in just minutes. At any time you can upgrade your profile to an online store and sell your products direct to customers."
|
||||
sell_hubs_detail: "Set up a profile for your food enterprise or organisation on the OFN. At any time you can upgrade your profile to a multi-producer shop."
|
||||
sell_groups_detail: "Set up a tailored directory of enterprises (producers and other food enterprises) for your region or for your organisation."
|
||||
sell_user_guide: "Find out more in our user guide."
|
||||
sell_listing_price: "Listing on the OFN is free. Opening and running a shop on OFN is free. Setting up a group directory on OFN for your organisation or regional network is free."
|
||||
sell_embed: "We can also embed an OFN shop in your own customised website or build a customised local food network website for your region."
|
||||
sell_ask_services: "Ask us about OFN services."
|
||||
|
||||
shops_title: Shops
|
||||
shops_headline: Shopping, transformed.
|
||||
shops_text: Food grows in cycles, farmers harvest in cycles, and we order food in cycles. If you find an order cycle closed, check back soon.
|
||||
|
||||
@@ -15,10 +15,15 @@ Openfoodnetwork::Application.routes.draw do
|
||||
get "/discourse/sso", to: "discourse_sso#sso"
|
||||
|
||||
get "/map", to: "map#index", as: :map
|
||||
get "/sell", to: "home#sell", as: :sell
|
||||
|
||||
get "/register", to: "registration#index", as: :registration
|
||||
get "/register/auth", to: "registration#authenticate", as: :registration_auth
|
||||
|
||||
# Redirects to global website
|
||||
get "/connect", to: redirect("https://openfoodnetwork.org/#{ENV['DEFAULT_COUNTRY_CODE'].andand.downcase}/connect/")
|
||||
get "/learn", to: redirect("https://openfoodnetwork.org/#{ENV['DEFAULT_COUNTRY_CODE'].andand.downcase}/learn/")
|
||||
|
||||
resource :shop, controller: "shop" do
|
||||
get :products
|
||||
post :order_cycle
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
label: Default Fixture Layout
|
||||
@@ -1,5 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
{{ cms:page:content }}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
body{color: red}
|
||||
@@ -1 +0,0 @@
|
||||
// default js
|
||||
@@ -1,2 +0,0 @@
|
||||
label: Default Fixture Nested Layout
|
||||
position: 42
|
||||
@@ -1,2 +0,0 @@
|
||||
<div class='left'> {{ cms:page:left }} </div>
|
||||
<div class='right'> {{ cms:page:right }} </div>
|
||||
@@ -1 +0,0 @@
|
||||
div{float:left}
|
||||
@@ -1 +0,0 @@
|
||||
// nested js
|
||||
@@ -1,2 +0,0 @@
|
||||
label: Home Fixture Page
|
||||
layout: default
|
||||
@@ -1,3 +0,0 @@
|
||||
label: Child Fixture Page
|
||||
layout: nested
|
||||
position: 42
|
||||
@@ -1 +0,0 @@
|
||||
Child Page Left Fixture Content
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user