mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-13 18:46:49 +00:00
Compare commits
225 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49de11567b | ||
|
|
3af0365c6b | ||
|
|
be92b0049b | ||
|
|
a1c94d0d9f | ||
|
|
f6bb8a9a04 | ||
|
|
d254df7ccc | ||
|
|
8caf10f634 | ||
|
|
2966dd9536 | ||
|
|
21e1c0ed0b | ||
|
|
48b99d02b9 | ||
|
|
f17a2eeaea | ||
|
|
18419d0276 | ||
|
|
bd19d8b0bd | ||
|
|
4bcd665379 | ||
|
|
e63dbcfa89 | ||
|
|
c3283adcf5 | ||
|
|
b2ed69831b | ||
|
|
7daba62f43 | ||
|
|
a08020490d | ||
|
|
eb4d970bc7 | ||
|
|
7a3549209f | ||
|
|
52ebd1b402 | ||
|
|
a3a26f704f | ||
|
|
cff8f6dd96 | ||
|
|
81537d92cf | ||
|
|
91e88bd028 | ||
|
|
f5e254a105 | ||
|
|
b41b5d0395 | ||
|
|
296d2e5edb | ||
|
|
ac0a62e962 | ||
|
|
2c5db8935b | ||
|
|
24c8f38111 | ||
|
|
b801bffcd9 | ||
|
|
434b68b019 | ||
|
|
9af4bb9757 | ||
|
|
d847560d7c | ||
|
|
87fae15434 | ||
|
|
e27f7a4301 | ||
|
|
bddfa95eb5 | ||
|
|
ef0fb18fda | ||
|
|
87ee4bbebc | ||
|
|
f5567e556b | ||
|
|
54c3c73ed2 | ||
|
|
8dfdc9bc15 | ||
|
|
36aa52736a | ||
|
|
ac38b2735c | ||
|
|
8b93c5ab56 | ||
|
|
434f98fb46 | ||
|
|
c82c54873c | ||
|
|
de180d32bf | ||
|
|
5b481c19cc | ||
|
|
7110f9e6ee | ||
|
|
63d748b2a4 | ||
|
|
310906c7da | ||
|
|
b81843921b | ||
|
|
dd0e135a4d | ||
|
|
0f2c5d379a | ||
|
|
a29f263041 | ||
|
|
26cd0f4a9d | ||
|
|
0b878dd0a2 | ||
|
|
45c204017f | ||
|
|
fa98a8ea17 | ||
|
|
17c2f7b138 | ||
|
|
70643a84b2 | ||
|
|
62a00b17a2 | ||
|
|
c4f96a1dcf | ||
|
|
6f4f3d42cc | ||
|
|
7582df2771 | ||
|
|
e8692fec4c | ||
|
|
3b2c10526d | ||
|
|
c788f1ae57 | ||
|
|
b1a274ea27 | ||
|
|
00c7b9986b | ||
|
|
25b11f1f4b | ||
|
|
22384cb4da | ||
|
|
9dc18afef0 | ||
|
|
7baa875a91 | ||
|
|
3de887e1d8 | ||
|
|
d2d3d767ac | ||
|
|
a4ff74272b | ||
|
|
1000dc52bf | ||
|
|
54b8d22e0d | ||
|
|
7e00f78a77 | ||
|
|
5a9b5660f1 | ||
|
|
1d42ce885b | ||
|
|
17751c448f | ||
|
|
4b8d9d18d7 | ||
|
|
a21ef19529 | ||
|
|
ea80ae3832 | ||
|
|
bf26a26743 | ||
|
|
e3f840f48c | ||
|
|
42ca7888c0 | ||
|
|
8aa892136e | ||
|
|
2d21341183 | ||
|
|
5cabf59015 | ||
|
|
289dff5b91 | ||
|
|
c4e4beb912 | ||
|
|
27d8951add | ||
|
|
f7720f1b1f | ||
|
|
c46ae4354d | ||
|
|
5f00323cbb | ||
|
|
c52f29706b | ||
|
|
2590745b2e | ||
|
|
6db0421347 | ||
|
|
b63c47cca2 | ||
|
|
2b9f57f4e0 | ||
|
|
8a1de72542 | ||
|
|
2cb3a0cd99 | ||
|
|
b0637a24ff | ||
|
|
d969b68c8c | ||
|
|
a89d4266d5 | ||
|
|
4b8ced5fc0 | ||
|
|
2678342122 | ||
|
|
b33c819863 | ||
|
|
97d7e27786 | ||
|
|
e73e43838c | ||
|
|
cdc40fbc38 | ||
|
|
3430cc617a | ||
|
|
ed6f042446 | ||
|
|
80a8c436d6 | ||
|
|
049a87e8a9 | ||
|
|
deb5b8e74c | ||
|
|
a5dd14d902 | ||
|
|
9a6859edc0 | ||
|
|
c0c53113d3 | ||
|
|
26688409a1 | ||
|
|
0893d14025 | ||
|
|
efd314e3b1 | ||
|
|
bd7549c57f | ||
|
|
45cf54408d | ||
|
|
15360740b1 | ||
|
|
5ce5072f26 | ||
|
|
35133f7ee8 | ||
|
|
5becbc2a11 | ||
|
|
390d80f0eb | ||
|
|
6da43850d1 | ||
|
|
a146bdacc8 | ||
|
|
43cadb00c4 | ||
|
|
2e616a9e31 | ||
|
|
1927e2883e | ||
|
|
a4b94cf39f | ||
|
|
a35f3c130e | ||
|
|
a93243a8b7 | ||
|
|
de4402457a | ||
|
|
bf9f7309f7 | ||
|
|
4b0e1610ec | ||
|
|
0c6fe20e82 | ||
|
|
0f2e23d225 | ||
|
|
129de8fd57 | ||
|
|
e24d858af9 | ||
|
|
d2cacf5330 | ||
|
|
af231d2ebe | ||
|
|
711a3debe7 | ||
|
|
d09b0849e4 | ||
|
|
c639821dc3 | ||
|
|
d9b643d795 | ||
|
|
6b8b3be524 | ||
|
|
1db8283e98 | ||
|
|
5fce40ee71 | ||
|
|
c64493ca77 | ||
|
|
5b942e6933 | ||
|
|
ffbb5934d7 | ||
|
|
bae9df8214 | ||
|
|
5da47b3f19 | ||
|
|
b14e4237cc | ||
|
|
3e7685193f | ||
|
|
8558000c22 | ||
|
|
6486e5f908 | ||
|
|
9244a95472 | ||
|
|
bd237ef257 | ||
|
|
bc06e10146 | ||
|
|
05eadac935 | ||
|
|
5a83b12c66 | ||
|
|
71576fd7db | ||
|
|
63a1d4145a | ||
|
|
1049525e50 | ||
|
|
bd32510837 | ||
|
|
f0b40eea1e | ||
|
|
ed790ab65d | ||
|
|
46e23b28fd | ||
|
|
bc904a7afa | ||
|
|
8eb60388fd | ||
|
|
633f1bd7cf | ||
|
|
bc1430c984 | ||
|
|
676d949972 | ||
|
|
e4bd7c4e30 | ||
|
|
94783f44f9 | ||
|
|
d3f498f5b1 | ||
|
|
55941a1206 | ||
|
|
1382bb3c6b | ||
|
|
777754f8a9 | ||
|
|
02008769e9 | ||
|
|
65dd9f51cf | ||
|
|
a224c53200 | ||
|
|
66f07c0d1c | ||
|
|
d5287026f8 | ||
|
|
6b80eb2c16 | ||
|
|
b54b981740 | ||
|
|
895032fe6a | ||
|
|
531c385aae | ||
|
|
d0a3ab68f3 | ||
|
|
b5038c5745 | ||
|
|
6877485c90 | ||
|
|
95c1b7f7a6 | ||
|
|
3fcf286516 | ||
|
|
e2cdb01a28 | ||
|
|
08e729673f | ||
|
|
c0bf09131f | ||
|
|
19042e0d37 | ||
|
|
4b3b4e00ff | ||
|
|
e3ffe8fe6b | ||
|
|
d91578ab80 | ||
|
|
873dcc373f | ||
|
|
1289c3f1a2 | ||
|
|
6b6cdf07fb | ||
|
|
8432dab142 | ||
|
|
0b0263a605 | ||
|
|
51dd55c5b9 | ||
|
|
17ea2cd510 | ||
|
|
325c427219 | ||
|
|
a3e87d893a | ||
|
|
480a629349 | ||
|
|
00e57c8a55 | ||
|
|
2e74e64e22 | ||
|
|
fc5d623465 |
@@ -681,7 +681,6 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/models/product_import/entry_validator.rb'
|
||||
- 'app/models/product_import/inventory_reset_strategy.rb'
|
||||
- 'app/models/product_import/product_importer.rb'
|
||||
- 'app/models/product_import/products_reset_strategy.rb'
|
||||
- 'app/models/product_import/reset_absent.rb'
|
||||
- 'app/models/product_import/settings.rb'
|
||||
- 'app/models/product_import/spreadsheet_data.rb'
|
||||
@@ -1257,7 +1256,6 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/models/producer_property_spec.rb'
|
||||
- 'spec/models/product_import/entry_processor_spec.rb'
|
||||
- 'spec/models/product_import/inventory_reset_strategy_spec.rb'
|
||||
- 'spec/models/product_import/products_reset_strategy_spec.rb'
|
||||
- 'spec/models/product_import/reset_absent_spec.rb'
|
||||
- 'spec/models/product_import/settings_spec.rb'
|
||||
- 'spec/models/product_importer_spec.rb'
|
||||
|
||||
5
Gemfile
5
Gemfile
@@ -12,6 +12,7 @@ gem "activerecord-import"
|
||||
# Patched version. See http://rubysec.com/advisories/CVE-2015-5312/.
|
||||
gem 'nokogiri', '>= 1.6.7.1'
|
||||
|
||||
gem "catalog", path: "./engines/catalog"
|
||||
gem "order_management", path: "./engines/order_management"
|
||||
gem 'web', path: './engines/web'
|
||||
|
||||
@@ -114,7 +115,7 @@ gem "foundation-rails"
|
||||
gem 'foundation_rails_helper', github: 'willrjmarshall/foundation_rails_helper', branch: "rails3"
|
||||
|
||||
gem 'jquery-migrate-rails'
|
||||
gem 'jquery-rails', '3.0.4'
|
||||
gem 'jquery-rails', '3.1.5'
|
||||
gem 'jquery-ui-rails', '~> 4.0.0'
|
||||
gem 'select2-rails', '~> 3.4.7'
|
||||
|
||||
@@ -166,5 +167,5 @@ group :development do
|
||||
# greater than 1.0.9, so we just required the latest available version here.
|
||||
gem 'eventmachine', '>= 1.2.3'
|
||||
|
||||
gem 'rack-mini-profiler', '< 2.0.0'
|
||||
gem 'rack-mini-profiler', '< 3.0.0'
|
||||
end
|
||||
|
||||
39
Gemfile.lock
39
Gemfile.lock
@@ -75,6 +75,11 @@ GIT
|
||||
activemodel (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
|
||||
PATH
|
||||
remote: engines/catalog
|
||||
specs:
|
||||
catalog (0.0.1)
|
||||
|
||||
PATH
|
||||
remote: engines/order_management
|
||||
specs:
|
||||
@@ -419,7 +424,7 @@ GEM
|
||||
gmaps4rails (1.5.6)
|
||||
haml (4.0.7)
|
||||
tilt
|
||||
hashdiff (1.0.0)
|
||||
hashdiff (1.0.1)
|
||||
highline (1.6.18)
|
||||
hike (1.2.3)
|
||||
httparty (0.16.2)
|
||||
@@ -433,7 +438,7 @@ GEM
|
||||
jaro_winkler (1.5.4)
|
||||
journey (1.0.4)
|
||||
jquery-migrate-rails (1.2.1)
|
||||
jquery-rails (3.0.4)
|
||||
jquery-rails (3.1.5)
|
||||
railties (>= 3.0, < 5.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
jquery-ui-rails (4.0.5)
|
||||
@@ -494,7 +499,7 @@ GEM
|
||||
parallel (1.19.1)
|
||||
paranoia (1.3.4)
|
||||
activerecord (~> 3.1)
|
||||
parser (2.7.0.4)
|
||||
parser (2.7.0.5)
|
||||
ast (~> 2.4.0)
|
||||
paypal-sdk-core (0.2.10)
|
||||
multi_json (~> 1.0)
|
||||
@@ -516,9 +521,9 @@ GEM
|
||||
rabl (0.8.4)
|
||||
activesupport (>= 2.3.14)
|
||||
rack (1.4.7)
|
||||
rack-cache (1.9.0)
|
||||
rack-cache (1.11.0)
|
||||
rack (>= 0.4)
|
||||
rack-mini-profiler (1.1.6)
|
||||
rack-mini-profiler (2.0.1)
|
||||
rack (>= 1.2.0)
|
||||
rack-protection (1.5.5)
|
||||
rack
|
||||
@@ -548,7 +553,7 @@ GEM
|
||||
thor (>= 0.14.6, < 2.0)
|
||||
rainbow (3.0.0)
|
||||
raindrops (0.19.1)
|
||||
rake (13.0.0)
|
||||
rake (13.0.1)
|
||||
ransack (0.7.2)
|
||||
actionpack (~> 3.0)
|
||||
activerecord (~> 3.0)
|
||||
@@ -580,15 +585,15 @@ GEM
|
||||
rspec-core (~> 3.9.0)
|
||||
rspec-expectations (~> 3.9.0)
|
||||
rspec-mocks (~> 3.9.0)
|
||||
rspec-core (3.9.0)
|
||||
rspec-support (~> 3.9.0)
|
||||
rspec-core (3.9.1)
|
||||
rspec-support (~> 3.9.1)
|
||||
rspec-expectations (3.9.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.9.0)
|
||||
rspec-mocks (3.9.0)
|
||||
rspec-mocks (3.9.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.9.0)
|
||||
rspec-rails (3.9.0)
|
||||
rspec-rails (3.9.1)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
@@ -598,7 +603,7 @@ GEM
|
||||
rspec-support (~> 3.9.0)
|
||||
rspec-retry (0.6.2)
|
||||
rspec-core (> 3.3)
|
||||
rspec-support (3.9.0)
|
||||
rspec-support (3.9.2)
|
||||
rubocop (0.80.1)
|
||||
jaro_winkler (~> 1.5.1)
|
||||
parallel (~> 1.10)
|
||||
@@ -607,7 +612,8 @@ GEM
|
||||
rexml
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 1.7)
|
||||
rubocop-rails (2.4.2)
|
||||
rubocop-rails (2.5.0)
|
||||
activesupport
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 0.72.0)
|
||||
ruby-progressbar (1.10.1)
|
||||
@@ -666,7 +672,7 @@ GEM
|
||||
uglifier (4.2.0)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
unicode-display_width (1.6.1)
|
||||
unicorn (5.5.3)
|
||||
unicorn (5.5.4)
|
||||
kgio (~> 2.6)
|
||||
raindrops (~> 0.7)
|
||||
unicorn-rails (2.2.1)
|
||||
@@ -679,7 +685,7 @@ GEM
|
||||
nokogiri (~> 1.6)
|
||||
rubyzip (>= 1.3.0)
|
||||
selenium-webdriver (>= 3.0, < 4.0)
|
||||
webmock (3.8.2)
|
||||
webmock (3.8.3)
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
hashdiff (>= 0.4.0, < 2.0.0)
|
||||
@@ -711,6 +717,7 @@ DEPENDENCIES
|
||||
bugsnag
|
||||
byebug (~> 9.0.0)
|
||||
capybara (>= 2.18.0)
|
||||
catalog!
|
||||
coffee-rails (~> 3.2.1)
|
||||
combine_pdf
|
||||
compass-rails
|
||||
@@ -742,7 +749,7 @@ DEPENDENCIES
|
||||
i18n-js (~> 3.6.0)
|
||||
immigrant
|
||||
jquery-migrate-rails
|
||||
jquery-rails (= 3.0.4)
|
||||
jquery-rails (= 3.1.5)
|
||||
jquery-ui-rails (~> 4.0.0)
|
||||
json_spec (~> 1.1.4)
|
||||
jwt (~> 2.2)
|
||||
@@ -762,7 +769,7 @@ DEPENDENCIES
|
||||
pg (~> 0.21.0)
|
||||
pry-byebug (>= 3.4.3)
|
||||
rabl
|
||||
rack-mini-profiler (< 2.0.0)
|
||||
rack-mini-profiler (< 3.0.0)
|
||||
rack-rewrite
|
||||
rack-ssl
|
||||
rails (~> 3.2.22)
|
||||
|
||||
@@ -35,7 +35,7 @@ We use [BrowserStack](https://www.browserstack.com/) as a manual testing tool. B
|
||||
Copyright (c) 2012 - 2020 Open Food Foundation, released under the AGPL licence.
|
||||
|
||||
[survey]: https://docs.google.com/a/eaterprises.com.au/forms/d/1zxR5vSiU9CigJ9cEaC8-eJLgYid8CR8er7PPH9Mc-30/edit#
|
||||
[slack-invite]: https://join.slack.com/t/openfoodnetwork/shared_invite/enQtNzY3NDEwNzM2MDM0LWFmNGRhNDUwYzNmNWNkYmFkMzgxNDg1OTg1ODNjNWY4Y2FhNDIwNmE4ZWI0OThiMGNmZjFkODczNGZiYTJmNWI
|
||||
[slack-invite]: https://join.slack.com/t/openfoodnetwork/shared_invite/zt-9sjkjdlu-r02kUMP1zbrTgUhZhYPF~A
|
||||
[contributor-guide]: https://ofn-user-guide.gitbook.io/ofn-contributor-guide/who-are-we
|
||||
[ofn-install]: https://github.com/openfoodfoundation/ofn-install
|
||||
[super-admin-guide]: https://ofn-user-guide.gitbook.io/ofn-super-admin-guide
|
||||
|
||||
23
app/assets/images/black-caret.svg
Normal file
23
app/assets/images/black-caret.svg
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
id="svg4"
|
||||
xml:space="preserve"
|
||||
enable-background="new 0 0 6 3"
|
||||
viewBox="0 0 6 3"
|
||||
height="3px"
|
||||
width="24px"
|
||||
y="0px"
|
||||
x="12px"
|
||||
version="1.1"><metadata
|
||||
id="metadata10"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs8" /><polygon
|
||||
style="fill:#000000;fill-opacity:1"
|
||||
id="polygon2"
|
||||
points="5.992,0 2.992,3 -0.008,0 " /></svg>
|
||||
|
After Width: | Height: | Size: 832 B |
23
app/assets/images/white-caret.svg
Normal file
23
app/assets/images/white-caret.svg
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
id="svg4"
|
||||
xml:space="preserve"
|
||||
enable-background="new 0 0 6 3"
|
||||
viewBox="0 0 6 3"
|
||||
height="3px"
|
||||
width="24px"
|
||||
y="0px"
|
||||
x="12px"
|
||||
version="1.1"><metadata
|
||||
id="metadata10"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs8" /><polygon
|
||||
style="fill:#ffffff;fill-opacity:1"
|
||||
id="polygon2"
|
||||
points="5.992,0 2.992,3 -0.008,0 " /></svg>
|
||||
|
After Width: | Height: | Size: 832 B |
@@ -20,7 +20,6 @@
|
||||
//= require angular
|
||||
//= require angular-resource
|
||||
//= require angular-animate
|
||||
//= require angular-sanitize
|
||||
//= require angularjs-file-upload
|
||||
//= require ../shared/ng-infinite-scroll.min.js
|
||||
//= require ../shared/ng-tags-input.min.js
|
||||
@@ -67,6 +66,8 @@
|
||||
|
||||
// text, dates and translations
|
||||
//= require textAngular-rangy.min.js
|
||||
// This replaces angular-sanitize. We should include only one.
|
||||
// https://github.com/textAngular/textAngular#where-to-get-it
|
||||
//= require textAngular-sanitize.min.js
|
||||
//= require textAngular.min.js
|
||||
//= require i18n/translations
|
||||
|
||||
@@ -2,4 +2,10 @@ angular.module("admin.utils").directive "textangularStrip", () ->
|
||||
restrict: 'CA'
|
||||
link: (scope, element, attrs) ->
|
||||
scope.stripFormatting = ($html) ->
|
||||
return String($html).replace(/<[^>]+>/gm, '')
|
||||
element = document.createElement("div")
|
||||
element.innerHTML = String($html)
|
||||
allTags = element.getElementsByTagName("*")
|
||||
for child in allTags
|
||||
child.removeAttribute("style")
|
||||
child.removeAttribute("class")
|
||||
return element.innerHTML
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
// This is a manifest file that'll be compiled into including all the files listed below.
|
||||
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
||||
// be included in the compiled file accessible from http://example.com/assets/application.js
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// the compiled file.
|
||||
//
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require_tree .
|
||||
@@ -0,0 +1,17 @@
|
||||
Darkswarm.controller "PageSelectionCtrl", ($scope, $location) ->
|
||||
$scope.selectedPage = ->
|
||||
# The path looks like `/contact` for the URL `https://ofn.org/shop#/contact`.
|
||||
# We remove the slash at the beginning.
|
||||
page = $location.path()[1..]
|
||||
|
||||
return $scope.whitelist[0] unless page
|
||||
|
||||
# If the path points to an unrelated path like `/login`, stay where we were.
|
||||
return $scope.lastPage unless page in $scope.whitelist
|
||||
|
||||
$scope.lastPage = page
|
||||
page
|
||||
|
||||
$scope.whitelistPages = (pages) ->
|
||||
$scope.whitelist = pages
|
||||
$scope.lastPage = pages[0]
|
||||
@@ -1,7 +0,0 @@
|
||||
/*
|
||||
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
||||
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
||||
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
||||
*= require_self
|
||||
*= require_tree .
|
||||
*/
|
||||
@@ -1,103 +1,172 @@
|
||||
@import "typography";
|
||||
|
||||
.darkswarm navigation {
|
||||
display: block;
|
||||
background: #f7f7f7;
|
||||
ordercycle {
|
||||
float: right;
|
||||
background: $grey-050;
|
||||
color: $grey-800;
|
||||
width: 100%;
|
||||
border-radius: 0.5em 0.5em 0 0;
|
||||
margin-top: 1em;
|
||||
padding: 1em 1.25em 0;
|
||||
|
||||
distributor.details {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
min-height: 150px;
|
||||
padding: 30px 0 20px 0;
|
||||
p {
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
h4 i {
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
|
||||
@media all and (max-width: 1024px) {
|
||||
float: none;
|
||||
padding: 0.5em 1em;
|
||||
width: 100%;
|
||||
margin-top: 0;
|
||||
display: inline-block;
|
||||
border-radius: 0;
|
||||
position: relative;
|
||||
right: 0;
|
||||
height: auto;
|
||||
|
||||
p {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 480px) {
|
||||
padding: 0.5em 1em 0.75em;
|
||||
}
|
||||
|
||||
.order-cycle-select {
|
||||
border: 1px solid $teal-300;
|
||||
display: inline-block;
|
||||
font-size: 1em;
|
||||
border-radius: 0.25em;
|
||||
|
||||
.select-label {
|
||||
background-color: rgba($teal-300, 0.5);
|
||||
display: inline-block;
|
||||
border-radius: 0.25em 0 0 0.25em;
|
||||
float: left;
|
||||
font-size: 1em;
|
||||
line-height: 1.5em;
|
||||
padding: 0.5em 0.75em;
|
||||
height: 2.35em;
|
||||
|
||||
span {
|
||||
width: max-content;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
select {
|
||||
width: 200px;
|
||||
}
|
||||
img {
|
||||
display: block;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
width: inherit;
|
||||
display: inline-block;
|
||||
color: $white;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
margin-bottom: 0;
|
||||
font-size: 1em;
|
||||
line-height: 1.5em;
|
||||
padding: 0.5em 1.25em 0.5em 0.75em;
|
||||
height: 2.35em;
|
||||
background-image: url('/assets/white-caret.svg');
|
||||
background-size: 30px auto;
|
||||
border-radius: 0 0.25em 0.25em 0;
|
||||
min-width: 13em;
|
||||
|
||||
location {
|
||||
@include headingFont;
|
||||
}
|
||||
@media all and (max-width: 768px) {
|
||||
location, location + small {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
#distributor_title h3 {
|
||||
margin-top: 0;
|
||||
@media all and (max-width: 768px) {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
ordercycle {
|
||||
text-align: right;
|
||||
float: right;
|
||||
p {
|
||||
max-width: 400px;
|
||||
}
|
||||
h4 i {
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
@media all and (max-width: 640px) {
|
||||
float: left;
|
||||
clear: left;
|
||||
text-align: left;
|
||||
padding: 12px 10px;
|
||||
@media all and (max-width: 480px) {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
background: #e5e5e5;
|
||||
p {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
form.custom {
|
||||
text-align: right;
|
||||
& > strong {
|
||||
line-height: 2.5;
|
||||
font-size: 1.29em;
|
||||
padding-right: 14px;
|
||||
}
|
||||
select {
|
||||
width: inherit;
|
||||
display: inline-block;
|
||||
border: 1px #999;
|
||||
color: #666;
|
||||
font-size: 1em;
|
||||
margin-bottom: 0;
|
||||
padding: 8px 20px 8px 12px;
|
||||
@media all and (max-width: 768px) {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
@media screen and (-webkit-min-device-pixel-ratio: 0) {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
closing {
|
||||
@include headingFont;
|
||||
color: black;
|
||||
font-size: 1.5em;
|
||||
display: block;
|
||||
padding-bottom: 12px;
|
||||
@media all and (max-width: 768px) {
|
||||
font-size: 1.2em;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
span {
|
||||
@media all and (max-width: 768px) {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 1024px) {
|
||||
float: none;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
@media all and (max-width: 768px) {
|
||||
float: none;
|
||||
}
|
||||
|
||||
@media all and (max-width: 480px) {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
closing {
|
||||
@include headingFont;
|
||||
color: $grey-800;
|
||||
font-size: 1.25rem;
|
||||
display: block;
|
||||
padding: 0.5em 0;
|
||||
|
||||
span {
|
||||
@media all and (max-width: 768px) {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
shop ordercycle {
|
||||
background: $teal-400;
|
||||
color: $white;
|
||||
|
||||
&.requires-selection {
|
||||
background-color: $red-700;
|
||||
|
||||
.order-cycle-select {
|
||||
border: 1px solid $red-500;
|
||||
|
||||
.select-label {
|
||||
background-color: rgba($red-500, 0.5);
|
||||
}
|
||||
|
||||
select {
|
||||
background-color: $white;
|
||||
background-image: url('/assets/black-caret.svg');
|
||||
color: $grey-500;
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closing {
|
||||
color: $white;
|
||||
padding: 0 0 12px;
|
||||
|
||||
@media all and (max-width: 1024px) {
|
||||
float: none;
|
||||
display: inline-block;
|
||||
padding: 0.2em 0 0;
|
||||
font-size: 1.2em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
@media all and (max-width: 768px) {
|
||||
float: none;
|
||||
padding: 0 0 10px;
|
||||
}
|
||||
}
|
||||
|
||||
form.custom {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
shop navigation ordercycle {
|
||||
margin-top: 3em;
|
||||
padding: 1em;
|
||||
height: 7.6em;
|
||||
position: absolute;
|
||||
right: 1em;
|
||||
}
|
||||
|
||||
.sub-header {
|
||||
form {
|
||||
p {
|
||||
margin-bottom: 0.75em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +1,6 @@
|
||||
@import "mixins";
|
||||
@import "branding";
|
||||
|
||||
// .darkswarm
|
||||
// product
|
||||
|
||||
ordercycle {
|
||||
.joyride-tip-guide {
|
||||
background-color: $clr-brick;
|
||||
|
||||
.joyride-nub.right {
|
||||
border-color: $clr-brick !important;
|
||||
border-top-color: transparent !important;
|
||||
border-right-color: transparent !important;
|
||||
border-bottom-color: transparent !important;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@media all and (max-width: 768px) {
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Pop over
|
||||
// Foundation overrides
|
||||
.joyride-tip-guide.price_breakdown {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
|
||||
products .filter-box {
|
||||
background: #f7f7f7;
|
||||
background: $grey-050;
|
||||
}
|
||||
|
||||
.filter-box {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
$ofn-brand: #f27052;
|
||||
|
||||
$distributor-header-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 8px 6px -6px rgba(0, 0, 0, 0.2);
|
||||
|
||||
// e.g. australia, uk, norway specific color
|
||||
|
||||
$ofn-grey: #808184;
|
||||
@@ -38,3 +40,27 @@ $light-grey: #ddd;
|
||||
$light-grey-transparency: rgba(0, 0, 0, .1);
|
||||
$black: #000;
|
||||
$white: #fff;
|
||||
|
||||
$grey-050: #f7f7f7;
|
||||
|
||||
$grey-400: #bbb;
|
||||
$grey-500: #999;
|
||||
$grey-600: #777;
|
||||
$grey-700: #555;
|
||||
$grey-800: #333;
|
||||
|
||||
$teal-300: #80d3df;
|
||||
$teal-400: #4cb5c5;
|
||||
$teal-500: #0096ad;
|
||||
|
||||
$orange-400: #ff9466;
|
||||
$orange-500: #f27052;
|
||||
$orange-600: #d7583a;
|
||||
|
||||
$red-500: #e54e47;
|
||||
$red-700: #c1122b;
|
||||
|
||||
$social-facebook: #3b5998;
|
||||
$social-instagram: #e1306c;
|
||||
$social-linkedin: #0e76a8;
|
||||
$social-twitter: #00acee;
|
||||
|
||||
@@ -44,7 +44,7 @@ checkout {
|
||||
h5 {
|
||||
margin: 0;
|
||||
padding: 0.65em;
|
||||
background: #f7f7f7;
|
||||
background: $grey-050;
|
||||
|
||||
.label {
|
||||
font-size: 1em;
|
||||
|
||||
52
app/assets/stylesheets/darkswarm/distributor_header.css.scss
Normal file
52
app/assets/stylesheets/darkswarm/distributor_header.css.scss
Normal file
@@ -0,0 +1,52 @@
|
||||
@import 'typography';
|
||||
|
||||
section {
|
||||
:not(shop) navigation {
|
||||
box-shadow: $distributor-header-shadow;
|
||||
}
|
||||
}
|
||||
|
||||
.darkswarm navigation {
|
||||
display: block;
|
||||
background: $white;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
||||
.details {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
min-height: 150px;
|
||||
padding: 30px 0 0;
|
||||
position: relative;
|
||||
|
||||
select {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
location {
|
||||
@include headingFont;
|
||||
}
|
||||
|
||||
@media all and (max-width: 768px) {
|
||||
location, location + small {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
#distributor_title h3 {
|
||||
margin-top: 0;
|
||||
padding-top: 0.45em;
|
||||
|
||||
@media all and (max-width: 768px) {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,6 +111,22 @@
|
||||
|
||||
i {
|
||||
font-size: 2rem;
|
||||
|
||||
&.facebook {
|
||||
color: $social-facebook;
|
||||
}
|
||||
|
||||
&.twitter {
|
||||
color: $social-twitter;
|
||||
}
|
||||
|
||||
&.linkedin {
|
||||
color: $social-linkedin;
|
||||
}
|
||||
|
||||
&.instagram {
|
||||
color: $social-instagram;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
|
||||
@@ -3,22 +3,27 @@
|
||||
@import "branding";
|
||||
|
||||
// Tabs styling
|
||||
.tabset-ctrl#shop-tabs {
|
||||
#shop-tabs {
|
||||
|
||||
.tab-buttons {
|
||||
background: url("/assets/gray_jean.png") top left repeat;
|
||||
|
||||
@include box-shadow(inset 0 2px 3px 0 rgba(0, 0, 0, 0.15));
|
||||
|
||||
color: $dark-grey;
|
||||
box-shadow: $distributor-header-shadow;
|
||||
|
||||
.row:first-child {
|
||||
.columns {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@media all and (max-width: 1024px) {
|
||||
display: table;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media all and (max-width: 480px) {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tab {
|
||||
.page {
|
||||
text-align: center;
|
||||
border-top: 4px solid transparent;
|
||||
display: inline-block;
|
||||
@@ -27,8 +32,7 @@
|
||||
>a {
|
||||
outline: none;
|
||||
display: block;
|
||||
background-color: #efefef;
|
||||
color: #222;
|
||||
color: $grey-500;
|
||||
font-family: "Oswald", sans-serif;
|
||||
}
|
||||
|
||||
@@ -39,12 +43,11 @@
|
||||
text-transform: uppercase;
|
||||
line-height: 1;
|
||||
font-size: 0.875em;
|
||||
text-shadow: 0 -1px 1px #ffffff;
|
||||
padding: 1em 2em;
|
||||
border: none;
|
||||
|
||||
&:hover, &:focus, &:active {
|
||||
color: $clr-brick-bright;
|
||||
&:hover, &:active {
|
||||
color: $teal-500;
|
||||
}
|
||||
|
||||
&, &:hover {
|
||||
@@ -53,29 +56,41 @@
|
||||
|
||||
@media all and (max-width: 640px) {
|
||||
padding: 0.35em 0 0.65em 0;
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.selected {
|
||||
border-bottom: 4px solid $clr-brick;
|
||||
border-bottom: 4px solid $teal-500;
|
||||
|
||||
a {
|
||||
color: $clr-brick;
|
||||
color: $teal-500;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 1024px) {
|
||||
display: table-cell;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// content revealed in accordion
|
||||
|
||||
.tab-view {
|
||||
.page-view {
|
||||
margin-bottom: 5em;
|
||||
background: none;
|
||||
border: none;
|
||||
|
||||
.content {
|
||||
padding: 1.25em 0;
|
||||
background-color: $white;
|
||||
background-color: transparent;
|
||||
|
||||
a {
|
||||
color: $orange-500;
|
||||
|
||||
&:hover {
|
||||
color: $orange-600;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 0px 0px 0px 40px;
|
||||
@@ -83,6 +98,7 @@
|
||||
|
||||
h5 {
|
||||
margin-bottom: 1em;
|
||||
font-family: $body-font;
|
||||
}
|
||||
|
||||
p {
|
||||
@@ -100,13 +116,9 @@
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
color: $dark-grey;
|
||||
border-bottom: 1px solid $disabled-dark;
|
||||
color: $grey-600;
|
||||
margin-top: 0.75rem;
|
||||
margin-bottom: 0.75rem;
|
||||
padding-bottom: 0.25rem;
|
||||
font-size: 0.875rem;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
$headingFont: "Oswald";
|
||||
$bodyFont: "Roboto";
|
||||
$body-font: "Roboto", Arial, sans-serif;
|
||||
|
||||
body {
|
||||
@include bodyFont;
|
||||
@@ -43,7 +43,7 @@ small, .small {
|
||||
.text-small {
|
||||
font-size: 0.875rem;
|
||||
margin-bottom: 0.5rem;
|
||||
font-family: $bodyFont;
|
||||
font-family: $body-font;
|
||||
|
||||
&, & * {
|
||||
font-size: 0.875rem;
|
||||
@@ -52,12 +52,12 @@ small, .small {
|
||||
|
||||
.text-normal {
|
||||
font-weight: 400;
|
||||
font-family: $bodyFont;
|
||||
font-family: $body-font;
|
||||
}
|
||||
|
||||
.text-skinny {
|
||||
font-weight: 300;
|
||||
font-family: $bodyFont;
|
||||
font-family: $body-font;
|
||||
}
|
||||
|
||||
.word-wrap {
|
||||
@@ -114,9 +114,9 @@ ul.bullet-list, ul.check-list {
|
||||
}
|
||||
|
||||
li:before {
|
||||
content: "";
|
||||
content: "•";
|
||||
font-family: "OFN";
|
||||
margin-left: -1.25em;
|
||||
margin: 0 0.25em 0 -1.25em;
|
||||
display: inline-block;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
@include border-radius(0.5em);
|
||||
|
||||
font-family: $bodyFont;
|
||||
font-family: $body-font;
|
||||
background-color: transparent;
|
||||
border: 2px solid rgba(200, 200, 200, 1);
|
||||
color: #999;
|
||||
@@ -63,7 +63,7 @@
|
||||
}
|
||||
|
||||
.button.primary, button.primary {
|
||||
font-family: $bodyFont;
|
||||
font-family: $body-font;
|
||||
background: $clr-brick;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,12 @@ module Admin
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@object = Enterprise.where(permalink: params[:id]).
|
||||
includes(users: [:ship_address, :bill_address]).first
|
||||
super
|
||||
end
|
||||
|
||||
def welcome
|
||||
render layout: "spree/layouts/bare_admin"
|
||||
end
|
||||
@@ -172,12 +178,14 @@ module Admin
|
||||
end
|
||||
|
||||
def load_methods_and_fees
|
||||
enterprise_payment_methods = @enterprise.payment_methods.to_a
|
||||
enterprise_shipping_methods = @enterprise.shipping_methods.to_a
|
||||
# rubocop:disable Style/TernaryParentheses
|
||||
@payment_methods = Spree::PaymentMethod.managed_by(spree_current_user).sort_by! do |pm|
|
||||
[(@enterprise.payment_methods.include? pm) ? 0 : 1, pm.name]
|
||||
[(enterprise_payment_methods.include? pm) ? 0 : 1, pm.name]
|
||||
end
|
||||
@shipping_methods = Spree::ShippingMethod.managed_by(spree_current_user).sort_by! do |sm|
|
||||
[(@enterprise.shipping_methods.include? sm) ? 0 : 1, sm.name]
|
||||
[(enterprise_shipping_methods.include? sm) ? 0 : 1, sm.name]
|
||||
end
|
||||
# rubocop:enable Style/TernaryParentheses
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module Api
|
||||
class CustomersController < BaseController
|
||||
class CustomersController < Api::BaseController
|
||||
skip_authorization_check only: :index
|
||||
|
||||
def index
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module Api
|
||||
class EnterpriseAttachmentController < BaseController
|
||||
class EnterpriseAttachmentController < Api::BaseController
|
||||
class MissingImplementationError < StandardError; end
|
||||
class UnknownEnterpriseAuthorizationActionError < StandardError; end
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module Api
|
||||
class EnterpriseFeesController < BaseController
|
||||
class EnterpriseFeesController < Api::BaseController
|
||||
respond_to :json
|
||||
|
||||
def destroy
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module Api
|
||||
class LogosController < EnterpriseAttachmentController
|
||||
class LogosController < Api::EnterpriseAttachmentController
|
||||
private
|
||||
|
||||
def attachment_name
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module Api
|
||||
class OrderCyclesController < BaseController
|
||||
class OrderCyclesController < Api::BaseController
|
||||
include EnterprisesHelper
|
||||
respond_to :json
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module Api
|
||||
class OrdersController < BaseController
|
||||
class OrdersController < Api::BaseController
|
||||
def show
|
||||
authorize! :read, order
|
||||
render json: order, serializer: Api::OrderDetailedSerializer, current_order: order
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module Api
|
||||
class ProductImagesController < BaseController
|
||||
class ProductImagesController < Api::BaseController
|
||||
respond_to :json
|
||||
|
||||
def update_product_image
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module Api
|
||||
class PromoImagesController < EnterpriseAttachmentController
|
||||
class PromoImagesController < Api::EnterpriseAttachmentController
|
||||
private
|
||||
|
||||
def attachment_name
|
||||
|
||||
@@ -35,6 +35,8 @@ class CheckoutController < Spree::StoreController
|
||||
rescue_from Spree::Core::GatewayError, with: :rescue_from_spree_gateway_error
|
||||
|
||||
def edit
|
||||
return handle_redirect_from_stripe if valid_payment_intent_provided?
|
||||
|
||||
# This is only required because of spree_paypal_express. If we implement
|
||||
# a version of paypal that uses this controller, and more specifically
|
||||
# the #update_failed method, then we can remove this call
|
||||
@@ -151,6 +153,23 @@ class CheckoutController < Spree::StoreController
|
||||
end
|
||||
end
|
||||
|
||||
def valid_payment_intent_provided?
|
||||
params["payment_intent"]&.starts_with?("pi_") &&
|
||||
@order.state == "payment" &&
|
||||
@order.payments.last.state == "pending" &&
|
||||
@order.payments.last.response_code == params["payment_intent"]
|
||||
end
|
||||
|
||||
def handle_redirect_from_stripe
|
||||
if advance_order_state(@order) && order_complete?
|
||||
checkout_succeeded
|
||||
redirect_to(order_path(@order)) && return
|
||||
else
|
||||
flash[:error] = order_workflow_error
|
||||
checkout_failed
|
||||
end
|
||||
end
|
||||
|
||||
def checkout_workflow(shipping_method_id)
|
||||
while @order.state != "complete"
|
||||
if @order.state == "payment"
|
||||
@@ -165,11 +184,12 @@ class CheckoutController < Spree::StoreController
|
||||
return update_failed
|
||||
end
|
||||
|
||||
update_result
|
||||
update_response
|
||||
end
|
||||
|
||||
def redirect_to_payment_gateway
|
||||
redirect_path = Checkout::PaymentRedirect.new(params).path
|
||||
redirect_path = Checkout::PaypalRedirect.new(params).path
|
||||
redirect_path = Checkout::StripeRedirect.new(params, @order).path if redirect_path.blank?
|
||||
return if redirect_path.blank?
|
||||
|
||||
render json: { path: redirect_path }, status: :ok
|
||||
@@ -193,27 +213,27 @@ class CheckoutController < Spree::StoreController
|
||||
end
|
||||
end
|
||||
|
||||
def update_result
|
||||
if @order.state == "complete" || @order.completed?
|
||||
save_order_addresses_as_user_default
|
||||
ResetOrderService.new(self, current_order).call
|
||||
|
||||
update_succeeded
|
||||
def update_response
|
||||
if order_complete?
|
||||
checkout_succeeded
|
||||
update_succeeded_response
|
||||
else
|
||||
update_failed
|
||||
end
|
||||
end
|
||||
|
||||
def save_order_addresses_as_user_default
|
||||
user_default_address_setter = UserDefaultAddressSetter.new(@order, spree_current_user)
|
||||
user_default_address_setter.set_default_bill_address if params[:order][:default_bill_address]
|
||||
user_default_address_setter.set_default_ship_address if params[:order][:default_ship_address]
|
||||
def order_complete?
|
||||
@order.state == "complete" || @order.completed?
|
||||
end
|
||||
|
||||
def update_succeeded
|
||||
def checkout_succeeded
|
||||
Checkout::PostCheckoutActions.new(@order).success(self, params, spree_current_user)
|
||||
|
||||
session[:access_token] = current_order.token
|
||||
flash[:notice] = t(:order_processed_successfully)
|
||||
end
|
||||
|
||||
def update_succeeded_response
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
respond_with(@order, location: order_path(@order))
|
||||
@@ -225,9 +245,15 @@ class CheckoutController < Spree::StoreController
|
||||
end
|
||||
|
||||
def update_failed
|
||||
current_order.updater.shipping_address_from_distributor
|
||||
RestartCheckout.new(@order).call
|
||||
checkout_failed
|
||||
update_failed_response
|
||||
end
|
||||
|
||||
def checkout_failed
|
||||
Checkout::PostCheckoutActions.new(@order).failure
|
||||
end
|
||||
|
||||
def update_failed_response
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
render :edit
|
||||
|
||||
@@ -8,7 +8,7 @@ class ProducersController < BaseController
|
||||
.activated
|
||||
.visible
|
||||
.is_primary_producer
|
||||
.includes(address: :state)
|
||||
.includes(address: [:state, :country])
|
||||
.includes(:properties)
|
||||
.includes(supplied_products: :properties)
|
||||
.all
|
||||
|
||||
@@ -8,7 +8,7 @@ class ShopsController < BaseController
|
||||
.activated
|
||||
.visible
|
||||
.is_distributor
|
||||
.includes(address: :state)
|
||||
.includes(address: [:state, :country])
|
||||
.includes(:properties)
|
||||
.includes(supplied_products: :properties)
|
||||
.all
|
||||
|
||||
@@ -109,7 +109,10 @@ module Spree
|
||||
private
|
||||
|
||||
def load_order
|
||||
@order = Order.find_by_number!(params[:id], include: :adjustments) if params[:id]
|
||||
if params[:id]
|
||||
@order = Order.includes(:adjustments, :shipments, line_items: :adjustments).
|
||||
find_by_number!(params[:id])
|
||||
end
|
||||
authorize! action, @order
|
||||
end
|
||||
|
||||
@@ -128,7 +131,7 @@ module Spree
|
||||
def load_distribution_choices
|
||||
@shops = Enterprise.is_distributor.managed_by(spree_current_user).by_name
|
||||
|
||||
ocs = OrderCycle.managed_by(spree_current_user)
|
||||
ocs = OrderCycle.includes(:suppliers, :distributors).managed_by(spree_current_user)
|
||||
@order_cycles = ocs.soonest_closing +
|
||||
ocs.soonest_opening +
|
||||
ocs.closed +
|
||||
|
||||
@@ -217,11 +217,7 @@ module Spree
|
||||
end
|
||||
|
||||
def render_report(header, table, create_csv, csv_file_name)
|
||||
if create_csv
|
||||
@csv_report = csv_report(header, table)
|
||||
send_data @csv_report, filename: csv_file_name
|
||||
end
|
||||
|
||||
send_data csv_report(header, table), filename: csv_file_name if create_csv
|
||||
@header = header
|
||||
@table = table
|
||||
# Rendering HTML is the default.
|
||||
|
||||
@@ -59,7 +59,7 @@ module Spree
|
||||
@collection ||= if @deleted.blank?
|
||||
super
|
||||
else
|
||||
Variant.where(product_id: parent.id).deleted
|
||||
Variant.unscoped.where(product_id: parent.id).deleted
|
||||
end
|
||||
@collection
|
||||
end
|
||||
|
||||
@@ -59,6 +59,7 @@ module Spree
|
||||
# It destroys the whole customer object
|
||||
def destroy_at_stripe
|
||||
stripe_customer = Stripe::Customer.retrieve(@credit_card.gateway_customer_profile_id, {})
|
||||
|
||||
stripe_customer.delete if stripe_customer
|
||||
end
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ require 'open_food_network/enterprise_injection_data'
|
||||
module InjectionHelper
|
||||
include SerializerHelper
|
||||
|
||||
def inject_enterprises(enterprises = Enterprise.activated.includes(address: :state).all)
|
||||
def inject_enterprises(enterprises = nil)
|
||||
inject_json_ams(
|
||||
"enterprises",
|
||||
enterprises,
|
||||
enterprises || default_enterprise_query,
|
||||
Api::EnterpriseSerializer,
|
||||
enterprise_injection_data
|
||||
)
|
||||
@@ -17,7 +17,10 @@ module InjectionHelper
|
||||
|
||||
inject_json_ams(
|
||||
"groups",
|
||||
EnterpriseGroup.on_front_page.by_position.select(select_only).includes(address: :state).all,
|
||||
EnterpriseGroup.on_front_page.by_position.select(select_only).
|
||||
includes(enterprises: [:shipping_methods, { address: [:state, :country] }],
|
||||
address: :state).
|
||||
all,
|
||||
Api::GroupListSerializer
|
||||
)
|
||||
end
|
||||
@@ -35,13 +38,21 @@ module InjectionHelper
|
||||
|
||||
inject_json_ams(
|
||||
"enterprises",
|
||||
Enterprise.activated.visible.select(select_only).includes(address: :state).all,
|
||||
Enterprise.activated.visible.select(select_only).includes(address: [:state, :country]).all,
|
||||
Api::EnterpriseShopfrontListSerializer
|
||||
)
|
||||
end
|
||||
|
||||
def inject_enterprise_and_relatives
|
||||
inject_json_ams "enterprises", current_distributor.relatives_including_self.activated.includes(address: :state).all, Api::EnterpriseSerializer, enterprise_injection_data
|
||||
enterprises_and_relatives = current_distributor.
|
||||
relatives_including_self.
|
||||
activated.
|
||||
includes(address: [:state, :country]).
|
||||
all
|
||||
|
||||
inject_json_ams "enterprises",
|
||||
enterprises_and_relatives,
|
||||
Api::EnterpriseSerializer, enterprise_injection_data
|
||||
end
|
||||
|
||||
def inject_group_enterprises
|
||||
@@ -138,6 +149,10 @@ module InjectionHelper
|
||||
|
||||
private
|
||||
|
||||
def default_enterprise_query
|
||||
Enterprise.activated.includes(address: [:state, :country]).all
|
||||
end
|
||||
|
||||
def enterprise_injection_data
|
||||
@enterprise_injection_data ||= OpenFoodNetwork::EnterpriseInjectionData.new
|
||||
{ data: @enterprise_injection_data }
|
||||
|
||||
@@ -16,4 +16,8 @@ module SharedHelper
|
||||
def admin_user?
|
||||
spree_current_user.andand.has_spree_role? 'admin'
|
||||
end
|
||||
|
||||
def current_shop_products_path
|
||||
"#{main_app.enterprise_shop_path(current_distributor)}#/shop"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,6 +8,10 @@ module ShopHelper
|
||||
end
|
||||
end
|
||||
|
||||
def oc_select_options
|
||||
@order_cycles.map { |oc| { time: pickup_time(oc), id: oc.id } }
|
||||
end
|
||||
|
||||
def require_customer?
|
||||
current_distributor.require_login? && !user_is_related_to_distributor?
|
||||
end
|
||||
@@ -31,6 +35,10 @@ module ShopHelper
|
||||
].select{ |tab| tab[:show] }
|
||||
end
|
||||
|
||||
def shop_tab_names
|
||||
shop_tabs.map { |tab| tab[:name] }
|
||||
end
|
||||
|
||||
def show_home_tab?
|
||||
require_customer? || current_distributor.preferred_shopfront_message.present?
|
||||
end
|
||||
|
||||
@@ -5,5 +5,21 @@ module Spree
|
||||
def variant_options(v, _options = {})
|
||||
v.options_text
|
||||
end
|
||||
|
||||
# Overriden to eager-load :states
|
||||
def available_countries
|
||||
checkout_zone = Zone.find_by_name(Spree::Config[:checkout_zone])
|
||||
|
||||
countries = if checkout_zone && checkout_zone.kind == 'country'
|
||||
checkout_zone.country_list
|
||||
else
|
||||
Country.includes(:states).all
|
||||
end
|
||||
|
||||
countries.collect do |country|
|
||||
country.name = Spree.t(country.iso, scope: 'country_names', default: country.name)
|
||||
country
|
||||
end.sort { |a, b| a.name <=> b.name }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -54,6 +54,8 @@ module Calculator
|
||||
# Customer ends up getting 350mL (line_item.final_weight_volume) of wine
|
||||
# that represent 2.8 (quantity_implied_in_final_weight_volume) glasses of wine
|
||||
def quantity_implied_in_final_weight_volume(line_item)
|
||||
return line_item.quantity if line_item.variant.unit_value.to_f.zero?
|
||||
|
||||
(1.0 * line_item.final_weight_volume / line_item.variant.unit_value).round(3)
|
||||
end
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ module ProductImport
|
||||
if settings.importing_into_inventory?
|
||||
InventoryResetStrategy
|
||||
else
|
||||
ProductsResetStrategy
|
||||
Catalog::ProductImport::ProductsResetStrategy
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
module ProductImport
|
||||
class ProductsResetStrategy
|
||||
def initialize(excluded_items_ids)
|
||||
@excluded_items_ids = excluded_items_ids
|
||||
end
|
||||
|
||||
def reset(enterprise_ids)
|
||||
@enterprise_ids = enterprise_ids
|
||||
|
||||
return 0 if enterprise_ids.blank?
|
||||
|
||||
reset_variants_on_hand(enterprise_variants_relation)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
attr_reader :excluded_items_ids, :enterprise_ids
|
||||
|
||||
def enterprise_variants_relation
|
||||
relation = Spree::Variant
|
||||
.joins(:product)
|
||||
.where(
|
||||
spree_products: { supplier_id: enterprise_ids },
|
||||
spree_variants: { is_master: false, deleted_at: nil }
|
||||
)
|
||||
|
||||
return relation if excluded_items_ids.blank?
|
||||
|
||||
relation.where('spree_variants.id NOT IN (?)', excluded_items_ids)
|
||||
end
|
||||
|
||||
def reset_variants_on_hand(variants)
|
||||
updated_records_count = 0
|
||||
variants.each do |variant|
|
||||
updated_records_count += 1 if reset_variant_on_hand(variant)
|
||||
end
|
||||
updated_records_count
|
||||
end
|
||||
|
||||
def reset_variant_on_hand(variant)
|
||||
variant.on_hand = 0
|
||||
variant.on_hand.zero?
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -13,14 +13,15 @@ module Spree
|
||||
def compute(object = nil)
|
||||
return 0 if object.nil?
|
||||
|
||||
preferred_amount * line_items_for(object).reduce(0) do |sum, value|
|
||||
value_to_add = if matching_products.blank? || matching_products.include?(value.product)
|
||||
value.quantity
|
||||
number_of_line_items = line_items_for(object).reduce(0) do |sum, line_item|
|
||||
value_to_add = if matching_products.blank? || matching_products.include?(line_item.product)
|
||||
line_item.quantity
|
||||
else
|
||||
0
|
||||
end
|
||||
sum + value_to_add
|
||||
end
|
||||
preferred_amount * number_of_line_items
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
require 'stripe/profile_storer'
|
||||
require 'stripe/credit_card_cloner'
|
||||
require 'stripe/authorize_response_patcher'
|
||||
require 'stripe/payment_intent_validator'
|
||||
require 'active_merchant/billing/gateways/stripe_payment_intents'
|
||||
require 'active_merchant/billing/gateways/stripe_decorator'
|
||||
|
||||
@@ -32,9 +34,26 @@ module Spree
|
||||
|
||||
# NOTE: the name of this method is determined by Spree::Payment::Processing
|
||||
def purchase(money, creditcard, gateway_options)
|
||||
provider.purchase(*options_for_purchase_or_auth(money, creditcard, gateway_options))
|
||||
begin
|
||||
payment_intent_id = fetch_payment_intent(creditcard, gateway_options)
|
||||
rescue Stripe::StripeError => e
|
||||
return failed_activemerchant_billing_response(e.message)
|
||||
end
|
||||
|
||||
options = basic_options(gateway_options)
|
||||
options[:customer] = creditcard.gateway_customer_profile_id
|
||||
provider.capture(money, payment_intent_id, options)
|
||||
rescue Stripe::StripeError => e
|
||||
failed_activemerchant_billing_response(e.message)
|
||||
end
|
||||
|
||||
# NOTE: the name of this method is determined by Spree::Payment::Processing
|
||||
def authorize(money, creditcard, gateway_options)
|
||||
authorize_response = provider.authorize(*options_for_authorize(money,
|
||||
creditcard,
|
||||
gateway_options))
|
||||
Stripe::AuthorizeResponsePatcher.new(authorize_response).call!
|
||||
rescue Stripe::StripeError => e
|
||||
# This will be an error caused by generating a stripe token
|
||||
failed_activemerchant_billing_response(e.message)
|
||||
end
|
||||
|
||||
@@ -65,11 +84,17 @@ module Spree
|
||||
options.merge(login: Stripe.api_key)
|
||||
end
|
||||
|
||||
def options_for_purchase_or_auth(money, creditcard, gateway_options)
|
||||
def basic_options(gateway_options)
|
||||
options = {}
|
||||
options[:description] = "Spree Order ID: #{gateway_options[:order_id]}"
|
||||
options[:currency] = gateway_options[:currency]
|
||||
options[:stripe_account] = stripe_account_id
|
||||
options
|
||||
end
|
||||
|
||||
def options_for_authorize(money, creditcard, gateway_options)
|
||||
options = basic_options(gateway_options)
|
||||
options[:return_url] = full_checkout_path
|
||||
|
||||
customer_id, payment_method_id = Stripe::CreditCardCloner.new.clone(creditcard,
|
||||
stripe_account_id)
|
||||
@@ -77,6 +102,19 @@ module Spree
|
||||
[money, payment_method_id, options]
|
||||
end
|
||||
|
||||
def fetch_payment_intent(creditcard, gateway_options)
|
||||
payment = fetch_payment(creditcard, gateway_options)
|
||||
raise Stripe::StripeError, I18n.t(:no_pending_payments) unless payment&.response_code
|
||||
|
||||
Stripe::PaymentIntentValidator.new.call(payment.response_code, stripe_account_id)
|
||||
end
|
||||
|
||||
def fetch_payment(creditcard, gateway_options)
|
||||
order_number = gateway_options[:order_id].split('-').first
|
||||
|
||||
Spree::Order.find_by_number(order_number).payments.merge(creditcard.payments).last
|
||||
end
|
||||
|
||||
def failed_activemerchant_billing_response(error_message)
|
||||
ActiveMerchant::Billing::Response.new(false, error_message)
|
||||
end
|
||||
@@ -86,6 +124,16 @@ module Spree
|
||||
|
||||
errors.add(:stripe_account_owner, I18n.t(:error_required))
|
||||
end
|
||||
|
||||
def full_checkout_path
|
||||
URI.join(url_helpers.root_url, url_helpers.checkout_path).to_s
|
||||
end
|
||||
|
||||
def url_helpers
|
||||
# This is how we can get the helpers with a usable root_url outside the controllers
|
||||
Rails.application.routes.default_url_options = ActionMailer::Base.default_url_options
|
||||
Rails.application.routes.url_helpers
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -36,6 +36,10 @@ Spree::LineItem.class_eval do
|
||||
end
|
||||
}
|
||||
|
||||
scope :in_orders, lambda { |orders|
|
||||
where(order_id: orders)
|
||||
}
|
||||
|
||||
# Find line items that are from order sorted by variant name and unit value
|
||||
scope :sorted_by_name_and_unit_value, -> {
|
||||
joins(variant: :product).
|
||||
|
||||
@@ -77,10 +77,6 @@ Spree::Order.class_eval do
|
||||
joins('LEFT OUTER JOIN spree_products ON (spree_products.id = spree_variants.product_id)')
|
||||
}
|
||||
|
||||
scope :with_line_items_variants_and_products, lambda {
|
||||
joins(line_items: { variant: :product })
|
||||
}
|
||||
|
||||
scope :not_state, lambda { |state|
|
||||
where("state != ?", state)
|
||||
}
|
||||
@@ -121,6 +117,12 @@ Spree::Order.class_eval do
|
||||
end
|
||||
end
|
||||
|
||||
# "Checkout" is the initial state and, for card payments, "pending" is the state after authorization
|
||||
# These are both valid states to process the payment
|
||||
def pending_payments
|
||||
(payments.select(&:pending?) + payments.select(&:processing?) + payments.select(&:checkout?)).uniq
|
||||
end
|
||||
|
||||
def remove_variant(variant)
|
||||
line_items(:reload)
|
||||
current_item = find_line_item_by_variant(variant)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class Spree::ProductSet < ModelSet
|
||||
def initialize(attributes = {})
|
||||
super(Spree::Product, [], attributes, proc { |attrs| attrs[:product_id].blank? })
|
||||
super(Spree::Product, [], attributes)
|
||||
end
|
||||
|
||||
def save
|
||||
@@ -34,11 +34,9 @@ class Spree::ProductSet < ModelSet
|
||||
split_taxon_ids!(attributes)
|
||||
|
||||
product = find_model(@collection, attributes[:id])
|
||||
if product.nil?
|
||||
@klass.new(attributes).save unless @reject_if.andand.call(attributes)
|
||||
else
|
||||
update_product(product, attributes)
|
||||
end
|
||||
return if product.nil?
|
||||
|
||||
update_product(product, attributes)
|
||||
end
|
||||
|
||||
def split_taxon_ids!(attributes)
|
||||
|
||||
@@ -24,8 +24,10 @@ module Stock
|
||||
#
|
||||
# @return [Array<Spree::ShippingMethod>]
|
||||
def shipping_methods
|
||||
super.delete_if do |shipping_method|
|
||||
!ships_with?(order.distributor, shipping_method)
|
||||
available_shipping_methods = super.to_a
|
||||
|
||||
available_shipping_methods.keep_if do |shipping_method|
|
||||
ships_with?(order.distributor.shipping_methods.to_a, shipping_method)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -33,11 +35,11 @@ module Stock
|
||||
|
||||
# Checks whether the given distributor provides the specified shipping method
|
||||
#
|
||||
# @param distributor [Spree::Enterprise]
|
||||
# @param shipping_methods [Array<Spree::ShippingMethod>]
|
||||
# @param shipping_method [Spree::ShippingMethod]
|
||||
# @return [Boolean]
|
||||
def ships_with?(distributor, shipping_method)
|
||||
distributor.shipping_methods.include?(shipping_method)
|
||||
def ships_with?(shipping_methods, shipping_method)
|
||||
shipping_methods.include?(shipping_method)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -107,7 +107,7 @@ module Api
|
||||
end
|
||||
|
||||
def active
|
||||
data.active_distributors.andand.include? enterprise
|
||||
data.active_distributor_ids.andand.include? enterprise.id
|
||||
end
|
||||
|
||||
# Map svg icons.
|
||||
|
||||
@@ -9,7 +9,7 @@ module Api
|
||||
end
|
||||
|
||||
def active
|
||||
options[:data].active_distributors.andand.include? object
|
||||
options[:data].active_distributor_ids.andand.include? object.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Provides the redirect path if a redirect to the payment gateway is needed
|
||||
module Checkout
|
||||
class PaymentRedirect
|
||||
class PaypalRedirect
|
||||
def initialize(params)
|
||||
@params = params
|
||||
end
|
||||
30
app/services/checkout/post_checkout_actions.rb
Normal file
30
app/services/checkout/post_checkout_actions.rb
Normal file
@@ -0,0 +1,30 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Executes actions after checkout
|
||||
module Checkout
|
||||
class PostCheckoutActions
|
||||
def initialize(order)
|
||||
@order = order
|
||||
end
|
||||
|
||||
def success(controller, params, current_user)
|
||||
save_order_addresses_as_user_default(params, current_user)
|
||||
ResetOrderService.new(controller, @order).call
|
||||
end
|
||||
|
||||
def failure
|
||||
@order.updater.shipping_address_from_distributor
|
||||
RestartCheckout.new(@order).call
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def save_order_addresses_as_user_default(params, current_user)
|
||||
return unless params[:order]
|
||||
|
||||
user_default_address_setter = UserDefaultAddressSetter.new(@order, current_user)
|
||||
user_default_address_setter.set_default_bill_address if params[:order][:default_bill_address]
|
||||
user_default_address_setter.set_default_ship_address if params[:order][:default_ship_address]
|
||||
end
|
||||
end
|
||||
end
|
||||
46
app/services/checkout/stripe_redirect.rb
Normal file
46
app/services/checkout/stripe_redirect.rb
Normal file
@@ -0,0 +1,46 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Provides the redirect path if a redirect to the payment gateway is needed
|
||||
module Checkout
|
||||
class StripeRedirect
|
||||
def initialize(params, order)
|
||||
@params = params
|
||||
@order = order
|
||||
end
|
||||
|
||||
# Returns the path to the authentication form if a redirect is needed
|
||||
def path
|
||||
return unless stripe_payment_method?
|
||||
|
||||
payment = @order.pending_payments.last
|
||||
return unless payment&.checkout?
|
||||
|
||||
payment.authorize!
|
||||
raise unless payment.pending?
|
||||
|
||||
field_with_url(payment) if url?(field_with_url(payment))
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def stripe_payment_method?
|
||||
return unless @params[:order][:payments_attributes]
|
||||
|
||||
payment_method_id = @params[:order][:payments_attributes].first[:payment_method_id]
|
||||
payment_method = Spree::PaymentMethod.find(payment_method_id)
|
||||
payment_method.is_a?(Spree::Gateway::StripeSCA)
|
||||
end
|
||||
|
||||
def url?(string)
|
||||
return false if string.blank?
|
||||
|
||||
string.starts_with?("http")
|
||||
end
|
||||
|
||||
# Stripe::AuthorizeResponsePatcher patches the Stripe authorization response
|
||||
# so that this field stores the redirect URL
|
||||
def field_with_url(payment)
|
||||
payment.cvv_response_message
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2,24 +2,28 @@ require 'open_food_network/permissions'
|
||||
|
||||
module Permissions
|
||||
class Order
|
||||
def initialize(user)
|
||||
def initialize(user, search_params = nil)
|
||||
@user = user
|
||||
@permissions = OpenFoodNetwork::Permissions.new(@user)
|
||||
@search_params = search_params
|
||||
end
|
||||
|
||||
# Find orders that the user can see
|
||||
def visible_orders
|
||||
Spree::Order.
|
||||
with_line_items_variants_and_products.
|
||||
orders = Spree::Order.
|
||||
with_line_items_variants_and_products_outer.
|
||||
where(visible_orders_where_values)
|
||||
|
||||
filtered_orders(orders)
|
||||
end
|
||||
|
||||
# Any orders that the user can edit
|
||||
def editable_orders
|
||||
Spree::Order.where(
|
||||
managed_orders_where_values.
|
||||
or(coordinated_orders_where_values)
|
||||
)
|
||||
orders = Spree::Order.
|
||||
where(managed_orders_where_values.
|
||||
or(coordinated_orders_where_values))
|
||||
|
||||
filtered_orders(orders)
|
||||
end
|
||||
|
||||
def visible_line_items
|
||||
@@ -35,6 +39,18 @@ module Permissions
|
||||
|
||||
private
|
||||
|
||||
attr_reader :search_params
|
||||
|
||||
def filtered_orders(orders)
|
||||
return orders unless filter_orders?
|
||||
|
||||
orders.complete.not_state(:canceled).search(search_params).result
|
||||
end
|
||||
|
||||
def filter_orders?
|
||||
search_params.present?
|
||||
end
|
||||
|
||||
def visible_orders_where_values
|
||||
# Grouping keeps the 2 where clauses from produced_orders_where_values inside parentheses
|
||||
# This way it makes the OR work between the 3 types of orders:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.three.columns.alpha
|
||||
= f.label "enterprise_preferred_shopfront_message", t('.shopfront_message')
|
||||
.eight.columns.omega
|
||||
%text-angular{'ng-model' => 'Enterprise.preferred_shopfront_message', 'id' => 'enterprise_preferred_shopfront_message', 'name' => 'enterprise[preferred_shopfront_message]', 'class' => 'text-angular', "textangular-links-target-blank" => true,
|
||||
%text-angular{'ng-model' => 'Enterprise.preferred_shopfront_message', 'id' => 'enterprise_preferred_shopfront_message', 'name' => 'enterprise[preferred_shopfront_message]', 'class' => 'text-angular textangular-strip', 'ta-paste' => "stripFormatting($html)", "textangular-links-target-blank" => true,
|
||||
'ta-toolbar' => "[['h1','h2','h3','h4','p'],['bold','italics','underline','clear'],['insertLink']]",
|
||||
'placeholder' => t('.shopfront_message_placeholder')}
|
||||
.row
|
||||
@@ -11,7 +11,7 @@
|
||||
.three.columns.alpha
|
||||
= f.label "enterprise_preferred_shopfront_closed_message", t('.shopfront_closed_message')
|
||||
.eight.columns.omega
|
||||
%text-angular{'ng-model' => 'Enterprise.preferred_shopfront_closed_message', 'id' => 'enterprise_preferred_shopfront_closed_message', 'name' => 'enterprise[preferred_shopfront_closed_message]', 'class' => 'text-angular', "textangular-links-target-blank" => true,
|
||||
%text-angular{'ng-model' => 'Enterprise.preferred_shopfront_closed_message', 'id' => 'enterprise_preferred_shopfront_closed_message', 'name' => 'enterprise[preferred_shopfront_closed_message]', 'class' => 'text-angular textangular-strip', 'ta-paste' => "stripFormatting($html)", "textangular-links-target-blank" => true,
|
||||
'ta-toolbar' => "[['h1','h2','h3','h4','p'],['bold','italics','underline','clear'],['insertLink']]",
|
||||
'placeholder' => t('.shopfront_closed_message_placeholder')}
|
||||
.row
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
.darkswarm.footer-pad
|
||||
- content_for :order_cycle_form do
|
||||
|
||||
%closing
|
||||
= t :checkout_now
|
||||
%p
|
||||
@@ -15,16 +14,23 @@
|
||||
%strong
|
||||
= pickup_time current_order_cycle
|
||||
|
||||
- content_for :ordercycle_sidebar do
|
||||
.show-for-large-up.large-4.columns
|
||||
= render partial: "shopping_shared/order_cycles"
|
||||
|
||||
= render partial: "shopping_shared/header"
|
||||
|
||||
.sub-header.show-for-medium-down
|
||||
= render partial: "shopping_shared/order_cycles"
|
||||
|
||||
%accordion{"close-others" => "false"}
|
||||
%checkout.row{"ng-controller" => "CheckoutCtrl"}
|
||||
.small-12.medium-8.large-9.columns
|
||||
.small-12.medium-8.columns
|
||||
- unless spree_current_user
|
||||
= render partial: "checkout/authentication"
|
||||
%div{"ng-show" => "enabled", "ng-controller" => "AccordionCtrl"}
|
||||
= render partial: "checkout/form"
|
||||
.small-12.medium-4.large-3.columns
|
||||
.small-12.medium-4.columns
|
||||
= render partial: "checkout/summary"
|
||||
|
||||
|
||||
|
||||
@@ -19,22 +19,28 @@
|
||||
- content_for :order_cycle_form do
|
||||
|
||||
%div{"ng-controller" => "OrderCycleChangeCtrl", "ng-cloak" => true}
|
||||
%closing{"ng-if" => "OrderCycle.selected()"}
|
||||
= t :enterprises_next_closing
|
||||
%strong {{ OrderCycle.orders_close_at() | date_in_words }}
|
||||
%closing
|
||||
%div{"ng-if" => "OrderCycle.selected()"}
|
||||
= t :enterprises_next_closing
|
||||
%strong {{ OrderCycle.orders_close_at() | date_in_words }}
|
||||
%div{"ng-if" => "!OrderCycle.selected()"}
|
||||
= t :enterprises_choose
|
||||
|
||||
%span
|
||||
= t :enterprises_ready_for
|
||||
.order-cycle-select
|
||||
.select-label
|
||||
%span= t :enterprises_ready_for
|
||||
|
||||
/ Will this label should be a variable to reflect 'Ready for pickup / delivery' as appropriate
|
||||
|
||||
%select.avenir#order_cycle_id{"ng-model" => "order_cycle.order_cycle_id",
|
||||
"ofn-change-order-cycle" => true,
|
||||
"disabled" => require_customer?,
|
||||
"ng-options" => "oc.id as oc.time for oc in #{@order_cycles.map {|oc| {time: pickup_time(oc), id: oc.id}}.to_json}",
|
||||
"popover-placement" => "left", "popover" => t(:enterprises_choose), "popover-trigger" => "openTrigger"}
|
||||
%select.select2.avenir#order_cycle_id{"ng-model" => "order_cycle.order_cycle_id",
|
||||
"ofn-change-order-cycle" => true,
|
||||
"disabled" => require_customer?,
|
||||
"ng-options" => "oc.id as oc.time for oc in #{oc_select_options.to_json}"}
|
||||
|
||||
- if oc_select_options.count > 1
|
||||
%option{value: "", disabled: "", selected: ""}= t :shopping_oc_select
|
||||
|
||||
- content_for :ordercycle_sidebar do
|
||||
.show-for-large-up.large-4.columns
|
||||
= render partial: "shopping_shared/order_cycles"
|
||||
|
||||
= render partial: "shopping_shared/header"
|
||||
= render partial: "shopping_shared/tabs"
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
.row
|
||||
.large-12.large-centered.columns
|
||||
%h2
|
||||
= t :label_login
|
||||
= form_for Spree::User.new, :remote => true, :html => {'data-type' => :json}, :as => :spree_user, :url => spree.spree_user_session_path do |f|
|
||||
#password-credentials
|
||||
#login-error-alert.alert-box.alert.hide
|
||||
= t :login_invalid
|
||||
%p
|
||||
= f.label :email, t(:email)
|
||||
= f.email_field :email, :class => 'title', :tabindex => 1, :id => "login_spree_user_email"
|
||||
%p
|
||||
= f.label :password, t(:password)
|
||||
= f.password_field :password, :class => 'title', :tabindex => 2, :id => "login_spree_user_password"
|
||||
%p
|
||||
%label
|
||||
= f.check_box :remember_me
|
||||
= f.label :remember_me, t(:remember_me)
|
||||
%p= f.submit t(:login), :class => 'button primary', :tabindex => 3, :id => "login_spree_user_remember_me"
|
||||
@@ -1,18 +0,0 @@
|
||||
.row
|
||||
.large-12.large-centered.columns
|
||||
%h2
|
||||
= t :label_signup
|
||||
= form_for Spree::User.new, :as => :spree_user, :url => spree.spree_user_registration_path(@spree_user) do |f|
|
||||
%p
|
||||
= f.label :email, t(:email)
|
||||
= f.email_field :email, :class => 'title', :id => "signup_spree_user_email"
|
||||
|
||||
#password-credentials
|
||||
%p
|
||||
= f.label :password, t(:password)
|
||||
= f.password_field :password, :class => 'title', :id => "signup_spree_user_password"
|
||||
%p
|
||||
= f.label :password_confirmation, t(:confirm_password)
|
||||
= f.password_field :password_confirmation, :class => 'title', :id => "signup_spree_user_password_confirmation"
|
||||
|
||||
= f.submit t(:create), :class => 'button'
|
||||
10
app/views/layouts/_bugsnag_js.html.haml
Normal file
10
app/views/layouts/_bugsnag_js.html.haml
Normal file
@@ -0,0 +1,10 @@
|
||||
- bugsnag_js_key = ENV['BUGSNAG_JS_KEY'] || ENV['BUGSNAG_API_KEY']
|
||||
- if bugsnag_js_key.present?
|
||||
%script{src: "//d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js"}
|
||||
:javascript
|
||||
window.bugsnagClient = bugsnag({
|
||||
apiKey: "#{bugsnag_js_key}",
|
||||
beforeSend: function (report) {
|
||||
report.app.releaseStage = "#{Rails.env}"
|
||||
}
|
||||
});
|
||||
@@ -37,6 +37,7 @@
|
||||
#footer
|
||||
%loading
|
||||
|
||||
= render "layouts/bugsnag_js"
|
||||
%script{:src => "https://js.stripe.com/v3/", :type => "text/javascript"}
|
||||
%script{src: "//maps.googleapis.com/maps/api/js?libraries=places,geometry#{ ENV['GOOGLE_MAPS_API_KEY'] ? '&key=' + ENV['GOOGLE_MAPS_API_KEY'] : ''} "}
|
||||
= javascript_include_tag "darkswarm/all"
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
%p= t(".login")
|
||||
.row
|
||||
.small-12.columns.text-center
|
||||
%a.button.primary{ type: "button", href: "/" }= "#{t(".action")} >"
|
||||
%a.button.primary{ type: "button", href: spree.admin_dashboard_path }= t(".action")
|
||||
|
||||
@@ -2,14 +2,12 @@
|
||||
|
||||
%navigation
|
||||
%distributor.details.row
|
||||
.small-12.medium-6.large-6.columns
|
||||
.small-12.medium-12.large-8.columns
|
||||
#distributor_title
|
||||
- if distributor.logo?
|
||||
%img.left{src: distributor.logo.url(:thumb)}
|
||||
%h3
|
||||
= distributor.name
|
||||
%location= distributor.address.city
|
||||
/ Will this needs to be a drop-down to choose either pick-up point or delivery once shipping methods are implemented
|
||||
|
||||
.small-12.medium-6.large-6.columns
|
||||
= render partial: "shopping_shared/order_cycles"
|
||||
= yield :ordercycle_sidebar
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
- if most_recently_closed = OrderCycle.most_recently_closed_for(@distributor)
|
||||
(
|
||||
= t :shopping_oc_last_closed, distance_of_time: distance_of_time_in_words_to_now(most_recently_closed.orders_close_at)
|
||||
)
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
- if next_oc = OrderCycle.first_opening_for(@distributor)
|
||||
(
|
||||
= t :shopping_oc_next_open, distance_of_time: distance_of_time_in_words_to_now(next_oc.orders_open_at)
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
- content_for :injection_data do
|
||||
= inject_current_order_cycle
|
||||
|
||||
%ordercycle{"ng-controller" => "OrderCycleCtrl"}
|
||||
|
||||
- unless no_open_order_cycles?
|
||||
- unless no_open_order_cycles?
|
||||
%ordercycle{"ng-controller" => "OrderCycleCtrl", "ng-cloak" => true,
|
||||
"ng-class" => "{'requires-selection': !OrderCycle.selected()}"}
|
||||
%form.custom
|
||||
= yield :order_cycle_form
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
- shop_tabs.each do |tab|
|
||||
= render "shopping_shared/tabs/#{tab[:name]}"
|
||||
|
||||
.tabset-ctrl#shop-tabs{ navigate: 'true', alwaysopen: 'true', selected: shop_tabs.first[:name], prefix: 'shop', ng: { cloak: true } }
|
||||
#shop-tabs{ ng: { controller: "PageSelectionCtrl", init: "whitelistPages(#{shop_tab_names.to_json})", cloak: true } }
|
||||
.tab-buttons
|
||||
.row
|
||||
- shop_tabs.each do |tab|
|
||||
.tab{ id: "tab_#{tab[:name]}", name: tab[:name] }
|
||||
%a{ href: 'javascript:void(0)' }=tab[:title]
|
||||
.columns.small-12.large-8
|
||||
- shop_tabs.each do |tab|
|
||||
.page{ "ng-class" => "{ selected: selectedPage() == '#{tab[:name]}' }" }
|
||||
%a{ href: "##{tab[:name]}" }=tab[:title]
|
||||
|
||||
.tab-view
|
||||
.page-view{ ng: {include: "'shop/' + selectedPage() + '.html'" } }
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
%div.center
|
||||
.header
|
||||
= t :shopping_contact_address
|
||||
%strong=current_distributor.name
|
||||
%span= current_distributor.name
|
||||
%p
|
||||
= current_distributor.address.address1
|
||||
- unless current_distributor.address.address2.blank?
|
||||
@@ -44,22 +44,19 @@
|
||||
- if current_distributor.twitter.present?
|
||||
%span
|
||||
%a{href: "http://twitter.com/#{current_distributor.twitter}", target: "_blank" }
|
||||
%i.ofn-i_041-twitter
|
||||
%i.twitter.ofn-i_041-twitter
|
||||
|
||||
- if current_distributor.facebook.present?
|
||||
%span
|
||||
%a{href: "http://#{current_distributor.facebook}", target: "_blank" }
|
||||
%i.ofn-i_044-facebook
|
||||
/ = current_distributor.facebook
|
||||
%i.facebook.ofn-i_044-facebook
|
||||
|
||||
- if current_distributor.linkedin.present?
|
||||
%span
|
||||
%a{href: "http://#{current_distributor.linkedin}", target: "_blank" }
|
||||
%i.ofn-i_042-linkedin
|
||||
/ = current_distributor.linkedin
|
||||
%i.linkedin.ofn-i_042-linkedin
|
||||
|
||||
- if current_distributor.instagram.present?
|
||||
%span
|
||||
%a{href: "http://instagram.com/#{current_distributor.instagram}", target: "_blank" }
|
||||
%i.ofn-i_043-instagram
|
||||
/ = current_distributor.instagram
|
||||
%i.instagram.ofn-i_043-instagram
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
%script{ type: "text/ng-template", id: "shop/groups.html" }
|
||||
.content
|
||||
.row
|
||||
.small-12.large-4.columns
|
||||
.small-12.columns
|
||||
- if current_distributor.groups.length > 0
|
||||
%h5
|
||||
=current_distributor.name
|
||||
= t :shopping_groups_part_of
|
||||
%ul.bullet-list
|
||||
%ul.bullet-list.small-block-grid-1.medium-block-grid-2.large-block-grid-3
|
||||
- for group in current_distributor.groups
|
||||
%li
|
||||
%a{href: main_app.groups_path + "/#{group.permalink}"}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
%script{ type: "text/ng-template", id: "shop/home.html" }
|
||||
.order-cycle-bar.hide-for-large-up
|
||||
= render partial: "shopping_shared/order_cycles"
|
||||
|
||||
.content
|
||||
= render partial: 'shop/messages'
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
.small-12.columns
|
||||
%h5
|
||||
= t :shopping_producers_of_hub, hub: '{{ shopfront.name }}'
|
||||
%ul.small-block-grid-2.large-block-grid-4
|
||||
%ul.small-block-grid-1.medium-block-grid-2.large-block-grid-3
|
||||
%li{"ng-repeat" => "enterprise in shopfront.producers"}
|
||||
%enterprise-modal
|
||||
%i.ofn-i_036-producers
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
%script{ type: "text/ng-template", id: "shop/shop.html" }
|
||||
.order-cycle-bar.hide-for-large-up
|
||||
= render partial: "shopping_shared/order_cycles"
|
||||
|
||||
.row
|
||||
.small-12.columns
|
||||
- if no_open_order_cycles?
|
||||
@@ -8,10 +11,8 @@
|
||||
= t :shopping_oc_closed
|
||||
%small
|
||||
%em
|
||||
(
|
||||
= render partial: "shopping_shared/next_order_cycle"
|
||||
= render partial: "shopping_shared/last_order_cycle"
|
||||
)
|
||||
%p
|
||||
= t :shopping_oc_closed_description
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
%i.error.icon-remove-sign.with-tip{ng: {show: 'rowStatus[order.id] == "error"'}, 'ofn-with-tip' => t('.order_not_updated')}
|
||||
%a.icon_link.with-tip.icon-edit.no-text{'ng-href' => '{{order.edit_path}}', 'data-action' => 'edit', 'ofn-with-tip' => t('.edit')}
|
||||
%div{'ng-if' => 'order.ready_to_ship'}
|
||||
%button.icon-road.icon_link.with-tip.no-text{'ng-click' => 'shipOrder(order)', 'data-confirm' => t(:are_you_sure), rel: 'nofollow', 'ofn-with-tip' => t('.ship')}
|
||||
%button.icon-road.icon_link.with-tip.no-text{'ng-click' => 'shipOrder(order)', rel: 'nofollow', 'ofn-with-tip' => t('.ship')}
|
||||
%div{'ng-if' => 'order.ready_to_capture'}
|
||||
%button.icon-capture.icon_link.no-text{'ng-click' => 'capturePayment(order)', rel: 'nofollow', 'ofn-with-tip' => t('.capture')}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
%td{ :align => "right" }
|
||||
%h4= @order.order_cycle.andand.name
|
||||
%tr{ valign: "top" }
|
||||
%td{ :align => "left" }
|
||||
%td{ align: "left", colspan: 3 }
|
||||
%strong= "#{t('.from')}: #{@order.distributor.name}"
|
||||
- if @order.distributor.abn.present?
|
||||
%br
|
||||
@@ -26,31 +26,43 @@
|
||||
= @order.distributor.address.full_address
|
||||
%br
|
||||
= @order.distributor.contact.email
|
||||
%td{width: "10%" }
|
||||
%tr{ valign: "top" }
|
||||
%td{ colspan: 3 }
|
||||
|
||||
%td{ :align => "right" }
|
||||
%strong= "#{t('.to')}: #{@order.ship_address.full_name}"
|
||||
%tr{ valign: "top" }
|
||||
%td{ align: "left" }
|
||||
%strong= "#{t('.to')}:"
|
||||
%br
|
||||
= @order.bill_address.full_name
|
||||
- if @order.andand.customer.andand.code.present?
|
||||
%br
|
||||
= "#{t('.code')}: #{@order.customer.code}"
|
||||
%br
|
||||
= @order.ship_address.full_address
|
||||
= @order.bill_address.full_address
|
||||
%br
|
||||
- if @order.andand.customer.andand.email.present?
|
||||
= "#{@order.customer.email},"
|
||||
= "#{@order.bill_address.phone}"
|
||||
%td
|
||||
|
||||
%td{ align: "left", style: "border-left: .1em solid black; padding-left: 1em" }
|
||||
%strong= "#{t('.shipping')}: #{@order.shipping_method&.name}"
|
||||
- if @order.shipping_method&.require_ship_address
|
||||
%br
|
||||
= @order.ship_address.full_name
|
||||
%br
|
||||
= @order.ship_address.full_address
|
||||
%br
|
||||
= @order.ship_address.phone
|
||||
- if @order.special_instructions.present?
|
||||
%br
|
||||
%br
|
||||
%strong= t :customer_instructions
|
||||
= @order.special_instructions
|
||||
|
||||
|
||||
= render 'spree/admin/orders/invoice_table'
|
||||
|
||||
- if @order.special_instructions.present?
|
||||
%p.callout
|
||||
%strong
|
||||
= t :customer_instructions
|
||||
%p
|
||||
%em= @order.special_instructions
|
||||
%p
|
||||
|
||||
|
||||
- if @order.distributor.invoice_text.present?
|
||||
%p
|
||||
= @order.distributor.invoice_text
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
$("#new_property").html('<%= escape_javascript(render :template => "spree/admin/properties/new", :formats => [:html], :handlers => [:erb]) %>');
|
||||
$("#new_property").html('<%= escape_javascript(render :template => "spree/admin/properties/new", :formats => [:html], :handlers => [:haml]) %>');
|
||||
$("#new_property_link").parent().hide();
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
%link{:href => "//fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600&subset=latin,cyrillic,greek,vietnamese", :rel => "stylesheet", :type => "text/css"}
|
||||
|
||||
= stylesheet_link_tag 'admin/all'
|
||||
= render "layouts/bugsnag_js"
|
||||
= javascript_include_tag 'admin/all'
|
||||
|
||||
= render "spree/admin/shared/translations"
|
||||
|
||||
@@ -49,6 +49,6 @@
|
||||
- content_for :page_actions do
|
||||
%ul.inline-menu
|
||||
%li#new_var_link
|
||||
= link_to_with_icon('icon-plus', t('.new_variant'), new_admin_product_variant_url(@product), remote: true, 'data-update' => 'new_variant', class: 'button')
|
||||
= link_to_with_icon('icon-plus', t('.new_variant'), new_admin_product_variant_url(@product), class: 'button')
|
||||
|
||||
%li= link_to_with_icon('icon-filter', @deleted.blank? ? t('.show_deleted') : t('.show_active'), admin_product_variants_url(@product, deleted: @deleted.blank? ? "on" : "off"), class: 'button')
|
||||
|
||||
@@ -16,13 +16,20 @@
|
||||
- else
|
||||
= @order.distributor.next_collection_at
|
||||
|
||||
- content_for :ordercycle_sidebar do
|
||||
.show-for-large-up.large-4.columns
|
||||
= render partial: "shopping_shared/order_cycles"
|
||||
|
||||
= render partial: "shopping_shared/header"
|
||||
|
||||
.sub-header.show-for-medium-down
|
||||
= render partial: "shopping_shared/order_cycles"
|
||||
|
||||
%fieldset.footer-pad
|
||||
- if @order.line_items.empty?
|
||||
%div.row{"data-hook" => "empty_cart"}
|
||||
%p= t(:your_cart_is_empty)
|
||||
%p= link_to t(:continue_shopping), main_app.shop_path, :class => 'button continue'
|
||||
%p= link_to t(:continue_shopping), current_shop_products_path, :class => 'button continue'
|
||||
|
||||
- else
|
||||
%div{"data-hook" => "outside_cart_form"}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.row.links{'data-hook' => "cart_buttons"}
|
||||
.columns.large-8{"data-hook" => ""}
|
||||
%a.button.large.secondary{href: main_app.shop_path}
|
||||
%a.button.large.secondary{href: current_shop_products_path}
|
||||
%i.ofn-i_008-caret-left
|
||||
= t :orders_edit_continue
|
||||
.columns.large-4.text-right
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
.row
|
||||
.columns.small-12.medium-3
|
||||
- if current_order.andand.distributor == @order.distributor
|
||||
- if current_order.line_items.present?
|
||||
- if current_order.nil? || current_order.distributor.nil? || current_order.distributor == @order.distributor
|
||||
- if current_order&.line_items.present?
|
||||
= link_to main_app.cart_path, :class => "button expand" do
|
||||
%i.ofn-i_008-caret-left
|
||||
= t(:order_back_to_cart)
|
||||
- else
|
||||
= link_to main_app.shop_path, :class => "button expand" do
|
||||
= link_to "#{main_app.enterprise_shop_path(@order.distributor)}#/shop", class: "button expand" do
|
||||
%i.ofn-i_008-caret-left
|
||||
= t(:order_back_to_store)
|
||||
- else
|
||||
|
||||
@@ -37,6 +37,9 @@ SMTP_PASSWORD: 'f00d'
|
||||
# MAILS_FROM: hello@example.com
|
||||
# MAIL_BCC: manager@example.com
|
||||
|
||||
# Javascript error reporting via Bugsnag.
|
||||
#BUGSNAG_JS_KEY: ""
|
||||
|
||||
# SingleSignOn login for Discourse
|
||||
#
|
||||
# DISCOURSE_SSO_SECRET should be a random string. It must be the same as provided to your Discourse instance.
|
||||
|
||||
@@ -33,11 +33,12 @@ Openfoodnetwork::Application.configure do
|
||||
# Use https in email links
|
||||
config.action_mailer.default_url_options = { protocol: 'https' }
|
||||
|
||||
# See everything in the log (default is :info)
|
||||
# Note: This config no longer works with our new logging strategy
|
||||
# config.log_level = :debug
|
||||
|
||||
# Configure logging for Rails 3.2:
|
||||
config.logger = ActiveSupport::TaggedLogging.new(Logger.new(Rails.root.join("log", "#{Rails.env}.log")))
|
||||
config.logger.level = Logger::INFO
|
||||
config.logger.formatter = Logger::Formatter.new
|
||||
config.logger.datetime_format = "%Y-%m-%d %H:%M:%S"
|
||||
# Once we get to Rails 4.0, we can replace the above with:
|
||||
|
||||
@@ -33,11 +33,12 @@ Openfoodnetwork::Application.configure do
|
||||
# Use https in email links
|
||||
config.action_mailer.default_url_options = { protocol: 'https' }
|
||||
|
||||
# See everything in the log (default is :info)
|
||||
# Note: This config no longer works with our new logging strategy
|
||||
# config.log_level = :debug
|
||||
|
||||
# Configure logging for Rails 3.2:
|
||||
config.logger = ActiveSupport::TaggedLogging.new(Logger.new(Rails.root.join("log", "#{Rails.env}.log")))
|
||||
config.logger.level = Logger::INFO
|
||||
config.logger.formatter = Logger::Formatter.new
|
||||
config.logger.datetime_format = "%Y-%m-%d %H:%M:%S"
|
||||
# Once we get to Rails 4.0, we can replace the above with:
|
||||
|
||||
@@ -245,7 +245,9 @@ ar:
|
||||
allow_cookies: "السماح لملفات تعريف الارتباط"
|
||||
notes: ملاحظات
|
||||
error: خطأ
|
||||
processing_payment: معالجة الدفع...
|
||||
processing_payment: "معالجة الدفع..."
|
||||
no_pending_payments: "لا توجد دفعات معلقة"
|
||||
invalid_payment_state: "حالة الدفع غير صالحة"
|
||||
filter_results: تصفية النتائج
|
||||
quantity: الكمية
|
||||
pick_up: النقل
|
||||
@@ -1483,6 +1485,7 @@ ar:
|
||||
shopping_oc_closed_description: "يرجى الانتظار حتى تفتح الدورة التالية (أو اتصل بنا مباشرة لمعرفة ما إذا كان يمكننا قبول أي طلبات متأخرة)"
|
||||
shopping_oc_last_closed: "آخر دورة تم إغلاق %{distance_of_time} منذ"
|
||||
shopping_oc_next_open: "تفتح الدورة التالية في %{distance_of_time}"
|
||||
shopping_oc_select: "اختيار..."
|
||||
shopping_tabs_home: "الصفحة الرئيسية"
|
||||
shopping_tabs_shop: "المتجر"
|
||||
shopping_tabs_about: "حول"
|
||||
@@ -1864,7 +1867,7 @@ ar:
|
||||
headline: "تم الانتهاء !"
|
||||
thanks: "شكرًا لملء تفاصيل %{enterprise}."
|
||||
login: "يمكنك تغيير أو تحديث شركتك في أي مرحلة من خلال تسجيل الدخول إلى شبكة الغذاء المفتوح والذهاب إلى المسؤول."
|
||||
action: "بيت شبكة الغذاء المفتوح"
|
||||
action: "انتقل إلى واجهة الشركة"
|
||||
back: "عودة"
|
||||
continue: "استمر"
|
||||
action_or: "أو"
|
||||
@@ -2279,6 +2282,7 @@ ar:
|
||||
enterprise_register_success_notice: "تهانينا! اكتمل التسجيل لـ %{enterprise}!"
|
||||
enterprise_bulk_update_success_notice: "تم تحديث المؤسسات بنجاح"
|
||||
enterprise_bulk_update_error: 'فشل التحديث'
|
||||
enterprise_shop_show_error: "المتجر الذي تبحث عنه غير موجود أو غير نشط . يرجى التحقق من المحلات التجارية الأخرى."
|
||||
order_cycles_create_notice: 'تم إنشاء دورة الطلب الخاصة بك.'
|
||||
order_cycles_update_notice: 'تم تحديث دورة الطلب.'
|
||||
order_cycles_bulk_update_notice: 'تم تحديث دورات الطلب.'
|
||||
@@ -2604,6 +2608,34 @@ ar:
|
||||
few: "حزم"
|
||||
many: "حزم"
|
||||
other: "حزم"
|
||||
bottle:
|
||||
zero: "زجاجات"
|
||||
one: "زجاجة"
|
||||
two: "زجاجات"
|
||||
few: "زجاجات"
|
||||
many: "زجاجات"
|
||||
other: "زجاجات"
|
||||
item:
|
||||
zero: "العناصر"
|
||||
one: "بند"
|
||||
two: "العناصر"
|
||||
few: "العناصر"
|
||||
many: "العناصر"
|
||||
other: "المواد"
|
||||
dozen:
|
||||
zero: "العشرات"
|
||||
one: "دزينة"
|
||||
two: "العشرات"
|
||||
few: "العشرات"
|
||||
many: "العشرات"
|
||||
other: "العشرات"
|
||||
unit:
|
||||
zero: "الوحدات"
|
||||
one: "وحدة"
|
||||
two: "الوحدات"
|
||||
few: "الوحدات"
|
||||
many: "الوحدات"
|
||||
other: "الوحدات"
|
||||
producers:
|
||||
signup:
|
||||
start_free_profile: "ابدأ بملف تعريف مجاني ، وتوسع عندما تكون جاهزًا!"
|
||||
@@ -2957,7 +2989,8 @@ ar:
|
||||
tax_invoice: "فاتورة ضريبية"
|
||||
code: "الشفرة"
|
||||
from: "من "
|
||||
to: "إلى"
|
||||
to: "فاتورة الى"
|
||||
shipping: "الشحن"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "توزيع"
|
||||
|
||||
@@ -245,7 +245,7 @@ ca:
|
||||
allow_cookies: "Permet les galetes"
|
||||
notes: Notes
|
||||
error: Error
|
||||
processing_payment: S'està processant el pagament...
|
||||
processing_payment: "S'està processant el pagament..."
|
||||
filter_results: Aplicar filtre
|
||||
quantity: Quantitat
|
||||
pick_up: Recollida
|
||||
@@ -1425,7 +1425,7 @@ ca:
|
||||
email_confirm_customer_greeting: "Hola %{name},"
|
||||
email_confirm_customer_intro_html: "Gràcies per comprar a <strong> %{distributor}</strong>."
|
||||
email_confirm_customer_number_html: "Confirmació de la comanda <strong> # %{number} </strong>"
|
||||
email_confirm_customer_details_html: "Aquests són els detalls de la teva comanda de <strong> %{distributor} </ strong>:"
|
||||
email_confirm_customer_details_html: "Aquests són els detalls de la teva comanda de<strong>%{distributor}</strong>:"
|
||||
email_confirm_customer_signoff: "Salutacions cordials,"
|
||||
email_confirm_shop_greeting: "Hola %{name},"
|
||||
email_confirm_shop_order_html: "Que bé! Tens una nova comanda per <strong> %{distributor} </ strong>."
|
||||
@@ -1860,7 +1860,6 @@ ca:
|
||||
headline: "Acabat!"
|
||||
thanks: "Gràcies per omplir els detalls de%{enterprise}."
|
||||
login: "Pots canviar o actualitzar la teva organització en qualsevol moment accedint a Katuma i anant a Admin."
|
||||
action: "Inici"
|
||||
back: "Enrere"
|
||||
continue: "Continua"
|
||||
action_or: "O"
|
||||
@@ -3016,7 +3015,6 @@ ca:
|
||||
tax_invoice: "FACTURA D'IMPOSTOS"
|
||||
code: "Codi"
|
||||
from: "De"
|
||||
to: "Per a"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribució"
|
||||
|
||||
@@ -243,7 +243,7 @@ de_DE:
|
||||
allow_cookies: "Cookies erlauben"
|
||||
notes: Anmerkungen
|
||||
error: Fehler
|
||||
processing_payment: Bezahlung wird verarbeitet...
|
||||
processing_payment: "Bezahlung wird verarbeitet..."
|
||||
filter_results: Ergebnisse filtern
|
||||
quantity: Menge
|
||||
pick_up: Abholen
|
||||
@@ -1848,7 +1848,6 @@ de_DE:
|
||||
headline: "Fertig!"
|
||||
thanks: "Vielen Dank, dass Sie die Details für %{enterprise} ausgefüllt haben."
|
||||
login: "Sie können Ihr Unternehmen jederzeit ändern oder aktualisieren, indem Sie sich bei Open Food Network anmelden und zum Administrator wechseln."
|
||||
action: "Open Food Network nach Hause"
|
||||
back: "Zurück"
|
||||
continue: "Fortsetzen"
|
||||
action_or: "ODER"
|
||||
@@ -2928,7 +2927,6 @@ de_DE:
|
||||
tax_invoice: "Steuerrechnung"
|
||||
code: "Code"
|
||||
from: "Von"
|
||||
to: "Zu"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Verteilung"
|
||||
|
||||
@@ -275,7 +275,9 @@ en:
|
||||
none: None
|
||||
notes: Notes
|
||||
error: Error
|
||||
processing_payment: Processing payment...
|
||||
processing_payment: "Processing payment..."
|
||||
no_pending_payments: "No pending payments"
|
||||
invalid_payment_state: "Invalid payment state"
|
||||
filter_results: Filter Results
|
||||
quantity: Quantity
|
||||
pick_up: Pick up
|
||||
@@ -1590,6 +1592,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
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"
|
||||
shopping_oc_next_open: "The next cycle opens in %{distance_of_time}"
|
||||
shopping_oc_select: "Select..."
|
||||
shopping_tabs_home: "Home"
|
||||
shopping_tabs_shop: "Shop"
|
||||
shopping_tabs_about: "About"
|
||||
@@ -1987,7 +1990,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
headline: "Finished!"
|
||||
thanks: "Thanks for filling out the details for %{enterprise}."
|
||||
login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin."
|
||||
action: "Open Food Network home"
|
||||
action: "Go to Enterprise Dashboard"
|
||||
|
||||
back: "Back"
|
||||
continue: "Continue"
|
||||
@@ -3186,7 +3189,8 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
tax_invoice: "TAX INVOICE"
|
||||
code: "Code"
|
||||
from: "From"
|
||||
to: "To"
|
||||
to: "Bill to"
|
||||
shipping: "Shipping"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribution"
|
||||
|
||||
@@ -243,7 +243,7 @@ en_AU:
|
||||
allow_cookies: "Allow Cookies"
|
||||
notes: Notes
|
||||
error: Error
|
||||
processing_payment: Processing payment...
|
||||
processing_payment: "Processing payment..."
|
||||
filter_results: Filter Results
|
||||
quantity: Quantity
|
||||
pick_up: Pick up
|
||||
@@ -698,7 +698,7 @@ en_AU:
|
||||
enable_subscriptions_tip: "Enable subscriptions functionality?"
|
||||
enable_subscriptions_false: "Disabled"
|
||||
enable_subscriptions_true: "Enabled"
|
||||
shopfront_message: "Shopfront Message"
|
||||
shopfront_message: "\"Home\" message"
|
||||
shopfront_message_link_tooltip: "Insert / edit link"
|
||||
shopfront_message_link_prompt: "Please enter a URL to insert"
|
||||
shopfront_closed_message: "Shopfront Closed Message"
|
||||
@@ -1854,7 +1854,6 @@ en_AU:
|
||||
headline: "You’re all set up! "
|
||||
thanks: "Thanks for filling out the details for %{enterprise}."
|
||||
login: "To manage your new Enterprise, go to openfoodnetwork.org.au/admin\n\nYou can also get to your Admin page in the top righthand corner of the Open Food Network homepage, just to the left of the shopping cart symbol."
|
||||
action: "Open Food Network home"
|
||||
back: "Back"
|
||||
continue: "Continue"
|
||||
action_or: "OR"
|
||||
@@ -2928,7 +2927,6 @@ en_AU:
|
||||
tax_invoice: "TAX INVOICE"
|
||||
code: "Code"
|
||||
from: "From"
|
||||
to: "To"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribution"
|
||||
|
||||
@@ -240,7 +240,7 @@ en_BE:
|
||||
allow_cookies: "Allow Cookies"
|
||||
notes: Notes
|
||||
error: Error
|
||||
processing_payment: Processing payment...
|
||||
processing_payment: "Processing payment..."
|
||||
filter_results: Filter Results
|
||||
quantity: Quantity
|
||||
pick_up: Pick up
|
||||
@@ -1822,7 +1822,6 @@ en_BE:
|
||||
headline: "Finished!"
|
||||
thanks: "Thanks for filling out the details for %{enterprise}."
|
||||
login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin."
|
||||
action: "Open Food Network home"
|
||||
back: "Back"
|
||||
continue: "Continue"
|
||||
action_or: "OR"
|
||||
@@ -2857,7 +2856,6 @@ en_BE:
|
||||
tax_invoice: "TAX INVOICE"
|
||||
code: "Code"
|
||||
from: "From"
|
||||
to: "To"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribution"
|
||||
|
||||
@@ -245,7 +245,9 @@ en_CA:
|
||||
allow_cookies: "Allow Cookies"
|
||||
notes: Notes
|
||||
error: Error
|
||||
processing_payment: Processing payment...
|
||||
processing_payment: "Processing payment..."
|
||||
no_pending_payments: "No pending payments"
|
||||
invalid_payment_state: "Invalid payment state"
|
||||
filter_results: Filter Results
|
||||
quantity: Quantity
|
||||
pick_up: Pick up
|
||||
@@ -869,10 +871,10 @@ en_CA:
|
||||
incoming: "2. Incoming Products"
|
||||
outgoing: "3. Outgoing Products"
|
||||
exchange_form:
|
||||
pickup_time_tip: When orders from this OC will be ready for the customer
|
||||
pickup_time_tip: 'This phrase will help buyers select their shop from multiple shops. It will be preceded by the phrase "Orders for". So enter a pick-up date, or buyer group... '
|
||||
pickup_instructions_placeholder: "Pick-up instructions"
|
||||
pickup_instructions_tip: These instructions are shown to customers after they complete an order
|
||||
pickup_time_placeholder: "Ready for (ie. Date/Time)"
|
||||
pickup_time_placeholder: "Order for (ie. Date, or buyer group...)"
|
||||
receival_instructions_placeholder: "Receival instructions"
|
||||
add_fee: 'Add fee'
|
||||
remove: 'Remove'
|
||||
@@ -919,7 +921,7 @@ en_CA:
|
||||
distributors: distributors
|
||||
variants: variants
|
||||
simple_form:
|
||||
ready_for: Options
|
||||
ready_for: Order for
|
||||
ready_for_placeholder: Date / time
|
||||
customer_instructions: Customer instructions
|
||||
customer_instructions_placeholder: 'Notes:'
|
||||
@@ -1360,7 +1362,7 @@ en_CA:
|
||||
stats_orders: "orders"
|
||||
checkout_title: Checkout
|
||||
checkout_now: Checkout now
|
||||
checkout_order_ready: Order ready for
|
||||
checkout_order_ready: Order for
|
||||
checkout_hide: Hide
|
||||
checkout_expand: Expand
|
||||
checkout_headline: "Ok, ready to checkout?"
|
||||
@@ -1372,7 +1374,7 @@ en_CA:
|
||||
checkout_default_ship_address: "Save as default shipping address"
|
||||
checkout_method_free: Free
|
||||
checkout_address_same: Shipping address same as billing address?
|
||||
checkout_ready_for: "Ready for:"
|
||||
checkout_ready_for: "Order for: "
|
||||
checkout_instructions: "Any comments or special instructions?"
|
||||
checkout_payment: Payment
|
||||
checkout_send: Place order now
|
||||
@@ -1391,7 +1393,7 @@ en_CA:
|
||||
order_delivery_address: Delivery address
|
||||
order_delivery_time: Delivery time
|
||||
order_special_instructions: "Your notes:"
|
||||
order_pickup_time: Ready for collection
|
||||
order_pickup_time: 'Order for:'
|
||||
order_pickup_instructions: Collection Instructions
|
||||
order_produce: Subtotal
|
||||
order_total_price: Total
|
||||
@@ -1460,7 +1462,7 @@ en_CA:
|
||||
email_shipping_delivery_time: "Delivery on:"
|
||||
email_shipping_delivery_address: "Delivery address:"
|
||||
email_shipping_collection_details: Collection details
|
||||
email_shipping_collection_time: "Ready for collection:"
|
||||
email_shipping_collection_time: "Order for:"
|
||||
email_shipping_collection_instructions: "Collection instructions:"
|
||||
email_special_instructions: "Your notes:"
|
||||
email_signup_greeting: Hello!
|
||||
@@ -1484,6 +1486,7 @@ en_CA:
|
||||
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"
|
||||
shopping_oc_next_open: "The next cycle opens in %{distance_of_time}"
|
||||
shopping_oc_select: "Select"
|
||||
shopping_tabs_home: "Home"
|
||||
shopping_tabs_shop: "Shop"
|
||||
shopping_tabs_about: "About"
|
||||
@@ -1494,7 +1497,7 @@ en_CA:
|
||||
shopping_groups_part_of: "is part of:"
|
||||
shopping_producers_of_hub: "%{hub}'s producers:"
|
||||
enterprises_next_closing: "Next order closing"
|
||||
enterprises_ready_for: "Ready for"
|
||||
enterprises_ready_for: "Order for"
|
||||
enterprises_choose: "Choose from the dropdown:"
|
||||
maps_open: "Open"
|
||||
maps_closed: "Closed"
|
||||
@@ -1645,7 +1648,7 @@ en_CA:
|
||||
orders_fees: Fees...
|
||||
orders_edit_title: Shopping Cart
|
||||
orders_edit_headline: Your shopping cart
|
||||
orders_edit_time: Order ready for
|
||||
orders_edit_time: Order for
|
||||
orders_edit_continue: Continue shopping
|
||||
orders_edit_checkout: Checkout
|
||||
orders_form_empty_cart: "Empty cart"
|
||||
@@ -1857,7 +1860,7 @@ en_CA:
|
||||
headline: "Finished!"
|
||||
thanks: "Thanks for filling out the details for %{enterprise}."
|
||||
login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin."
|
||||
action: "Open Food Network home"
|
||||
action: "Go to Enterprise Dashboard"
|
||||
back: "Back"
|
||||
continue: "Continue"
|
||||
action_or: "OR"
|
||||
@@ -2274,6 +2277,7 @@ en_CA:
|
||||
enterprise_register_success_notice: "Congratulations! Registration for %{enterprise} is complete!"
|
||||
enterprise_bulk_update_success_notice: "Enterprises updated successfully"
|
||||
enterprise_bulk_update_error: 'Update failed'
|
||||
enterprise_shop_show_error: "The shop you are looking for doesn't exist or is inactive on OFN. Please check other shops."
|
||||
order_cycles_create_notice: 'Your order cycle has been created.'
|
||||
order_cycles_update_notice: 'Your order cycle has been updated.'
|
||||
order_cycles_bulk_update_notice: 'Order cycles have been updated.'
|
||||
@@ -3014,7 +3018,8 @@ en_CA:
|
||||
tax_invoice: "Order Number"
|
||||
code: "Code"
|
||||
from: "From"
|
||||
to: "To"
|
||||
to: "Bill to"
|
||||
shipping: "Shipping"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribution"
|
||||
|
||||
@@ -243,7 +243,7 @@ en_DE:
|
||||
allow_cookies: "Allow Cookies"
|
||||
notes: Notes
|
||||
error: Error
|
||||
processing_payment: Processing payment...
|
||||
processing_payment: "Processing payment..."
|
||||
filter_results: Filter Results
|
||||
quantity: Quantity
|
||||
pick_up: Pick up
|
||||
@@ -1832,7 +1832,6 @@ en_DE:
|
||||
headline: "Finished!"
|
||||
thanks: "Thanks for filling out the details for %{enterprise}."
|
||||
login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin."
|
||||
action: "Open Food Network home"
|
||||
back: "Back"
|
||||
continue: "Continue"
|
||||
action_or: "OR"
|
||||
@@ -2873,7 +2872,6 @@ en_DE:
|
||||
tax_invoice: "TAX INVOICE"
|
||||
code: "Code"
|
||||
from: "From"
|
||||
to: "To"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribution"
|
||||
|
||||
@@ -245,7 +245,9 @@ en_FR:
|
||||
allow_cookies: "Allow Cookies"
|
||||
notes: Notes
|
||||
error: Error
|
||||
processing_payment: Processing payment...
|
||||
processing_payment: "Processing payment..."
|
||||
no_pending_payments: "No pending payments"
|
||||
invalid_payment_state: "Invalid payment state"
|
||||
filter_results: Filter Results
|
||||
quantity: Quantity
|
||||
pick_up: Pick up
|
||||
@@ -1484,6 +1486,7 @@ en_FR:
|
||||
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"
|
||||
shopping_oc_next_open: "The next cycle opens in %{distance_of_time}"
|
||||
shopping_oc_select: "Select..."
|
||||
shopping_tabs_home: "Home"
|
||||
shopping_tabs_shop: "Shop"
|
||||
shopping_tabs_about: "About"
|
||||
@@ -1857,7 +1860,7 @@ en_FR:
|
||||
headline: "Finished!"
|
||||
thanks: "Thanks for filling out the details for %{enterprise}."
|
||||
login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin."
|
||||
action: "Open Food Network home"
|
||||
action: "Go to Enterprise Dashboard"
|
||||
back: "Back"
|
||||
continue: "Continue"
|
||||
action_or: "OR"
|
||||
@@ -3016,7 +3019,6 @@ en_FR:
|
||||
tax_invoice: "TAX INVOICE"
|
||||
code: "Code"
|
||||
from: "From"
|
||||
to: "To"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribution"
|
||||
|
||||
@@ -245,7 +245,9 @@ en_GB:
|
||||
allow_cookies: "Allow Cookies"
|
||||
notes: Notes
|
||||
error: Error
|
||||
processing_payment: Processing payment...
|
||||
processing_payment: "Processing payment..."
|
||||
no_pending_payments: "No pending payments"
|
||||
invalid_payment_state: "Invalid payment state"
|
||||
filter_results: Filter Results
|
||||
quantity: Quantity
|
||||
pick_up: Pick up
|
||||
@@ -1484,6 +1486,7 @@ en_GB:
|
||||
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"
|
||||
shopping_oc_next_open: "The next cycle opens in %{distance_of_time}"
|
||||
shopping_oc_select: "Select..."
|
||||
shopping_tabs_home: "Notices"
|
||||
shopping_tabs_shop: "Shop"
|
||||
shopping_tabs_about: "About"
|
||||
@@ -1857,7 +1860,7 @@ en_GB:
|
||||
headline: "Finished!"
|
||||
thanks: "Thanks for filling out the details for %{enterprise}."
|
||||
login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin."
|
||||
action: "Open Food Network home"
|
||||
action: "Go to Enterprise Dashboard"
|
||||
back: "Back"
|
||||
continue: "Continue"
|
||||
action_or: "OR"
|
||||
@@ -2274,6 +2277,7 @@ en_GB:
|
||||
enterprise_register_success_notice: "Congratulations! Registration for %{enterprise} is complete!"
|
||||
enterprise_bulk_update_success_notice: "Enterprises updated successfully"
|
||||
enterprise_bulk_update_error: 'Update failed'
|
||||
enterprise_shop_show_error: "The shop you are looking for doesn't exist or is inactive on OFN. Please check other shops."
|
||||
order_cycles_create_notice: 'Your order cycle has been created.'
|
||||
order_cycles_update_notice: 'Your order cycle has been updated.'
|
||||
order_cycles_bulk_update_notice: 'Order cycles have been updated.'
|
||||
@@ -3021,7 +3025,6 @@ en_GB:
|
||||
tax_invoice: "TAX INVOICE"
|
||||
code: "Code"
|
||||
from: "From"
|
||||
to: "To"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribution"
|
||||
|
||||
@@ -245,7 +245,9 @@ en_NZ:
|
||||
allow_cookies: "Allow Cookies"
|
||||
notes: Notes
|
||||
error: Error
|
||||
processing_payment: Processing payment...
|
||||
processing_payment: "Processing payment..."
|
||||
no_pending_payments: "No pending payments"
|
||||
invalid_payment_state: "Invalid payment state"
|
||||
filter_results: Filter Results
|
||||
quantity: Quantity
|
||||
pick_up: Pick up
|
||||
@@ -1484,6 +1486,7 @@ en_NZ:
|
||||
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"
|
||||
shopping_oc_next_open: "The next cycle opens in %{distance_of_time}"
|
||||
shopping_oc_select: "Select..."
|
||||
shopping_tabs_home: "Home"
|
||||
shopping_tabs_shop: "Shop"
|
||||
shopping_tabs_about: "About"
|
||||
@@ -1857,7 +1860,7 @@ en_NZ:
|
||||
headline: "Finished!"
|
||||
thanks: "Thanks for filling out the details for %{enterprise}."
|
||||
login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin."
|
||||
action: "Open Food Network home"
|
||||
action: "Go to Enterprise Dashboard"
|
||||
back: "Back"
|
||||
continue: "Continue"
|
||||
action_or: "OR"
|
||||
@@ -2274,6 +2277,7 @@ en_NZ:
|
||||
enterprise_register_success_notice: "Congratulations! Registration for %{enterprise} is complete!"
|
||||
enterprise_bulk_update_success_notice: "Enterprises updated successfully"
|
||||
enterprise_bulk_update_error: 'Update failed'
|
||||
enterprise_shop_show_error: "The shop you are looking for doesn't exist or is inactive on OFN. Please check other shops."
|
||||
order_cycles_create_notice: 'Your order cycle has been created.'
|
||||
order_cycles_update_notice: 'Your order cycle has been updated.'
|
||||
order_cycles_bulk_update_notice: 'Order cycles have been updated.'
|
||||
@@ -3015,7 +3019,8 @@ en_NZ:
|
||||
tax_invoice: "TAX INVOICE"
|
||||
code: "Code"
|
||||
from: "From"
|
||||
to: "To"
|
||||
to: "Bill to"
|
||||
shipping: "Shipping"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribution"
|
||||
|
||||
@@ -50,6 +50,8 @@ en_US:
|
||||
shipping_method_ids: "Shipping Methods"
|
||||
payment_method_ids: "Payment Methods"
|
||||
errors:
|
||||
messages:
|
||||
inclusion: "is not included in the list"
|
||||
models:
|
||||
subscription_validator:
|
||||
attributes:
|
||||
@@ -116,7 +118,9 @@ en_US:
|
||||
email_welcome: "Welcome"
|
||||
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}"
|
||||
userguide: "Open Food Network User Guide"
|
||||
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."
|
||||
admin_panel: "Admin Panel"
|
||||
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}"
|
||||
join_community: "Join the community"
|
||||
invite_manager:
|
||||
@@ -241,7 +245,9 @@ en_US:
|
||||
allow_cookies: "Allow Cookies"
|
||||
notes: Notes
|
||||
error: Error
|
||||
processing_payment: Processing payment...
|
||||
processing_payment: "Processing payment..."
|
||||
no_pending_payments: "No pending payments"
|
||||
invalid_payment_state: "Invalid payment state"
|
||||
filter_results: Filter Results
|
||||
quantity: Quantity
|
||||
pick_up: Pick up
|
||||
@@ -434,9 +440,12 @@ en_US:
|
||||
infinity: "Infinity"
|
||||
to_order_tip: "Items made to order do not have a set stock level, such as loaves of bread made fresh to order."
|
||||
back_to_products_list: "Back to products list"
|
||||
editing_product: "Editing Product"
|
||||
tabs:
|
||||
product_details: "Product Details"
|
||||
group_buy_options: "Group Buy Options"
|
||||
images: "Images"
|
||||
variants: "Variants"
|
||||
product_properties: "Product Properties"
|
||||
product_import:
|
||||
title: Product Import
|
||||
@@ -539,6 +548,7 @@ en_US:
|
||||
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?
|
||||
default_stock: "Default stock"
|
||||
inherit?: Inherit?
|
||||
add: Add
|
||||
hide: Hide
|
||||
@@ -693,6 +703,10 @@ en_US:
|
||||
enable_subscriptions_false: "Disabled"
|
||||
enable_subscriptions_true: "Enabled"
|
||||
shopfront_message: "Shopfront Message"
|
||||
shopfront_message_placeholder: >
|
||||
An optional message to welcome customers and explain how to shop with
|
||||
you. If text is entered here it will be displayed in a home tab when
|
||||
customers first arrive at your shopfront.
|
||||
shopfront_message_link_tooltip: "Insert / edit link"
|
||||
shopfront_message_link_prompt: "Please enter a URL to insert"
|
||||
shopfront_closed_message: "Shopfront Closed Message"
|
||||
@@ -830,20 +844,32 @@ en_US:
|
||||
new:
|
||||
create: "Create"
|
||||
cancel: "Cancel"
|
||||
back_to_list: "Back To List"
|
||||
edit:
|
||||
advanced_settings: "Advanced Settings"
|
||||
save: "Save"
|
||||
save_and_next: "Save and Next"
|
||||
next: "Next"
|
||||
cancel: "Cancel"
|
||||
back_to_list: "Back To List"
|
||||
save_and_back_to_list: "Save and Back to List"
|
||||
choose_products_from: "Choose Products From:"
|
||||
incoming:
|
||||
save: "Save"
|
||||
save_and_next: "Save and Next"
|
||||
next: "Next"
|
||||
cancel: "Cancel"
|
||||
back_to_list: "Back To List"
|
||||
outgoing:
|
||||
previous: "Previous"
|
||||
save: "Save"
|
||||
save_and_back_to_list: "Save and Back to List"
|
||||
cancel: "Cancel"
|
||||
back_to_list: "Back To List"
|
||||
wizard_progress:
|
||||
edit: "1. General Settings"
|
||||
incoming: "2. Incoming Products"
|
||||
outgoing: "3. Outgoing Products"
|
||||
exchange_form:
|
||||
pickup_time_tip: When orders from this OC will be ready for the customer
|
||||
pickup_instructions_placeholder: "Pick-up instructions"
|
||||
@@ -1081,10 +1107,13 @@ en_US:
|
||||
destroy_attachment_does_not_exist: "Logo does not exist"
|
||||
enterprise_promo_image:
|
||||
destroy_attachment_does_not_exist: "Promo image does not exist"
|
||||
orders:
|
||||
failed_to_update: "Failed to update order"
|
||||
checkout:
|
||||
already_ordered:
|
||||
cart: "cart"
|
||||
message_html: "You have an order for this order cycle already. Check the %{cart} to see the items you ordered before. You can also cancel items as long as the order cycle is open."
|
||||
failed: "The checkout failed. Please let us know so that we can process your order."
|
||||
shops:
|
||||
hubs:
|
||||
show_closed_shops: "Show closed shops"
|
||||
@@ -1255,6 +1284,7 @@ en_US:
|
||||
saving_credit_card: Saving credit card...
|
||||
card_has_been_removed: "Your card has been removed (number: %{number})"
|
||||
card_could_not_be_removed: Sorry, the card could not be removed
|
||||
invalid_credit_card: "Invalid credit card"
|
||||
ie_warning_headline: "Your browser is out of date :-("
|
||||
ie_warning_text: "For the best Open Food Network experience, we strongly recommend upgrading your browser:"
|
||||
ie_warning_chrome: Download Chrome
|
||||
@@ -1456,6 +1486,7 @@ en_US:
|
||||
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"
|
||||
shopping_oc_next_open: "The next cycle opens in %{distance_of_time}"
|
||||
shopping_oc_select: "Select..."
|
||||
shopping_tabs_home: "Home"
|
||||
shopping_tabs_shop: "Shop"
|
||||
shopping_tabs_about: "About"
|
||||
@@ -1829,7 +1860,7 @@ en_US:
|
||||
headline: "Finished!"
|
||||
thanks: "Thanks for filling out the details for %{enterprise}."
|
||||
login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin."
|
||||
action: "Open Food Network home"
|
||||
action: "Go to Enterprise Dashboard"
|
||||
back: "Back"
|
||||
continue: "Continue"
|
||||
action_or: "OR"
|
||||
@@ -1915,6 +1946,7 @@ en_US:
|
||||
tax_category: "Tax Category"
|
||||
calculator: "Calculator"
|
||||
calculator_values: "Calculator values"
|
||||
calculator_settings_warning: "If you are changing the calculator type, you must save first before you can edit the calculator settings"
|
||||
flat_percent_per_item: "Flat Percent (per item)"
|
||||
flat_rate_per_item: "Flat Rate (per item)"
|
||||
flat_rate_per_order: "Flat Rate (per order)"
|
||||
@@ -2245,6 +2277,7 @@ en_US:
|
||||
enterprise_register_success_notice: "Congratulations! Registration for %{enterprise} is complete!"
|
||||
enterprise_bulk_update_success_notice: "Enterprises updated successfully"
|
||||
enterprise_bulk_update_error: 'Update failed'
|
||||
enterprise_shop_show_error: "The shop you are looking for doesn't exist or is inactive on OFN. Please check other shops."
|
||||
order_cycles_create_notice: 'Your order cycle has been created.'
|
||||
order_cycles_update_notice: 'Your order cycle has been updated.'
|
||||
order_cycles_bulk_update_notice: 'Order cycles have been updated.'
|
||||
@@ -2396,6 +2429,12 @@ en_US:
|
||||
severity: Severity
|
||||
description: Description
|
||||
resolve: Resolve
|
||||
exchange_products:
|
||||
load_more_variants: "Load More Variants"
|
||||
load_all_variants: "Load All Variants"
|
||||
select_all_variants: "Select All %{total_number_of_variants} Variants"
|
||||
variants_loaded: "%{num_of_variants_loaded} of %{total_number_of_variants} Variants Loaded"
|
||||
loading_variants: "Loading Variants"
|
||||
tag_rules:
|
||||
shipping_method_tagged_top: "Shipping methods tagged"
|
||||
shipping_method_tagged_bottom: "are:"
|
||||
@@ -2478,6 +2517,7 @@ en_US:
|
||||
customer_placeholder: "customer@example.org"
|
||||
valid_email_error: "Please enter a valid email address"
|
||||
subscriptions:
|
||||
error_saving: "Error saving subscription"
|
||||
new:
|
||||
please_select_a_shop: "Please select a shop"
|
||||
insufficient_stock: "Insufficient stock available, only %{on_hand} remaining"
|
||||
@@ -2553,6 +2593,76 @@ en_US:
|
||||
signup_or_login: "Start By signing up (or logging in)"
|
||||
have_an_account: "Already have an account?"
|
||||
action_login: "Log in now."
|
||||
inflections:
|
||||
each:
|
||||
one: "each"
|
||||
other: "each"
|
||||
bunch:
|
||||
one: "bunch"
|
||||
other: "bunches"
|
||||
pack:
|
||||
one: "pack"
|
||||
other: "packs"
|
||||
box:
|
||||
one: "box"
|
||||
other: "boxes"
|
||||
bottle:
|
||||
one: "bottle"
|
||||
other: "bottles"
|
||||
jar:
|
||||
one: "jar"
|
||||
other: "jars"
|
||||
head:
|
||||
one: "head"
|
||||
other: "heads"
|
||||
bag:
|
||||
one: "bag"
|
||||
other: "bags"
|
||||
loaf:
|
||||
one: "loaf"
|
||||
other: "loaves"
|
||||
single:
|
||||
one: "single"
|
||||
other: "singles"
|
||||
tub:
|
||||
one: "tub"
|
||||
other: "tubs"
|
||||
packet:
|
||||
one: "packet"
|
||||
other: "packets"
|
||||
item:
|
||||
one: "item"
|
||||
other: "items"
|
||||
dozen:
|
||||
one: "dozen"
|
||||
other: "dozens"
|
||||
unit:
|
||||
one: "unit"
|
||||
other: "units"
|
||||
serve:
|
||||
one: "serve"
|
||||
other: "serves"
|
||||
tray:
|
||||
one: "tray"
|
||||
other: "trays"
|
||||
piece:
|
||||
one: "piece"
|
||||
other: "pieces"
|
||||
pot:
|
||||
one: "pot"
|
||||
other: "pots"
|
||||
bundle:
|
||||
one: "bundle"
|
||||
other: "bundles"
|
||||
flask:
|
||||
one: "flask"
|
||||
other: "flasks"
|
||||
basket:
|
||||
one: "basket"
|
||||
other: "baskets"
|
||||
sack:
|
||||
one: "sack"
|
||||
other: "sacks"
|
||||
producers:
|
||||
signup:
|
||||
start_free_profile: "Start with a free profile, and expand when you're ready!"
|
||||
@@ -2870,7 +2980,6 @@ en_US:
|
||||
tax_invoice: "TAX INVOICE"
|
||||
code: "Code"
|
||||
from: "From"
|
||||
to: "To"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribution"
|
||||
|
||||
@@ -241,7 +241,7 @@ en_ZA:
|
||||
allow_cookies: "Allow Cookies"
|
||||
notes: Notes
|
||||
error: Error
|
||||
processing_payment: Processing payment...
|
||||
processing_payment: "Processing payment..."
|
||||
filter_results: Filter Results
|
||||
quantity: Quantity
|
||||
pick_up: Pick up
|
||||
@@ -1828,7 +1828,6 @@ en_ZA:
|
||||
headline: "Finished!"
|
||||
thanks: "Thanks for filling out the details for %{enterprise}."
|
||||
login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin."
|
||||
action: "Open Food Network home"
|
||||
back: "Back"
|
||||
continue: "Continue"
|
||||
action_or: "OR"
|
||||
@@ -2871,7 +2870,6 @@ en_ZA:
|
||||
tax_invoice: "TAX INVOICE"
|
||||
code: "Code"
|
||||
from: "From"
|
||||
to: "To"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribution"
|
||||
|
||||
@@ -243,7 +243,7 @@ es:
|
||||
allow_cookies: "Permitir cookies"
|
||||
notes: Notas
|
||||
error: Error
|
||||
processing_payment: Procesando el pago...
|
||||
processing_payment: "Procesando el pago..."
|
||||
filter_results: Filtrar resultados
|
||||
quantity: Cantidad
|
||||
pick_up: Recogida
|
||||
@@ -1833,7 +1833,6 @@ es:
|
||||
headline: "¡Terminado!"
|
||||
thanks: "Gracias por llenar los detalles de %{enterprise}."
|
||||
login: "Puede cambiar o actualizar su negocio en cualquier etapa iniciando sesión en Open Food Network y yendo a Admin."
|
||||
action: "Página de inicio de Open Food Network"
|
||||
back: "Atrás"
|
||||
continue: "Continuar"
|
||||
action_or: "Ó"
|
||||
@@ -2878,7 +2877,6 @@ es:
|
||||
tax_invoice: "FACTURA DE IMPUESTOS"
|
||||
code: "Código"
|
||||
from: "De"
|
||||
to: "A"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribución"
|
||||
|
||||
@@ -245,7 +245,9 @@ fr:
|
||||
allow_cookies: "Autoriser les cookies"
|
||||
notes: Commentaires
|
||||
error: Erreur
|
||||
processing_payment: Paiement en cours...
|
||||
processing_payment: "Paiement en cours..."
|
||||
no_pending_payments: "Aucun paiement en attente."
|
||||
invalid_payment_state: "Statut de paiement invalide"
|
||||
filter_results: Filtrer les résultats
|
||||
quantity: Quantité
|
||||
pick_up: Retrait
|
||||
@@ -1486,6 +1488,7 @@ fr:
|
||||
shopping_oc_closed_description: "Veuillez attendre l'ouverture du prochain cycle de vente (ou contactez-nous directement pour voir si nous pouvons accepter une commande tardive)"
|
||||
shopping_oc_last_closed: "Le dernier cycle de vente s'est terminé il y a %{distance_of_time}"
|
||||
shopping_oc_next_open: "Le prochain cycle de vente ouvrira dans %{distance_of_time}"
|
||||
shopping_oc_select: "Sélectionner"
|
||||
shopping_tabs_home: "Accueil"
|
||||
shopping_tabs_shop: "Boutique"
|
||||
shopping_tabs_about: "A propos"
|
||||
@@ -1495,7 +1498,7 @@ fr:
|
||||
shopping_contact_social: "Suivre"
|
||||
shopping_groups_part_of: "fait partie de:"
|
||||
shopping_producers_of_hub: "Les producteurs de %{hub}:"
|
||||
enterprises_next_closing: "Clôture des commandes pour ce cycle"
|
||||
enterprises_next_closing: "Clôture des commandes"
|
||||
enterprises_ready_for: "Prêt pour"
|
||||
enterprises_choose: "Choisissez votre option:"
|
||||
maps_open: "Ouvert"
|
||||
@@ -1859,7 +1862,7 @@ fr:
|
||||
headline: "C'est terminé!"
|
||||
thanks: "Merci d'avoir complété le profil de %{enterprise}"
|
||||
login: "Vous pouvez modifier ou mettre à jour les détails de votre entreprise à tout moment en vous connectant sur Open Food France, rubrique Admin."
|
||||
action: "Accueil Open Food France"
|
||||
action: "Aller vers le tableau de bord"
|
||||
back: "Retour"
|
||||
continue: "Suivant"
|
||||
action_or: "OU"
|
||||
@@ -3046,7 +3049,6 @@ fr:
|
||||
tax_invoice: "FACTURE"
|
||||
code: "Code"
|
||||
from: "De"
|
||||
to: "A"
|
||||
form:
|
||||
distribution_fields:
|
||||
title: "Distribution"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user