Compare commits

...

708 Commits

Author SHA1 Message Date
Pau Perez
3616a27566 Update all locales with the latest Transifex translations 2019-08-01 15:07:09 +02:00
Matt-Yorkley
5ae61017f5 Merge pull request #4091 from Matt-Yorkley/missing_css
Move CSS rule to SCSS and remove broken css file reference
2019-07-31 23:48:52 +01:00
Luis Ramos
61dffb8821 Merge pull request #4093 from openfoodfoundation/dependabot/bundler/redcarpet-3.5.0
Bump redcarpet from 3.4.0 to 3.5.0
2019-07-31 20:53:43 +01:00
Luis Ramos
f9fabd088c Merge pull request #4075 from HugsDaniel/defacepocalypse-payment-methods
[Defacepocalypse] De-deface payment methods index
2019-07-31 15:49:48 +01:00
Luis Ramos
75c7e0b939 Merge pull request #4089 from luisramos0/undeface-fix
Add doctype declaration in layouts/admin view
2019-07-30 19:29:17 +01:00
Luis Ramos
62eb2bba13 Merge pull request #4059 from luisramos0/kill_rabl
Convert 2 rabl templates to AMS and remove a few unused ones
2019-07-30 19:28:21 +01:00
Luis Ramos
3fa9e857a8 Merge pull request #4067 from luisramos0/oc_icon
Add icon to OC menu entry
2019-07-30 14:08:08 +01:00
dependabot-preview[bot]
7da10db055 Bump redcarpet from 3.4.0 to 3.5.0
Bumps [redcarpet](https://github.com/vmg/redcarpet) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/vmg/redcarpet/releases)
- [Changelog](https://github.com/vmg/redcarpet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vmg/redcarpet/compare/v3.4.0...v3.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-29 19:16:07 +00:00
Matt-Yorkley
7b2a146404 Move CSS rule to SCSS and remove broken css file reference 2019-07-29 18:16:36 +01:00
luisramos0
ddf68444fb Move head scripts from admin layout to haed partial 2019-07-29 17:04:57 +01:00
luisramos0
4867649fc9 Remove dead code related to unused variable in spree: expand_variants 2019-07-29 17:04:57 +01:00
Pau Pérez Fabregat
35841066d1 Merge pull request #4086 from openfoodfoundation/transifex
Transifex
2019-07-29 17:33:19 +02:00
luisramos0
9bc81f236c Add doctype declaration as it is defined in spree layouts/admin so that html5 mode is enabled, otherwise html 4 mode is used by browsers and the observed layout problems happen 2019-07-29 13:46:35 +01:00
luisramos0
e26a54d897 Fix indentation problem in layouts/admin view
We move most entries inside wrapper as it should be and the last ones "admin_footer_scripts" and Spree.api_key inside the body tag as it should be
2019-07-29 13:33:11 +01:00
Transifex-Openfoodnetwork
ed1d637eb5 Updating translations for config/locales/es.yml 2019-07-29 19:06:20 +10:00
Transifex-Openfoodnetwork
831284c5c8 Updating translations for config/locales/es.yml 2019-07-29 19:03:13 +10:00
Transifex-Openfoodnetwork
e45b8f6981 Updating translations for config/locales/ca.yml 2019-07-29 19:02:24 +10:00
Transifex-Openfoodnetwork
d0f8f985fb Updating translations for config/locales/es.yml 2019-07-29 19:00:02 +10:00
Transifex-Openfoodnetwork
33eec61af8 Updating translations for config/locales/ca.yml 2019-07-29 18:59:14 +10:00
Transifex-Openfoodnetwork
00c324ae45 Updating translations for config/locales/fr.yml 2019-07-29 18:01:09 +10:00
Transifex-Openfoodnetwork
12a016d31d Updating translations for config/locales/fr.yml 2019-07-29 17:57:59 +10:00
Luis Ramos
af50bde088 Merge pull request #3786 from ja9-look/feature/sticky_header_on_scroll_mobile
sticky header for mobile
2019-07-26 11:22:33 +01:00
Luis Ramos
340b92e580 Merge pull request #3700 from luisramos0/2-0-without-auth-devise
Remove dependency to spree_auth_devise
2019-07-26 10:57:38 +01:00
luisramos0
f64653db14 Add icon to OC menu entry 2019-07-26 10:52:31 +01:00
Maikel
e6ef661f0d Merge pull request #4066 from luisramos0/reorg_spec_serializers
Organizing spec/serializers - put each file in the correct place
2019-07-26 16:23:23 +10:00
Hugo Daniel
6a621f47aa Remove data-hooks 2019-07-25 14:31:07 +02:00
Kristina Lim
dae23d3c3b Remove unused inclusion of $window in OffcanvasCtrl 2019-07-25 20:22:51 +08:00
Kristina Lim
def2693afc Move offcanvas JS to Angular controller 2019-07-25 17:01:46 +08:00
Luis Ramos
55f26f0a3d Merge pull request #4043 from luisramos0/bring_shipment
Bring spree/admin/orders/shipment and shipment_manifest partials from spree_backend and fix an authorization bug
2019-07-24 21:59:47 +01:00
Luis Ramos
7245d1eff4 Merge pull request #4049 from luisramos0/deface_admin_orders
De-deface admin orders adjustments page and customer details page
2019-07-24 21:59:08 +01:00
Hugo Daniel
87ef0215b8 De-deface payment_methods/index 2019-07-24 14:49:29 +02:00
Hugo Daniel
4b6a02cb92 Convert payment_methods/index from ERB to Haml 2019-07-24 14:39:59 +02:00
Hugo Daniel
196a301133 Import payment_methods/index.html.erb from spree_backend to ofn 2019-07-24 14:38:20 +02:00
luisramos0
b9b8bc70dd Remove stock location name from shipment header in the order edit page 2019-07-24 11:50:17 +01:00
Kristina Lim
d42da8737e Improve readability of selectors in page alert JS directive 2019-07-24 12:44:42 +08:00
Kristina Lim
6419edcb1f Integrate styles/animations for page alert, top bar, tab bar, off canvas 2019-07-24 12:44:42 +08:00
Kristina Lim
fca82375e8 Render home page alert as :page_alert outside main content 2019-07-24 12:44:42 +08:00
Kristina Lim
ca0f746cf1 Fix animation and layout for offcanvas menu
Uses strategy from this forum comment:
http://foundation.zurb.com/forum/posts/547#comment_8840
2019-07-24 12:43:44 +08:00
Kristina Lim
a93cf46f50 Fix syntax of existing animations for offcanvas 2019-07-24 12:37:42 +08:00
luisramos0
74a030f6db Organizing spec/serializers - put each file in the correct place acccording to its namespace 2019-07-23 22:17:28 +01:00
Luis Ramos
1f75c7e5e4 Merge pull request #4047 from luisramos0/undeface
De-deface some admin configuration pages and the general admin layout and menu
2019-07-23 18:36:09 +01:00
luisramos0
a1e6e4c38f Fix rubocop issues 2019-07-23 14:35:24 +01:00
Luis Ramos
77fb73f802 Merge pull request #4065 from coopdevs/get-latest-spree-revision
Brings in the latest Spree fork's Git commit
2019-07-23 14:28:49 +01:00
Pau Perez
9f7376a5ae Brings in the latest Spree fork's Git commit
This successfully closes #3903 by bringing in the changes done in
https://github.com/openfoodfoundation/spree/pull/41.
2019-07-23 14:56:33 +02:00
Luis Ramos
eae373ef4b Merge pull request #4061 from openfoodfoundation/revert-3938-get-last-spree-fork-patch
Revert "Handle soft deleted variants in order edit"
2019-07-22 21:06:10 +01:00
Luis Ramos
465332d5f9 Revert "Handle soft deleted variants in order edit" 2019-07-22 21:05:41 +01:00
Luis Ramos
e98b89625f Merge pull request #3938 from openfoodfoundation/get-last-spree-fork-patch
Handle soft deleted variants in order edit
2019-07-22 21:05:12 +01:00
luisramos0
cf61254c9e Remove unnecesary rabl template 2019-07-22 18:42:20 +01:00
luisramos0
1d92d6cc33 Remove unused api endpoint order_cycles and also action enterprises/managed and respective views 2019-07-22 17:35:41 +01:00
luisramos0
6b32764c99 Remove unused taxon.rabl from views/json 2019-07-22 16:29:54 +01:00
Pau Perez
be4fbc4d23 Update Gemfile to get spree from a feature branch
This allows us to test
https://github.com/openfoodfoundation/spree/pull/41. If it passes
testing I will then revert it back to the `2-0-4-stable` branch but
updating the target commit in the Gemfile.lock.
2019-07-22 15:40:31 +02:00
luisramos0
ea72a10b9a Remove unused rabl files from views/json 2019-07-22 12:14:10 +01:00
luisramos0
9b567a6710 Remove injection_json that renders json partials, we only use ams serializers now, not rabl partials 2019-07-21 23:55:59 +01:00
luisramos0
a8ce31fa90 Replace views/json/_flash.rabl with an ams injector with serializer 2019-07-21 22:56:15 +01:00
luisramos0
4c964fea0d Replace views/json/_current_user.rabl with an ams injector with serializer 2019-07-21 22:48:36 +01:00
luisramos0
6d7c41c04b Bring db/default/users from spree_auth_devise, this is necessary to create the first user in the DB 2019-07-20 20:48:49 +01:00
Luis Ramos
a6a695660f Merge pull request #4002 from luisramos0/more_rails4
Adapting queries in permissions to Rails 4
2019-07-19 15:17:01 +01:00
Luis Ramos
0058ef5e04 Merge pull request #4048 from idanceinbetween/4034
Add grey line below nav bar, change logo img max height 44px
2019-07-19 12:13:14 +01:00
Luis Ramos
4831bae9cb Merge pull request #3953 from mkllnk/3727-first-credit-card-default
First stored credit card becomes default again
2019-07-19 12:12:09 +01:00
Luis Ramos
f7679780de Merge pull request #4032 from luisramos0/subs_oc_date_issue
3544 Add date format to moment date conversion
2019-07-18 19:52:49 +01:00
luisramos0
f2ac354e00 Make features/admin/orders_spec test a bit more reliable by expecting element to be there before using it 2019-07-18 14:29:38 +01:00
Maikel
88ffa46ce7 Merge pull request #4045 from openfoodfoundation/transifex
Transifex
2019-07-18 16:35:41 +10:00
Maikel
869431c68d Merge pull request #3926 from mkllnk/report-missing-payments
Add rake task to report lost payments
2019-07-18 15:01:14 +10:00
Maikel
a1f8530489 Merge pull request #3962 from luisramos0/first_view_spec
First 2 view specs in OFN
2019-07-17 10:57:58 +10:00
luisramos0
a75a0da981 Remove unused deface in spree/admin/orders/show, this action doesnt exist in ofn v2 2019-07-16 21:12:48 +01:00
luisramos0
5744240f91 Move customer_details/_form defaces to the view 2019-07-16 21:12:09 +01:00
luisramos0
873c56a642 Move customer_details/edit/replace_customer_search deface to view 2019-07-16 21:09:48 +01:00
luisramos0
f53a75660f Convert spree/admin/orders/customer_details view from erb to haml 2019-07-16 21:05:19 +01:00
luisramos0
50dcbe0b57 Bring spree/admin/order/customer_details from spree_backend 2019-07-16 21:03:35 +01:00
luisramos0
f9861fee79 De-deface spree/admin/adjustments/_adjustments_table by moving deface content to the view 2019-07-16 21:01:08 +01:00
luisramos0
d8ae97f923 Move spree/admin/adjustments/_form/add_tax_rate deface to view 2019-07-16 20:53:24 +01:00
luisramos0
9f5db217fe Convert spree/admin/adjustments views from erb to haml 2019-07-16 20:51:55 +01:00
luisramos0
c1c5dcac09 Bring spree/admin/adjustments pages from spree_backend 2019-07-16 20:51:55 +01:00
luisramos0
6064f096a7 Fix a pre-existing problem in orders_tab by moving the links in to the li elements 2019-07-16 20:16:32 +01:00
luisramos0
a62fa755f5 Remove page_title_classes as it is breaking the rendering of the classes attribute and it is no longer used 2019-07-16 20:16:32 +01:00
luisramos0
fa25991f0f Fix problem in previous de-deface, move sections around in general settings page to keep order. No changes in code, just moving 2019-07-16 20:16:32 +01:00
luisramos0
6f2be1dfa6 Fix issue in layouts/admin view, make classes compute correctly 2019-07-16 20:16:32 +01:00
luisramos0
c81a9fd032 Fix error in js tag in head 2019-07-16 20:16:32 +01:00
luisramos0
665d0cc86b Fix error related to missing _hamlout method by replacing code with standard haml 2019-07-16 20:16:32 +01:00
luisramos0
a34d8a3f20 Revert "Move app_wrapper deface to spree/layouts/admin view"
This reverts commit bb18f6ecf3c1d0ecf7c010623215d161a6102f2b.
2019-07-16 20:16:32 +01:00
luisramos0
6e35701dd6 Remove unused add_enterprise_fees_to_admin_configurations_menu deface, this menu entry is already in the view 2019-07-16 20:16:32 +01:00
luisramos0
9991458d2a Remove spree/admin/shared/_order_details defaces, these are only used in admin/order/show which is a view that is not used in ofn anymore, only admin/order/edit is used 2019-07-16 20:16:32 +01:00
luisramos0
a843fd73b7 Remove admin/shared/_order_tabs/add_customer_name, this is already in the order tabs view 2019-07-16 20:16:32 +01:00
luisramos0
9765b1e908 Move admin/shared/_head/replace_spree_title deface to head view 2019-07-16 20:16:32 +01:00
luisramos0
5ccadc1f7d Convert spree/admin/shared/_head view from erb to haml 2019-07-16 20:16:32 +01:00
luisramos0
539805e2c2 Bring spree/admin/shared/head partial from spree_backend 2019-07-16 20:16:32 +01:00
luisramos0
fac64ef5bf Remove layouts/spree_application/inside_head deface, this view is in spree_frontend which is not used in ofn anymore 2019-07-16 20:16:32 +01:00
luisramos0
a17a0a62bc Move spree/layouts/bare_admin/add_login_nav deface to layout/bare_admin view 2019-07-16 20:16:32 +01:00
luisramos0
1e91de106f Move admin html head deface to layout admin view and remove repeated (in shared/head partial) content type tag 2019-07-16 20:16:32 +01:00
luisramos0
73252132a6 Move add_i18n_script deface to layout/admin view 2019-07-16 20:16:32 +01:00
luisramos0
e3c383c61c Convert spree/admin/shared/_tabs.html from erb to haml and move menu entries from layouts/admin to the tabs view 2019-07-16 20:16:32 +01:00
luisramos0
aafb134be7 Move spree/layouts/admin/ tabs deface to spree/layout/admin view 2019-07-16 20:16:32 +01:00
luisramos0
70a1996435 Move add_currency_config deface to spree/layout/admin view 2019-07-16 20:16:31 +01:00
luisramos0
1712cb2617 Move app_wrapper deface to spree/layouts/admin view
In admin layout, only adds a div after the body tag.
2019-07-16 20:16:31 +01:00
luisramos0
25df057d05 Move spree/layouts/admin/add_analytics deface to spree/layouts/admin view 2019-07-16 20:16:31 +01:00
luisramos0
24a9991162 Convert views/spree/layouts/admin.html from erb to haml 2019-07-16 20:16:31 +01:00
luisramos0
156ff2da89 Bring spree/layouts/admin from spree_backend to de-deface it 2019-07-16 20:16:31 +01:00
luisramos0
e36b4ed01a Move temp_controller_list deface to shipping_categories index view 2019-07-16 20:16:23 +01:00
idanceinbetween
41b775b173 Remove multiline 2019-07-16 20:10:18 +01:00
idanceinbetween
35570feba0 Comment out new changes 2019-07-16 20:04:50 +01:00
idanceinbetween
1d8cfe59a2 Change hex value to variable 2019-07-16 19:37:08 +01:00
idanceinbetween
abd3efe82a Replace lightgray to hex 2019-07-16 19:32:19 +01:00
idanceinbetween
389b53cb71 Add grey line below nav bar, change logo img max height 44px 2019-07-16 19:14:10 +01:00
luisramos0
4f60273198 Move temperature_controlled_form_element deface to shipping_categories form view 2019-07-16 14:50:16 +01:00
luisramos0
856fa8685a Convert spree/admin/shipping_categories views from erb to haml 2019-07-16 14:48:47 +01:00
luisramos0
9ac4c0ba30 Bring spree/admin/shipping categories from spree_backend so we can de-deface it 2019-07-16 14:46:26 +01:00
luisramos0
2709f237f5 Move image_format deface to image settings view 2019-07-16 14:44:38 +01:00
luisramos0
9db4edcd0d Convert spree/admin/image_settings/edit.html from erb to haml 2019-07-16 14:43:20 +01:00
luisramos0
22c9f33f4c Bring image_settings view from spree_backend 2019-07-16 14:39:14 +01:00
luisramos0
24ea2a4398 Move number_localization deface to general settings view 2019-07-16 14:28:47 +01:00
luisramos0
8178f5388c Move legal settings deface to general settings view 2019-07-16 14:27:32 +01:00
luisramos0
c0c5e9d7dd Move embedded_shopfronts deface to general settings view 2019-07-16 14:26:33 +01:00
luisramos0
19f8f5c6fa Convert general_settings/edit.html from erb to haml 2019-07-16 14:15:51 +01:00
luisramos0
83a306c31b Convert class attributes to . notation in haml 2019-07-16 14:09:48 +01:00
luisramos0
d6020cdb6f Bring general_settings/edit.html.erb from spree_backend to de-deface it 2019-07-16 13:57:35 +01:00
Kristina Lim
77c78f35d3 Update all locales with the latest Transifex translations 2019-07-16 18:53:24 +08:00
Luis Ramos
2280b15664 Merge pull request #4035 from kristinalim/fix/4033-remove_line_item_adjustments_when_line_item_removed
4033 Remove line item adjustments when line item removed
2019-07-16 09:54:33 +01:00
Transifex-Openfoodnetwork
f843a0b4d9 Updating translations for config/locales/en_AU.yml 2019-07-16 17:08:24 +10:00
Transifex-Openfoodnetwork
965a274332 Updating translations for config/locales/en_AU.yml 2019-07-16 17:05:40 +10:00
Transifex-Openfoodnetwork
cb2a842746 Updating translations for config/locales/en_AU.yml 2019-07-16 17:05:17 +10:00
luisramos0
a6655623d0 New admin orders edit view spec and workaround (current_ability) to make view specs work 2019-07-15 21:59:36 +01:00
luisramos0
2a2d05ad39 First view spec in OFN testing the print invoice button display in the orders list page 2019-07-15 21:59:36 +01:00
luisramos0
e8127d81dc Change how we display variant name in order edit page, use VariantAndLineItemNaming helper method 2019-07-15 18:37:19 +01:00
luisramos0
cd7906a57b Move translations from Spree.t to root and add them to en.yml 2019-07-15 17:48:10 +01:00
luisramos0
02c573f146 Remove logic that hides item split, because the partial is now in the ofn codebase, we can now simply remove the split-item button 2019-07-15 17:11:41 +01:00
luisramos0
112017a158 Remove variants/split partial from orders/shipments partial
In OFN we have one shipment per order so it doesnt make sense to split items between shipments
2019-07-15 17:07:33 +01:00
luisramos0
4a07d67037 Convert spree/admin/orders/_shipment partial from erb to haml 2019-07-15 16:42:45 +01:00
luisramos0
54156dfd32 Convert spree/admin/orders/_shipment_manifest partial from erb to haml 2019-07-15 16:42:19 +01:00
luisramos0
ee20d35487 Fix authorization issue in shipment actions, authorization was being done on a struct (shipment manifest), now it's done on the shipment itself
This is similar to https://github.com/spree/spree/pull/5624
2019-07-15 15:38:46 +01:00
luisramos0
be18244abc Bring views/spree/admin/orders/_shipment and views/spree/admin/orders/_shipment_manifest from spree backend 2019-07-15 15:37:24 +01:00
Kristina Lim
e58546a412 Move offcanvas menu content to separate partial 2019-07-14 13:52:47 +08:00
Kristina Lim
2c279fd02d Remove line item adjustments if line item deleted 2019-07-13 03:58:01 +10:00
Kristina Lim
8a048cc155 Add proof line item adjustments remain after line item removal 2019-07-13 01:43:07 +08:00
Luis Ramos
b3c378e8c1 Merge pull request #4029 from Matt-Yorkley/js_render_blocking2
Js render blocking 2
2019-07-12 16:34:31 +01:00
Luis Ramos
39475be792 Merge pull request #4030 from Matt-Yorkley/line_item_errors
LineItems can always access soft-deleted variants
2019-07-12 16:33:36 +01:00
luisramos0
9e2e460ac5 Add date format to moment date conversion. This conversion was not working on firefox 2019-07-12 12:01:18 +01:00
luisramos0
18006ea9c8 Change devise config to speed up password encryption in tests 2019-07-12 10:12:53 +01:00
luisramos0
71b648e9fa Add some tests to features/admin/users_spec from spree_auth_devise 2019-07-12 10:02:40 +01:00
luisramos0
eacd76bfa4 Add spec to features/admin/products_spec from spre_auth_devise 2019-07-11 19:47:17 +01:00
luisramos0
791ff842aa Add some tests to models/spree/user_spec from spre_auth_devise 2019-07-11 19:39:31 +01:00
luisramos0
ac0123734a Add some tests from spree/users_controller_spec from spree_auth_devise 2019-07-11 18:33:18 +01:00
luisramos0
7cab99efdf Run transpec on users_controller 2019-07-11 18:07:23 +01:00
luisramos0
5378bb7b34 Add adapted version of spree/admin/users_controller_spec from spree_auth_devise 2019-07-11 17:45:56 +01:00
luisramos0
942824cd74 Improve comments in UserMailer 2019-07-11 16:37:30 +01:00
Pau Pérez Fabregat
bdeb56bfaf Merge pull request #4028 from openfoodfoundation/transifex
Transifex
2019-07-11 17:28:38 +02:00
Matt-Yorkley
fb4e573cfa Add a soft-deleted test in line_item_spec 2019-07-11 16:07:30 +01:00
Transifex-Openfoodnetwork
e65df31bc3 Updating translations for config/locales/nl_BE.yml 2019-07-12 00:29:50 +10:00
Transifex-Openfoodnetwork
ce1ac57522 Updating translations for config/locales/de_DE.yml 2019-07-11 23:53:17 +10:00
Transifex-Openfoodnetwork
09ff57d462 Updating translations for config/locales/en_BE.yml 2019-07-11 23:50:31 +10:00
Transifex-Openfoodnetwork
542cf0cf4f Updating translations for config/locales/fr_BE.yml 2019-07-11 23:43:29 +10:00
Transifex-Openfoodnetwork
f4113745ce Updating translations for config/locales/fr.yml 2019-07-11 23:11:32 +10:00
Transifex-Openfoodnetwork
6d197c53e0 Updating translations for config/locales/en_ZA.yml 2019-07-11 21:40:38 +10:00
Matt-Yorkley
b2c6e6271c LineItems can always access soft-deleted variants 2019-07-11 11:33:34 +01:00
Luis Ramos
cdd36eeefc Merge pull request #3674 from Matt-Yorkley/spree2/import_description
Allow import to proceed when updating a product and `description` is set
2019-07-10 21:09:30 +01:00
Matt-Yorkley
97148f6f57 Send embedded Stripe javascript to :injection_data 2019-07-10 19:28:20 +01:00
Matt-Yorkley
6219b3f0c3 Revert "Revert "Fix JS render-blocking in Darkswarm""
This reverts commit ffeca41e
2019-07-10 17:14:08 +01:00
Transifex-Openfoodnetwork
d66cac7a26 Updating translations for config/locales/ca.yml 2019-07-10 21:20:51 +10:00
Transifex-Openfoodnetwork
07c11b9b1f Updating translations for config/locales/es.yml 2019-07-10 21:18:28 +10:00
Transifex-Openfoodnetwork
6a232a1f36 Updating translations for config/locales/ca.yml 2019-07-10 21:17:43 +10:00
Maikel
1a61357be8 Merge pull request #4024 from openfoodfoundation/transifex
Transifex
2019-07-10 11:17:12 +10:00
Maikel
b2eeb5d687 Merge pull request #4025 from openfoodfoundation/revert-3988-js_render_blocking
Revert "Fix JS render-blocking in Darkswarm"
2019-07-10 11:00:17 +10:00
Maikel
ffeca41ef4 Revert "Fix JS render-blocking in Darkswarm" 2019-07-10 10:24:25 +10:00
Transifex-Openfoodnetwork
68c0936766 Updating translations for config/locales/en_GB.yml 2019-07-10 04:39:47 +10:00
Luis Ramos
23b6267e30 Merge pull request #3916 from luisramos0/schedules_of_coordinator
OC schedules are now filtered to schedules of OCs with same coordinator
2019-07-09 14:21:34 +01:00
Luis Ramos
6872ccfb72 Merge pull request #3963 from luisramos0/hide_invoices
Hide invoices feature
2019-07-09 14:20:50 +01:00
luisramos0
b1b791e4ee Update all locales with the latest Transifex translations 2019-07-09 14:19:35 +01:00
Luis Ramos
1779b759f7 Merge pull request #4017 from openfoodfoundation/transifex
Transifex
2019-07-09 14:15:38 +01:00
Transifex-Openfoodnetwork
3ebbf5a55d Updating translations for config/locales/fr.yml 2019-07-09 22:42:05 +10:00
Luis Ramos
83ce2ac3dc Merge pull request #3988 from Matt-Yorkley/js_render_blocking
Fix JS render-blocking in Darkswarm
2019-07-09 12:30:30 +01:00
Luis Ramos
aaf850a095 Merge pull request #4010 from luisramos0/fuubar_upgrade
Apply 2.1.1 hotfix to master
2019-07-09 12:24:54 +01:00
Luis Ramos
3e9bf8aa1f Merge pull request #3964 from openfoodfoundation/hand-soft-deleted-products-in-orders-and-fulfillment-report
Handle soft deleted products in orders and fulfillment report
2019-07-09 12:19:28 +01:00
luisramos0
95832c96ac Delete redundant spec, this case is now covered in a view spec 2019-07-09 09:15:38 +01:00
Luis Ramos
8a700307d2 Merge pull request #3992 from Matt-Yorkley/cart_button_bug
Fix display bug in cart button on mobile menu
2019-07-08 18:33:36 +01:00
luisramos0
86accc227e Convert erb files brought from spree_auth_devise to haml 2019-07-08 18:09:03 +01:00
Luis Ramos
1756ddd0e9 Merge pull request #3989 from Matt-Yorkley/preload_primary_font
Preload primary font to speed up page rendering
2019-07-08 17:43:15 +01:00
Luis Ramos
fe71781d70 Merge pull request #3791 from jazzdragon/1766-registration-scroll
1766 registration scroll
2019-07-08 15:10:35 +01:00
Luis Ramos
ec65951ef3 Merge pull request #3959 from jonleighton/issue-1848
Edit tooltip text to make it readable
2019-07-08 15:09:11 +01:00
luisramos0
1681e8a572 Remove unused auth config 2019-07-08 14:06:01 +01:00
luisramos0
e897eb0439 Remove Spree::BaseController.class_eval, these methods are already in the application helper through spree::application_helpers
We can ignore the difference in spree_logout_path as spree.logout_path is the user_sessions#destroy route
2019-07-08 13:59:26 +01:00
luisramos0
36e3362fc1 Adding missing translation that is now being used after being brought from spree_auth_devise 2019-07-08 13:23:18 +01:00
luisramos0
10e123a9c4 Move spree/authentication_helpers injection from spree initializers directly to the application_controller
Also, switch from using send to public_send making rubocop happier
2019-07-08 13:11:57 +01:00
luisramos0
0101dcdd93 Remove unused Spree::Dash from controllers brought from spree_auth_devise 2019-07-08 13:10:52 +01:00
luisramos0
9416f61fb3 Remove spree/checkout_controller.completion_route only used in spree/checkout_controller.update which is never used in OFN. Checkout update happpens in the checkout_controller.update 2019-07-08 13:04:38 +01:00
luisramos0
8efd69c3d1 Remove unnecessary checkout registration code, it's not used in OFN 2019-07-08 12:57:17 +01:00
luisramos0
dcbdfbb081 Fix rubocop issues in multiple files copied from spree_auth_devise, mostly hash rockets 2019-07-08 11:22:56 +01:00
luisramos0
92968c5efe Merge spree/users_sessions_controller into spree/users_sessions from spree_auth_devise 2019-07-07 22:06:18 +01:00
luisramos0
c8ac64566f Merge spree/users_controller_decorator into spree/user_controller 2019-07-07 22:04:04 +01:00
Transifex-Openfoodnetwork
633c7737e4 Updating translations for config/locales/en_ZA.yml 2019-07-08 04:04:48 +10:00
luisramos0
05a72be273 Move handle_asynchronously :send_reset_password_instructions to after send_reset_password_instructions declaration
This was as it was before the merge of user_decorator and user, the declaration was in the original class and the handle_asynchronously part was in the decorator which was loaded after the main user class from spree_auth_devise, this commit restores the order and fixes a spec in authentication_spec
2019-07-07 17:53:12 +01:00
luisramos0
b1cd950051 Add missing translation keys from spree_auth_devise 2019-07-07 17:12:54 +01:00
luisramos0
f557996817 Add deface overrides from spree_auth_devise for the users menu tab, the admin top bar and the shared login bar (maybe dead code this last one) 2019-07-06 22:53:20 +01:00
luisramos0
1a64a737d4 Add ActionController::Metal frorm spree_auth_devise for api authentication 2019-07-06 10:50:48 +01:00
luisramos0
7c0087cb30 Remove reference to empty spree_auth css and js files from spree_auth_devise 2019-07-06 00:02:40 +01:00
luisramos0
17448699f9 Bring devise initializer from spree_auth_devise and fix spree initializer details 2019-07-05 22:45:59 +01:00
luisramos0
a413f22e12 Remove unnecessary dependency to spree/users helper 2019-07-05 22:37:07 +01:00
luisramos0
893952f46b Merge user_mailer_decorator into user_mailer 2019-07-05 22:31:06 +01:00
luisramos0
061e3cd722 Add user mailer from spree_auth_devise 2019-07-05 22:29:51 +01:00
luisramos0
a83790951d Add model auth_config from spree_auth_devise 2019-07-05 21:58:29 +01:00
luisramos0
4e33529845 Merge user_decorator.rb into user.rb 2019-07-05 21:58:28 +01:00
luisramos0
a2a8b330b7 Add User class from spree_auth_devise as is 2019-07-05 21:58:28 +01:00
luisramos0
9669016573 Add required views from spree_auth_devise 2019-07-05 21:58:28 +01:00
luisramos0
2755cb9ec7 Add users_tab partial from spree_auth_devise 2019-07-05 21:58:28 +01:00
luisramos0
fdcc4c2447 Remove dependency to spree auth devise 2019-07-05 21:58:07 +01:00
Pau Perez
f42bf72b32 Fix rubocop violations
It's not affordable to fix the failed Metrics cops in the scope of this
bug fix, but now, with a separate class, it'll be easier.
2019-07-05 18:19:58 +02:00
Pau Perez
8ab77b077b Fix spec
This needs to be revisited. I'm not sure it's the most appropriate spec
as it seems to be testing just part of story.
2019-07-05 18:19:58 +02:00
Pau Perez
9b03833df0 Extract orders & fulfillments default report clasts 2019-07-05 18:19:58 +02:00
Pau Perez
fada30435f DRY some procs from report 2019-07-05 18:19:58 +02:00
luisramos0
fc0ffda8ec Bring routes and controllers from spree_auth_devise 2019-07-05 15:08:42 +01:00
Luis Ramos
397729ed3d Merge pull request #4001 from pacodelaluna/3990-display-enterprise-id-in-profile
Display enterprise ID in profile
2019-07-05 11:14:43 +01:00
luisramos0
88312b8e4a Make OrdersHelper.invoice_links simpler 2019-07-05 11:08:51 +01:00
luisramos0
9be3ff90f7 Make OrdersHelper.complete_order_links simpler 2019-07-05 11:06:49 +01:00
luisramos0
a5b5e5de32 Remove trailing backslash 2019-07-05 10:58:53 +01:00
luisramos0
e66dea7e03 Improve query in filter_schedules_by_enterprise_id. Makes join to OCs explicity. 2019-07-05 10:37:27 +01:00
Maikel
4c5ed2fa45 Merge pull request #3999 from openfoodfoundation/transifex
Transifex
2019-07-05 11:59:40 +10:00
Maikel
40c0e69f11 Merge pull request #4000 from Matt-Yorkley/v2_migrations
Fix failing migration by clearing schema cache
2019-07-05 10:56:26 +10:00
Transifex-Openfoodnetwork
f3837fb6af Updating translations for config/locales/en_GB.yml 2019-07-05 05:08:46 +10:00
Pau Perez
db7b7bbde2 Fix finding supplier for a deleted product 2019-07-04 18:52:56 +02:00
luisramos0
ef61310bad Fix long lines in order_cycle_permissions and permissions 2019-07-04 17:17:58 +01:00
luisramos0
91da0114e3 Upgrade fuubar to 241 to skip yanked 240 2019-07-04 16:09:36 +01:00
Pau Perez
ee301c5e2f Address Code Climate (rubocop) issues 2019-07-04 17:01:06 +02:00
Pau Perez
4a67ffab25 Add a test case for reports with deleted products 2019-07-04 17:01:06 +02:00
Pau Perez
4d060815d0 Extract unscoping logic into method
DRYies out the code a bit.
2019-07-04 17:01:06 +02:00
Pau Perez
f91bd03c25 Add clarifying comment to report 2019-07-04 17:01:06 +02:00
Pau Perez
7de4ec2a90 Fix orders and fulfillments report
It bypasses the default_scope to retrieve deleted variants in the orders
and fulfillment report.
2019-07-04 17:01:06 +02:00
Pau Perez
812d8cac4a Make complex method a bit more readable 2019-07-04 17:01:06 +02:00
Transifex-Openfoodnetwork
d1faed282f Updating translations for config/locales/es.yml 2019-07-05 00:22:01 +10:00
Transifex-Openfoodnetwork
26195314eb Updating translations for config/locales/ca.yml 2019-07-05 00:09:05 +10:00
François Turbelin
912483660f Put the uid under the permalink 2019-07-04 09:51:32 +02:00
François Turbelin
d12a7c2c76 Apply last suggestions 2019-07-04 09:43:35 +02:00
luisramos0
dee1c3d139 Fix typo in order_cycle_permissions.rb 2019-07-03 22:58:33 +01:00
François Turbelin
101cff02c6 Add locale keys 2019-07-03 23:06:50 +02:00
luisramos0
bb9c54a445 Use enterprises.id instead of :id to remove ambiguous column errors 2019-07-03 22:03:40 +01:00
François Turbelin
5ce2af454e Clean id field 2019-07-03 23:00:36 +02:00
luisramos0
e5f396f975 Fix Permissions.related_enterprises_granted by adding explicit reference to table 2019-07-03 20:18:01 +01:00
luisramos0
a57a93d414 Adapt permissions.rb and order_cycle_permissions to rails 4 2019-07-03 20:18:01 +01:00
luisramos0
a82b1d8129 Adapt exchange.involving scope to rails 4 2019-07-03 20:18:00 +01:00
luisramos0
5184fa540c Adapt enterprise_relationship permitting and permitted_by scopes to rails 4 2019-07-03 20:18:00 +01:00
Luis Ramos
951787d456 Merge pull request #3987 from mkllnk/3978-optimise-products-cache
3978 Optimise products cache
2019-07-03 19:59:07 +01:00
Luis Ramos
b35743b6e4 Merge pull request #3968 from mkllnk/3924-rescue-failing-shipment
Rescue checkout on shipping id conflict
2019-07-03 19:56:24 +01:00
Luis Ramos
4fc30ba50e Merge pull request #3994 from openfoodfoundation/dependabot/bundler/knapsack-1.17.2
Bump knapsack from 1.17.1 to 1.17.2
2019-07-03 19:55:20 +01:00
François Turbelin
97a401a307 Display enterprise ID in profile 2019-07-03 18:10:59 +02:00
Pau Pérez Fabregat
232e3b8262 Merge pull request #3993 from openfoodfoundation/dependabot/bundler/simplecov-0.17.0
Bump simplecov from 0.16.1 to 0.17.0
2019-07-03 16:28:56 +02:00
Pau Pérez Fabregat
b3b66d5825 Merge pull request #3970 from mkllnk/444-feature-toggle-use-env
Toggle features via env instead of initializer
2019-07-03 16:27:01 +02:00
Pau Pérez Fabregat
1b532f995c Merge pull request #3919 from mkllnk/db-mirror-script
Db mirror script
2019-07-03 16:24:01 +02:00
Pau Pérez Fabregat
f5544494f0 Merge pull request #3997 from mkllnk/remove-ng-test-script
Remove obsolete Javascript test script
2019-07-03 16:23:41 +02:00
Pau Pérez Fabregat
2de32b54ba Merge pull request #3995 from mkllnk/how-to-not-archive-branches
Remove obsolete script to archive branches
2019-07-03 16:23:15 +02:00
Pau Pérez Fabregat
b6e2dadbb3 Merge pull request #3996 from mkllnk/remove-backup-script
Remove obsolete backup script
2019-07-03 16:22:36 +02:00
Matt-Yorkley
473e635d54 Merge pull request #3982 from luisramos0/mobile_bug
Fixes menu problem with long shop names
2019-07-03 13:30:41 +01:00
Transifex-Openfoodnetwork
3e11cdb5c1 Updating translations for config/locales/fr.yml 2019-07-03 22:14:43 +10:00
Transifex-Openfoodnetwork
842e8da2c3 Updating translations for config/locales/fr.yml 2019-07-03 22:11:35 +10:00
Matt-Yorkley
24f8e6d2ec Fix failing migration by clearing schema cache 2019-07-03 12:59:10 +01:00
Maikel
568d58405d Merge pull request #3986 from openfoodfoundation/transifex
Transifex
2019-07-03 18:46:14 +10:00
Maikel Linke
b23489fa40 Remove obsolete Javascript test script
This script has been replaced by a rake task a long time ago:

  bundle exec rake karma:run   # to run the specs once
  bundle exec rake karma:start # to run the spec after each change

We don't need it any more and it doesn't work on my machine.
2019-07-03 14:50:33 +10:00
Maikel Linke
503658f930 Remove obsolete backup script
This script doesn't work anymore. It was written for old an Australian
production server. We have automatic backups now. And if we wanted to
take a backup manually, we should probably give it a meaningful name,
not using a script.
2019-07-03 14:46:56 +10:00
Maikel Linke
24bf5f0fea Remove obsolete script to archive branches
Apparently, there was a practice to archive branches by tagging them
"archive/branch-name" and then deleting them. We don't practice that
anymore and I would suggest to not start doing it again. Our setup is a
bit different now.

We now use our own forks for feature branches and can have our own,
individual archiving practices in our forks. There is no need to have a
central graveyard of people's "work after progress".

The old feature branches we used to have in the central repository got
archived in another fork:
https://github.com/openfoodfoundation/openfoodnetwork-archive/

Branches associated to pull requests should be deleted after the pull
request has been closed. Github keeps a reference to those branches in
the pull request which is like an archive.

Special branches we still have and delete from time to time:

- transifex: Created for new translations, deleted afterwards.
- dependabot/*: Dependabot always creates pull requests. See above.
- 1-31-1-stable etc: They only live as long as they are supported.

I would also like to delete the old `archive/*` tags. They are in the
openfoodnetwork-archive repository and could confuse developers in the
main repository. Let's keep it clean.
2019-07-03 14:36:16 +10:00
Matt-Yorkley
9d86249bcb Merge pull request #3954 from openfoodfoundation/improve-database-yml
DRY and make database.yml more flexible
2019-07-02 21:43:49 +01:00
Kristina Lim
3e37c8a3f1 Change underscores in CSS classes to hyphens
These were triggering a warning from scss-lint.
2019-07-03 04:43:35 +08:00
Kristina Lim
691d7d735b Reduce padding between top bar menu items 2019-07-03 04:35:44 +08:00
Kristina Lim
6d1dd76590 Cap width of hub name in top bar and wrap 2019-07-03 04:30:06 +08:00
Kristina Lim
356e00bfbb Add space for tab bar in medium and below screens 2019-07-03 04:02:28 +08:00
Kristina Lim
5534109122 Undo setting of margin for home tagline 2019-07-03 04:02:22 +08:00
Janine Luk
ac8790ecb3 sticky header for mobile 2019-07-03 03:57:11 +08:00
Matt-Yorkley
2eb8121644 Update Docker config 2019-07-02 20:36:21 +01:00
Matt-Yorkley
b685e0d3a7 Add ENV var for db host 2019-07-02 20:34:16 +01:00
Matt-Yorkley
1dd3d86a2b Add prefixes to ENV vars 2019-07-02 20:34:16 +01:00
Pau Perez
7ee41902f2 DRY and make database.yml more flexible
This enables us to fix
https://github.com/openfoodfoundation/ofn-install/issues/387 and brings the
needed flexibility so things like
https://github.com/openfoodfoundation/openfoodnetwork/pull/3887 or any CI don't
require a custom version. That's what ENV vars are for!

For instance, I no longer need to mess with my LXC setup to connect to the DB.
I just need to have 2 env vars.
2019-07-02 20:34:16 +01:00
dependabot-preview[bot]
490ced4a92 Bump knapsack from 1.17.1 to 1.17.2
Bumps [knapsack](https://github.com/ArturT/knapsack) from 1.17.1 to 1.17.2.
- [Release notes](https://github.com/ArturT/knapsack/releases)
- [Changelog](https://github.com/ArturT/knapsack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ArturT/knapsack/compare/v1.17.1...v1.17.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-02 19:21:44 +00:00
dependabot-preview[bot]
a682115fb1 Bump simplecov from 0.16.1 to 0.17.0
Bumps [simplecov](https://github.com/colszowka/simplecov) from 0.16.1 to 0.17.0.
- [Release notes](https://github.com/colszowka/simplecov/releases)
- [Changelog](https://github.com/colszowka/simplecov/blob/master/CHANGELOG.md)
- [Commits](https://github.com/colszowka/simplecov/compare/v0.16.1...v0.17.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-02 19:19:31 +00:00
Kristina Lim
653067f58c Omit text for top bar items with icon in large
This affects only top bar menu items for:

* Language
* Profile

This does not update the "Log in" menu item, because the currently
selected icon might not be self explanatory.
2019-07-03 01:49:36 +08:00
Kristina Lim
06ed9c838e Remove extra left padding from top bar menu items 2019-07-03 01:49:35 +08:00
Matt-Yorkley
726d87de6b Fix display bug in cart button on mobile menu 2019-07-02 16:47:22 +01:00
Matt-Yorkley
fbb97c3db8 Fix JS render-blocking in Darkswarm 2019-07-02 13:43:20 +01:00
Matt-Yorkley
cea8cbd924 Preload primary font to speed up page rendering 2019-07-02 13:23:03 +01:00
Maikel Linke
73372a58ef Remove unused and dangerous Exchange#eql? override
The `eql?` override has been added in very early commits but was
actually not used except in a test. It also caused performance problems
since each call to `eql?` would issue two database queries. A developer
would unknowingly trigger these when using `exchanges.uniq`. A mistake
that could have happened again in the future.

I moved the implementation to the test that was actually using it and
made a second test a bit more explicit.
2019-07-02 18:42:02 +10:00
Maikel Linke
287d6a926a Document Exchange 2019-07-02 18:42:02 +10:00
Maikel Linke
04b07a1ff5 Further optimise querying affected exchanges
The implementation queried the database for each incoming variant that
was changed. This rewrite combines ActiveRecord relations so that it
creates only one query. This saves another 5-10% of execution time when
updating enterprise fees on production instances.
2019-07-02 18:42:01 +10:00
Maikel Linke
0da7c93bc6 Collect affected exchanges more efficiently
When an incoming exchange of an order cycle changes, the ProductsCache
queries all affected outgoing exchanges to update them. It was creating
a big collection of exchanges with duplicates and then calling `uniq`.
That call was hitting a custom implementation of `eql?` which is very
inefficient. And since `Exchange.eql?` is ignoring the order cycle id,
it was probably filtering too many exchanges from the collection.

Fixed bug: If two order cycles sell exactly the same variants to the
same shop, the two outgoing exchanges are seen as equal. When the
variants change, ProductsCache would only update one of those two
exchanges, leaving one order cycle out of sync. This case is very rare.
It only happens if there is a shop with two active order cycles selling
exactly the same.

The new uniqueness test looks only at the attributes that are later used
to refresh the cache. I measured a page speed improvement from 90
seconds to 3 seconds (30 times faster).
2019-07-02 18:29:50 +10:00
Maikel Linke
bfe41d4cbc Extract method to simplify 2019-07-02 18:29:50 +10:00
Maikel Linke
3e6e0b73ee Style products cache
The `private` modifier doesn't affect class methods. Class methods have
to be declared as private separately. Also using more guard clauses,
brackets and linebreaks.
2019-07-02 18:29:49 +10:00
Maikel
592a468448 Merge pull request #3960 from mkllnk/test-spec-stability
Remove retries from previously flaky specs
2019-07-02 13:50:16 +10:00
Transifex-Openfoodnetwork
f09b1fc1a8 Updating translations for config/locales/en_ZA.yml 2019-07-02 01:13:09 +10:00
Ecksi
bdbd869b06 Modify English tool tip text in yml file
Modify GB English tool tip text in yml file

Modify US English tool tip text in yml file
2019-06-28 10:59:50 +10:00
Maikel
8b42bd205a Merge pull request #3977 from openfoodfoundation/transifex
Transifex
2019-06-27 09:29:09 +10:00
Transifex-Openfoodnetwork
6108a74fec Updating translations for config/locales/fr.yml 2019-06-27 00:47:45 +10:00
Luis Ramos
5ecab7a0c2 Merge pull request #3971 from Matt-Yorkley/basket_errors
Avoid `undefined method 'order'` errors when removing lineitems from basket
2019-06-26 15:33:26 +01:00
Luis Ramos
d8785bdaba Merge pull request #3932 from luisramos0/shpfront_message
Improve message in private shopfront when user is not logged in or not a customer
2019-06-26 15:31:06 +01:00
Luis Ramos
00841cb537 Merge pull request #3923 from luisramos0/prod_image_error
User friendly error when creating a product with an image in an unsupported format
2019-06-26 15:30:18 +01:00
luisramos0
61c8859da8 Fix problem in array concatenation in orders helper and cover it with specs 2019-06-26 14:17:41 +01:00
luisramos0
e33ce235c4 Hide invoice links in order edit page if invoices are disabled 2019-06-26 14:17:41 +01:00
luisramos0
ec2f99a467 Refactor OrderHelper.order_links: extract some logic from order_links to make it more simple and pass rubocop tests 2019-06-26 14:17:41 +01:00
luisramos0
67b5f08b07 Refactor OrderHelper.order_links: extract links object to separate methods 2019-06-26 14:17:41 +01:00
luisramos0
95170bacd5 Show print invoices button in orders list page only if invoices are enabled in the backoffice 2019-06-26 14:17:25 +01:00
Maikel
eebc49f27c Merge pull request #3887 from pacodelaluna/add-docker-configuration-for-dev-setup
Add docker configuration for quick local setup
2019-06-26 21:23:34 +10:00
luisramos0
8b0296eae6 Use a single query to get filter_schedules_by_enterprise_id 2019-06-26 11:38:03 +01:00
François Turbelin
b6120a9105 Fix docker-compose application yml file 2019-06-26 11:03:20 +02:00
Maikel Linke
5d3dbca9c3 Toggle features via env instead of initializer
A FeatureToggle could be switched via a class_eval in an initializer.
The initializer was installed via ofn-install. We want to get rid of
custom, untracked initializers. Here I'm changing the FeatureToggle
class to use environment variables instead.

This change needs to be followed up with a change in ofn-install to use
the new environment variable. It affects only Australian production.
2019-06-26 11:43:22 +10:00
Maikel Linke
5bbd63bcd8 Add spec for rescuing order saving shipment 2019-06-26 11:32:01 +10:00
Maikel Linke
980b4a86ab Move shipment rescue to its own method 2019-06-26 10:48:51 +10:00
Luis Ramos
118ed79070 Merge pull request #3904 from luisramos0/subs_stock
Fix ofn-on-hand directive and fix usage of variant.on_hand in subscriptions order factory
2019-06-25 20:25:06 +01:00
François Turbelin
623d1e0285 Add missing file 2019-06-25 20:05:55 +02:00
François Turbelin
2dcced8810 Put back application example file as it was 2019-06-25 17:59:37 +02:00
Matt-Yorkley
5100ad6b51 Improve #line_items_for logic and add more tests 2019-06-25 15:33:42 +01:00
luisramos0
7e2bead54d Make finalizedquantity optional in the ofn-on-hand directive and extract avaiable quantity to a separate method for clarity 2019-06-25 14:50:03 +01:00
luisramos0
2b6e6c62dd Simplify order_factory_spec by extracting copy pasted code to method 2019-06-25 14:50:03 +01:00
luisramos0
05a15d9441 Extract method to remove some copy pasted code in order_factory_spec 2019-06-25 14:50:03 +01:00
luisramos0
567196fe0e Fix line item verification of stock on the browser side by adding logic to handle completed orders with some reserved stock
The shopping/orders_spec is now validating this edge case by using all stock available in one of the line items
2019-06-25 14:50:03 +01:00
luisramos0
7bd32d4967 Fix usage of variant.on_hand in subscriptions order factory, we now take on_demand into account
This fixes a problem introduced in 12eab1bfa9 (diff-c3c4192f302cc77e9a8547012fe86ddb), since then variant.on_hand does not return infinity if variant is on_demand
2019-06-25 14:47:47 +01:00
Luis Ramos
9b6f1a5e11 Merge pull request #3958 from Matt-Yorkley/pi_encoding
Improve handling of invalid characters in uploaded CSV files
2019-06-25 14:44:32 +01:00
François Turbelin
84389d1392 Fix setup script with new application YAML file 2019-06-25 14:38:38 +02:00
François Turbelin
da3b467d47 Use https to fetch Postgres repo 2019-06-25 14:09:59 +02:00
François Turbelin
ceffae2efc Delete extra example file 2019-06-25 14:08:18 +02:00
Matt-Yorkley
f19a6f0dec Add tests for class_eval on Spree::Calculator private method #line_items_for 2019-06-25 12:19:16 +01:00
Matt-Yorkley
0a155da273 Avoid undefined method 'order' errors when removing lineitems from basket 2019-06-25 11:13:56 +01:00
François Turbelin
c0d02c8d42 Fix errors while relauching container 2019-06-25 12:05:26 +02:00
François Turbelin
e68d72c0dd Update DOCKER.md 2019-06-25 11:47:54 +02:00
Matt-Yorkley
034e8b180a Use let for CSV data 2019-06-25 10:24:53 +01:00
Matt-Yorkley
ead0e1c08d Store attributes list in constant 2019-06-25 10:20:59 +01:00
Matt-Yorkley
8dfb628d88 Add test for ignoring non-updatable description field in validations when updating 2019-06-25 10:19:05 +01:00
Matt-Yorkley
85b3d7dac5 Move attribute check to method 2019-06-25 10:19:05 +01:00
Matt-Yorkley
84040fd2a6 Allow import to proceed when updating a product and description is set 2019-06-25 10:19:05 +01:00
François Turbelin
5dcf456c90 Remove old Rake task for sample data 2019-06-25 11:18:48 +02:00
François Turbelin
79ec3d5a3f Remove extra copy on Docker file 2019-06-25 11:18:48 +02:00
François Turbelin
e893197c49 Use example files instead of extra Docker ones 2019-06-25 11:18:48 +02:00
Matt-Yorkley
60e67ae1a4 Run all setup steps on startup
It's a bit dirty, but it works :)
2019-06-25 11:18:48 +02:00
Matt-Yorkley
53a0f70aa0 Add default login details via ENV vars 2019-06-25 11:18:48 +02:00
Matt-Yorkley
64d6ae445b Change postgres repo from precise to bionic 2019-06-25 11:18:48 +02:00
Matt-Yorkley
5712f67673 Remove phantomjs from dependencies 2019-06-25 11:18:48 +02:00
François Turbelin
9c45444ea6 Clean database.docker.yml file 2019-06-25 11:18:48 +02:00
François Turbelin
4e41a73c4f Enhance Dockerfile 2019-06-25 11:18:48 +02:00
François Turbelin
75267268d7 Update Postgres to 9.5 2019-06-25 11:18:48 +02:00
François Turbelin
7455053879 Update DOCKER.md file 2019-06-25 11:18:48 +02:00
François Turbelin
c5addb8c1d Fix comment spacings, gloupsss 2019-06-25 11:18:48 +02:00
François Turbelin
e5d4b216ba Add DOCKER.md file as documentation 2019-06-25 11:18:48 +02:00
François Turbelin
b4fe44510b Tune up the Rake task 2019-06-25 11:18:48 +02:00
François Turbelin
9df5d78f27 Add a Rake task in order to setup dev env 2019-06-25 11:18:48 +02:00
François Turbelin
f9d72e10d5 Add Docker configuration 2019-06-25 11:18:48 +02:00
Maikel
723499332a Merge pull request #3006 from mkllnk/i18n-error-detection
Raise error on missing translation keys
2019-06-25 16:13:15 +10:00
Maikel Linke
6a06e0ac3b Raise error on missing translation keys 2019-06-25 15:06:56 +10:00
Luis Ramos
5600102729 Merge pull request #3876 from luisramos0/3804_insuf_stock
3804 Fix editing cart when variant on_demand but its on_hand value is zero or negative
2019-06-24 22:24:15 +01:00
luisramos0
a6ea975848 Fix editing cart when variant on_demand but on_hand is zero or negative 2019-06-24 22:07:46 +01:00
Luis Ramos
57917a498b Merge pull request #3946 from luisramos0/missing_translatiojns
Fix last missing translations covered by specs
2019-06-24 20:52:59 +01:00
Luis Ramos
b30da27e92 Merge pull request #3950 from openfoodfoundation/dependabot/bundler/stripe-4.19.0
Bump stripe from 4.18.1 to 4.19.0
2019-06-24 20:44:57 +01:00
Maikel Linke
1e1e88fe51 Rescue checkout on shipping id conflict
Helps to investigate https://github.com/openfoodfoundation/openfoodnetwork/issues/3924

A better solution would be to move the update of shipments out of the
after_save callback and deal with it in controllers. Unfortunately,
that's a big and tricky task.

Since this exception is causing a lot of pain for some Australian
farmers, I introduced more logging here to understand the problem
better. The issue was observed in OFN v1 and may disappear with v2. But
we don't know that and should monitor it.
2019-06-21 16:05:54 +10:00
Maikel
e4c3c1664a Merge pull request #3943 from jonleighton/issue-2112
Bring back ‘Shop for X products at:’ title
2019-06-21 15:06:21 +10:00
Maikel
5b0c8bbaef Merge pull request #3836 from Matt-Yorkley/fast_and_furious2
Improve /shops, /producers, and /groups performance
2019-06-21 15:02:19 +10:00
Maikel
71f396a44f Merge pull request #3896 from luisramos0/clear_unit_desc
Clear product.variants.unit_description if product.variant_unit is items
2019-06-21 15:00:06 +10:00
Maikel
eb162f6b29 Merge pull request #3934 from openfoodfoundation/dependabot/bundler/activerecord-import-1.0.2
Bump activerecord-import from 1.0.1 to 1.0.2
2019-06-21 14:59:03 +10:00
Maikel
5aea361d87 Merge pull request #3709 from luisramos0/2-0-prepare-4-rails-4
Start upgrade to Rails 4
2019-06-21 14:58:24 +10:00
Maikel
3721c017fa Merge pull request #3670 from luisramos0/2-0-without-spree-fe-assets
[Spree Upgrade] Remove dependency to spree frontend - routes and controllers
2019-06-21 14:57:03 +10:00
Maikel
12f0ed9955 Merge pull request #3940 from luisramos0/zones
Remove matching of shipping method zone to user address on checkout
2019-06-21 14:43:40 +10:00
Maikel
4c4881430c Merge pull request #3908 from kristinalim/fix/3843-unit_type_in_product_import
3877,3843 Improve handling of units and unit type in product import
2019-06-21 14:43:01 +10:00
luisramos0
bcc02f35e7 Add new preference to invoice settings: enable invoices 2019-06-19 13:29:30 +01:00
Matt-Yorkley
08b2b19d5e Improve handling of invalid characters in uploaded CSV files 2019-06-19 09:29:59 +01:00
Maikel Linke
cccd35fdf3 Remove retries from previously flaky specs
It's not acceptable to have flaky specs that only pass once in three
tries. Our specs might be more stable now that we use Chrome as test
browser. Otherwise we have to find out why these specs are not stable.
It might be an important bug that happens only sometimes.
2019-06-19 16:48:04 +10:00
Maikel Linke
d8ece7cd8b First stored credit card becomes default again
A user can store their credit card when checking out. Due to a bug in
https://github.com/openfoodfoundation/openfoodnetwork/pull/3840 it
didn't become the default card any more. This behaviour is now restored.
If there is not default card yet, a new card added during checkout
becomes the default card.
2019-06-19 15:43:38 +10:00
Maikel Linke
ee65d70eec Deal with empty payments sequence
The task was crashing when there were no payments in the query range.
2019-06-19 09:58:47 +10:00
Matt-Yorkley
ab1ed53507 Merge pull request #3955 from openfoodfoundation/remove-travis-leftover
No need to keep old and used Travis config file
2019-06-18 16:48:13 +01:00
luisramos0
2b3865855d Simplify shipping_method.include? method 2019-06-18 11:42:34 +01:00
luisramos0
1da18d3386 Fix enterprise model scopes by making ready_for_checkout return enterprises and not ids again and by making not_ready_for_checkout select the id field from the ready_for_checkout scope 2019-06-18 10:52:56 +01:00
luisramos0
b025df1798 Fix a few more rubocop issues 2019-06-18 10:52:56 +01:00
luisramos0
178924af5d Fix long lines in order_cycle model 2019-06-18 10:52:45 +01:00
luisramos0
bb1f7fde2f Remove unused routes related to taxons
t/products was already an old route 4 years ago and t/*id is not currently working in master
2019-06-18 10:49:20 +01:00
luisramos0
c61e7a1672 Remove unused routes
This fix is in spree 2.1 here: ba420fe70e
2019-06-18 10:49:20 +01:00
luisramos0
3c964933b1 Remove stub of a deleted method #deadcode 2019-06-18 10:49:20 +01:00
luisramos0
e7b625edcf Remove spree locale route
This route is not used, ofn code uses query param locale that is picked up in base controller set_locale
2019-06-18 10:49:20 +01:00
luisramos0
eab6cc563b Fix rubocop issues 2019-06-18 10:49:20 +01:00
luisramos0
8daf9b9247 Revert fix in previous commit (orders/populate route used in product import view) and adding a simple fix by setting the product import route to use in the form 2019-06-18 10:49:20 +01:00
luisramos0
5ba0f906a1 For some reason we need the orders populate route to make product import routes work 2019-06-18 10:49:20 +01:00
luisramos0
35c8236c21 Add missing datepicker/cal.gif to ofn assets 2019-06-18 10:49:20 +01:00
luisramos0
b397a8e661 Remove spree_frontend and spree_sample from ofn's gemfile
spree_frontend will only be removed from gemfile.lock when spree_auth_devise is removed from OFN
2019-06-18 10:49:20 +01:00
luisramos0
61def8f2e7 Convert match routes to get routes to be compatible with rails 4 2019-06-18 10:49:20 +01:00
luisramos0
4ff0bf8162 Change gemfile to depend on the different spree gems, not spree as a whole 2019-06-18 10:49:20 +01:00
luisramos0
02b9fca620 Remove unused spree checkout and spree cart routes 2019-06-18 10:49:19 +01:00
luisramos0
40f7d07e27 Remove unnecessary method from spree storecontroller and spree orderscontroller 2019-06-18 10:47:34 +01:00
luisramos0
c56486d7ae Remove unnecessary methods from spree checkoutcontroller 2019-06-18 10:47:34 +01:00
luisramos0
56db90f49e Remove unused checkout controller update action and order controller populate action
Additionally, remove routes of these actions as well as routes already defined in routes.rb (checkout and cart)
2019-06-18 10:47:34 +01:00
luisramos0
a8b4037885 Remove dependency to coupon code logic in checkoutcontroller, ofn doesnt have that feature 2019-06-18 10:47:34 +01:00
luisramos0
fc145d472d Add home controller to ofn codebase from spree frontend 2019-06-18 10:47:34 +01:00
luisramos0
5037cce6f5 Add all the code missing from checkout, order and store controllers to ofn controllers 2019-06-18 10:47:34 +01:00
luisramos0
c399491314 Move spree frontend routes to ofn and transform decorators with class_eval to controller classes 2019-06-18 10:47:34 +01:00
luisramos0
c15c5435ff Fix long lines in exchange model 2019-06-18 10:45:01 +01:00
luisramos0
0cdb49818d Remove distinct from enterprise.ready_for_checkout scope
Adapt use of enterprise scope not_ready_for_checkout to rails 4 by adding enterprises table alias to selected field id
2019-06-18 10:40:49 +01:00
luisramos0
9548f5c5f7 Adapt order_cycle scopes to rail 4 2019-06-18 10:40:49 +01:00
luisramos0
ba91abd20e Adapt exchanges.with_any_variant scope to rails 4 2019-06-18 10:40:49 +01:00
luisramos0
0d07bf2a3b Adapt enterprise.distributing_products scope to rails 4 2019-06-18 10:40:49 +01:00
luisramos0
07a6e62d09 Adapt query in product destroy process to rails 4 2019-06-18 10:40:49 +01:00
luisramos0
e9667ab289 Adapt product.managed_by scope to rails 4 2019-06-18 10:40:49 +01:00
Pau Perez
d003ba81e3 No need to keep old and used Travis config file
If we ever want to come back to Travis we just need to do a git revert.
Meanwhile, no need to care about it.
2019-06-18 11:12:14 +02:00
Luis Ramos
a783f4609a Merge pull request #3942 from jonleighton/exit-if-no-nodenv
Exit script/setup if node is not found
2019-06-17 22:10:44 +01:00
dependabot-preview[bot]
756b3ec73b Bump stripe from 4.18.1 to 4.19.0
Bumps [stripe](https://github.com/stripe/stripe-ruby) from 4.18.1 to 4.19.0.
- [Release notes](https://github.com/stripe/stripe-ruby/releases)
- [Changelog](https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stripe/stripe-ruby/compare/v4.18.1...v4.19.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-17 19:19:17 +00:00
Luis Ramos
d9b47ad1b3 Merge pull request #3944 from openfoodfoundation/transifex
Transifex
2019-06-17 16:39:25 +01:00
luisramos0
0235a04530 Add missing translation key in user sessins controller 2019-06-17 15:48:52 +01:00
luisramos0
043abdef39 Add missing translations in the account confirmation process 2019-06-17 15:48:52 +01:00
luisramos0
b372e131a1 Add missing translation key in Spree.
This was fixed in spree 2.1, 7de7fcd502
2019-06-17 15:48:52 +01:00
luisramos0
642d3cbfbd Fix translation key namespace in subs order confirm email subject 2019-06-17 15:48:52 +01:00
Transifex-Openfoodnetwork
930de1b6a2 Updating translations for config/locales/en_ZA.yml 2019-06-17 20:33:27 +10:00
Pau Pérez Fabregat
e3db218e7c Merge pull request #3941 from luisramos0/enza
Add en_ZA.yml copied from en_GB.yml as requested by instance manager
2019-06-17 11:54:09 +02:00
Jon Leighton
fcff302d55 Bring back ‘Shop for X products at:’ title
Fixes #2112

It looks like this bug was accidentally introduced during a refactor in
e5ca494db8. The `bo-html` attribute was
replaced with `ng-html`, but it appears that it should actually have
used `ng-bind-html`
(https://docs.angularjs.org/api/ng/directive/ngBindHtml) because the
former is not a valid AngularJS directive.

It was also necessary to bubble up the `.cta-container` class in order to
get the appropriate styling on the title.
2019-06-17 15:43:15 +10:00
Jon Leighton
150310bf67 Exit script/setup if node is not found
This mirrors what the script already does if ruby is not found
2019-06-17 11:26:54 +10:00
luisramos0
926fc5ee43 Add en_ZA.yml copied from en_GB.yml as requested by instance manager 2019-06-16 20:43:20 +01:00
luisramos0
ccc7a43a06 Bypass validation of shipping methods zone on checkout 2019-06-15 21:11:51 +01:00
luisramos0
e4fcaa5992 Fix typo in package.rb 2019-06-15 20:45:57 +01:00
Luis Ramos
b1d4461c77 Merge pull request #3936 from luisramos0/factories_refactor
Extract factories to separate files and fix rubocop issues
2019-06-14 22:28:55 +01:00
Pau Pérez Fabregat
45c77196b3 Merge pull request #3935 from mkllnk/update-rubocop-style
Update rubocop style
2019-06-14 19:52:22 +02:00
luisramos0
13d41dc1aa Remove duplicate modify entry in factories 2019-06-14 13:59:24 +01:00
luisramos0
5ca382be42 Remove spec/factories.rb from rubocop exceptions, it doesnt look like a problem any longer 2019-06-14 13:55:47 +01:00
luisramos0
3259db69f0 Remove unnecessary code, this code as been accepted in spree code base and included in spree v1.2 2019-06-14 13:43:30 +01:00
luisramos0
6efb71d903 Fix more rubocop issues in spec/factories 2019-06-14 13:42:27 +01:00
Luis Ramos
91401446a5 Merge pull request #3915 from mkllnk/3844-permalink-conflicts
Consider deleted products when creating permalinks
2019-06-14 13:20:35 +01:00
luisramos0
59593c824a Fix rubocop issues in different factories 2019-06-14 13:10:53 +01:00
luisramos0
79cf03b124 Fix rubocop issues in spec/factories 2019-06-14 13:01:08 +01:00
luisramos0
a6b3c26bbe Extract users factories to separate file 2019-06-14 12:50:26 +01:00
luisramos0
8345765ada Extract tag rules factories to separate file 2019-06-14 12:49:17 +01:00
luisramos0
03fb33ba86 Extract variant factory modify to separate file 2019-06-14 12:48:04 +01:00
luisramos0
2c8ce6e4e5 Extract products factories to separate file 2019-06-14 12:45:55 +01:00
luisramos0
3e10c703bf Extract shipments factories to separate file 2019-06-14 12:43:07 +01:00
luisramos0
42f8b2efed Fix static file path in order_cycle_factory 2019-06-14 12:30:36 +01:00
luisramos0
bd493c392a Extract shipping_methods factories to separate file 2019-06-14 12:25:10 +01:00
luisramos0
dc701f55b3 Extract calculators factories to separate file 2019-06-14 12:23:32 +01:00
luisramos0
06e3328ce2 Extract orders factories to separate file 2019-06-14 12:17:24 +01:00
luisramos0
91fcb7c7c4 Extract enterprises factories to separate file 2019-06-14 12:12:45 +01:00
luisramos0
42f2e78b10 Extract subscriptions factories to separate file 2019-06-14 12:10:54 +01:00
luisramos0
0501859c23 Extract order_cycle factories to separate file 2019-06-14 12:10:27 +01:00
luisramos0
a7c970054c Add rescue in product controller create action to avoid server error and send appropriate error message to client when product image upload fails 2019-06-14 10:20:28 +01:00
luisramos0
c97925aa4a Improve message in private shopfront when closed or when user is not logged in 2019-06-14 10:13:33 +01:00
Maikel
5e89c54144 Merge pull request #3931 from openfoodfoundation/RachL-patch-1-3
Update README.md
2019-06-14 14:20:22 +10:00
Maikel
2307df980c Merge pull request #3930 from openfoodfoundation/transifex
Transifex
2019-06-14 14:19:13 +10:00
Maikel Linke
b5f3f98f87 Make BlockLength style apply to all files except todo list 2019-06-14 11:49:27 +10:00
Maikel Linke
ac79e44d9a Fix current rubocop violations 2019-06-14 11:40:09 +10:00
Maikel Linke
bf8a31abda Add rake task to report lost payments
In rare cases, payment records can get lost through database rollbacks.
This new rake task tries to find log entries for lost transactions and
reports them as CSV.
2019-06-14 11:10:31 +10:00
Transifex-Openfoodnetwork
f0977f3c39 Updating translations for config/locales/nb.yml 2019-06-14 08:08:37 +10:00
dependabot-preview[bot]
16ad94f3a8 Bump activerecord-import from 1.0.1 to 1.0.2
Bumps [activerecord-import](https://github.com/zdennis/activerecord-import) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/zdennis/activerecord-import/releases)
- [Changelog](https://github.com/zdennis/activerecord-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zdennis/activerecord-import/compare/v1.0.1...v1.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-13 19:23:40 +00:00
luisramos0
6223a738a7 Fix rubocop issues in collapsible.css 2019-06-13 19:32:33 +01:00
luisramos0
a370216f54 Change default translation in the registration introduction so that it looks better when collapsed 2019-06-13 19:28:31 +01:00
luisramos0
473fb45132 Remove an extra break line to remove html space and make sure alignment is correct 2019-06-13 19:28:10 +01:00
luisramos0
ae0563a58f Merge branch 'master' into 1766-registration-scroll 2019-06-13 19:10:05 +01:00
Luis Ramos
2b593a59f5 Merge pull request #3900 from luisramos0/subs_trans
Missing translations in Subscriptions
2019-06-13 18:51:20 +01:00
Rachel Arnould
d3cb106ae4 Update README.md
In order to benefit from a free unlimited account at Browser stack, they asked us to 
*Give us a shoutout on your GitHub project page. Post an hyperlink and a line about how you use BrowserStack.*
2019-06-13 18:58:58 +02:00
Luis Ramos
ddfd14ebb3 Merge pull request #3905 from openfoodfoundation/dependabot/bundler/i18n-js-3.3.0
Bump i18n-js from 3.2.2 to 3.3.0
2019-06-13 17:33:50 +01:00
luisramos0
1db220e1e0 Remove unnecessary referer setting from products controller spec 2019-06-13 17:22:09 +01:00
Luis Ramos
29bc961e8a Merge pull request #3890 from luisramos0/transl_prod_page
Add missing translation keys to the create product page
2019-06-13 17:13:40 +01:00
Transifex-Openfoodnetwork
216e181c6e Updating translations for config/locales/en_GB.yml 2019-06-14 01:53:18 +10:00
Transifex-Openfoodnetwork
b65b94b6f9 Updating translations for config/locales/en_GB.yml 2019-06-14 01:50:11 +10:00
Luis Ramos
85ee1e7806 Merge pull request #3889 from luisramos0/tag_rules_transl
Fix missing translations in tag rules management page
2019-06-13 16:15:49 +01:00
Luis Ramos
7d24bcf868 Merge pull request #3798 from m-budryte/order_cycles_add_fee_remove_link
the translations for Remove in the exchange forms added
2019-06-13 16:15:28 +01:00
Luis Ramos
1df1ba9403 Merge pull request #3888 from luisramos0/translations
Add translation keys to actions in the order payments list page
2019-06-13 15:36:43 +01:00
Luis Ramos
e15ccdbd74 Merge pull request #3840 from mkllnk/3727-default-credit-cards
Make only reusable credit cards the default card
2019-06-13 14:13:32 +01:00
Luis Ramos
1a2703f630 Merge pull request #3886 from luisramos0/fees_translations
Make a few more things translatable in the Enterprise Fees management page
2019-06-13 14:12:16 +01:00
Luis Ramos
09a5426095 Merge pull request #3880 from kristinalim/fix/3792-optimize_order_cycle_variant_updates
3792 Optimize saving Order Cycle changes
2019-06-13 12:33:22 +01:00
Luis Ramos
bb7a2d7a5e Merge pull request #3252 from mllocs/fix/navbar-right-items-styles
Top navbar redesign and cleanup
2019-06-13 12:04:20 +01:00
Pau Pérez Fabregat
080689ccfa Merge pull request #3917 from luisramos0/subs_visible
Make subs radio button visible to all managers
2019-06-12 16:42:31 +02:00
Matt-Yorkley
41a36bb704 Update all locales with the latest Transifex translations 2019-06-12 13:54:41 +01:00
Luis Ramos
7cae7ca520 Merge pull request #3897 from openfoodfoundation/dependabot/bundler/fuubar-2.4.0
Bump fuubar from 2.3.2 to 2.4.0
2019-06-12 13:29:04 +01:00
Luis Ramos
05856c44dd Merge pull request #3906 from openfoodfoundation/dependabot/bundler/webmock-3.6.0
Bump webmock from 3.5.1 to 3.6.0
2019-06-12 13:28:36 +01:00
Luis Ramos
b02bf3b83c Merge pull request #3872 from luisramos0/rails4_where_scope
[Rails 4] Change all model scopes without a callable object to use a proc
2019-06-12 12:53:10 +01:00
Matt-Yorkley
48ebfbee90 Merge pull request #3902 from openfoodfoundation/transifex
Transifex
2019-06-12 10:02:40 +01:00
Matt-Yorkley
785595a951 Reduce initial queries on shop page by ~95% 2019-06-12 09:47:01 +01:00
Matt-Yorkley
0aa8b1a30e Make shop hidden ams injection consistent with other uses 2019-06-12 09:47:01 +01:00
Matt-Yorkley
874fb884b8 Refactor Angular controllers further 2019-06-12 09:47:01 +01:00
Matt-Yorkley
a91ae8947b Only query visible enterprises 2019-06-12 09:47:01 +01:00
Matt-Yorkley
11e83af0b6 Remove duplication of enterprise angular controllers
We can re-use the enterprise and producers controllers here in their respective groups tabs, no need for a third controller
2019-06-12 09:47:01 +01:00
Matt-Yorkley
9703d848ef Improve syntax in injection_helper 2019-06-12 09:47:01 +01:00
Matt-Yorkley
4155b17633 Remove tests that reference removed code 2019-06-12 09:47:01 +01:00
Matt-Yorkley
d5bd058754 Fix groups show page
It can definitely be cleaned up more in the future, but this should get us around a 90% reduction in page load times.
2019-06-12 09:47:01 +01:00
Matt-Yorkley
4ec46c2db6 Fix groups index page 2019-06-12 09:47:01 +01:00
Matt-Yorkley
aca1f92060 Adapt specs to new loading methods 2019-06-12 09:47:01 +01:00
Matt-Yorkley
1b8dfaf049 Fix HashNavigation reload bug 2019-06-12 09:47:01 +01:00
Matt-Yorkley
ae8f1a92e8 Remove "profiles" from /shops 2019-06-12 09:47:01 +01:00
Matt-Yorkley
698d3672a6 List only current taxons for active enterprises 2019-06-12 09:47:01 +01:00
Matt-Yorkley
ed97400a23 Improve producers performance 2019-06-12 09:47:01 +01:00
Matt-Yorkley
45d65baf8e Improve shops performance 2019-06-12 09:47:01 +01:00
Matt-Yorkley
e329b4bfb0 Improve queries for serializers 2019-06-12 09:47:01 +01:00
Pau Pérez Fabregat
99b82272cc Merge pull request #3883 from Matt-Yorkley/order_cycles_performance
Admin order cycles performance
2019-06-12 10:38:54 +02:00
Pau Pérez Fabregat
fd95ae7e41 Merge pull request #3847 from Matt-Yorkley/api_access
Allow unauthenticated access to OFN API endpoints
2019-06-12 09:45:11 +02:00
Maikel Linke
76d77ceb51 Update and generalise database mirror script
The old script was specfic to the use in Australia and out of date. The
new version isn't perfect but works well for me.
2019-06-12 10:19:56 +10:00
luisramos0
f23094df09 Fix file name of js unit test files in admin/order_cycles/controllers 2019-06-11 21:28:55 +01:00
luisramos0
9c539da811 Fix rubocop issue in schedules_controller.collection by extracting method 2019-06-11 21:28:55 +01:00
luisramos0
6cf705ea55 In the order cycle pages (both create and edit, both simple and normal), add OC coordinator to schedules request to the server and make the controller filter schedules of order cycles coordinated by that enterprise id. 2019-06-11 21:28:52 +01:00
Maikel Linke
d1901cbea4 Allow class_eval to have more than 25 lines 2019-06-11 18:01:41 +01:00
Maikel Linke
5c72c35060 Use better credit card factory for subs specs
The specs for subscriptions were creating simple one-time-use credit
cards. They should not be used for subscriptions. After this was fixed
in previous commits, these integration tests failed. Now we use a new
factory that mimics stored credit cards that can be used for
subscriptions.
2019-06-11 18:01:41 +01:00
Maikel Linke
b3b8cb778f Make only reusable credit cards the default card
https://github.com/openfoodfoundation/openfoodnetwork/issues/3727

When a user didn't have a default credit card and then checked out with
a credit card it became the default even when the user didn't intend to
store it. That lead to subscriptions trying to charge a one-time card
which fails.
2019-06-11 18:01:41 +01:00
luisramos0
d8a7f60f40 Make subs radio button visible to all managers 2019-06-11 17:21:13 +01:00
Maikel Linke
a10bb5acbd Consider deleted products when creating permalinks
https://github.com/openfoodfoundation/openfoodnetwork/issues/3844

Spree's implementation and our implementation to create a unique
permalink failed to notice conflicts with soft-deleted products. This
patch looks at deleted products as well.
2019-06-11 18:20:41 +10:00
Kristina Lim
cf11ef8ba2 Ignore parameter list length for ProductImport::EntryValidator
This can be done in a separate PR. More tests might be needed when
extracting to a class.
2019-06-10 04:20:04 +08:00
Kristina Lim
8c69ee67b8 Refactor code for validating variant in reference to existing product 2019-06-10 04:20:04 +08:00
Kristina Lim
70614de955 Require product import rows to match unit of preceding rows 2019-06-10 04:20:03 +08:00
Kristina Lim
5d282f7e9f Update code layout in ProductImporter method 2019-06-10 04:20:03 +08:00
Kristina Lim
73b388da87 Simplify product import all_entries method 2019-06-10 04:20:03 +08:00
Kristina Lim
38519b2bae Simplify building of product import entries for range 2019-06-10 04:19:50 +08:00
Kristina Lim
37101a6b64 Extract build_entries_from_rows for product import 2019-06-09 23:38:36 +08:00
dependabot-preview[bot]
e686c61962 Bump webmock from 3.5.1 to 3.6.0
Bumps [webmock](https://github.com/bblimke/webmock) from 3.5.1 to 3.6.0.
- [Release notes](https://github.com/bblimke/webmock/releases)
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bblimke/webmock/compare/v3.5.1...v3.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-06 19:21:33 +00:00
dependabot-preview[bot]
93811a6d8f Bump i18n-js from 3.2.2 to 3.3.0
Bumps [i18n-js](https://github.com/fnando/i18n-js) from 3.2.2 to 3.3.0.
- [Release notes](https://github.com/fnando/i18n-js/releases)
- [Changelog](https://github.com/fnando/i18n-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fnando/i18n-js/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-06 19:19:50 +00:00
Luis Ramos
568e3003ba Merge pull request #3882 from kristinalim/feature/3408-enable_enterprise_fee_summary_for_non_superadmin
3408 Remove feature flag for Enterprise Fee Summary
2019-06-06 16:28:36 +01:00
Transifex-Openfoodnetwork
ec898a8127 Updating translations for config/locales/en_US.yml 2019-06-06 23:03:05 +10:00
Transifex-Openfoodnetwork
ddab3ba074 Updating translations for config/locales/en_US.yml 2019-06-06 22:59:56 +10:00
Luis Ramos
e2b506294d Merge pull request #3870 from openfoodfoundation/dependabot/bundler/jwt-2.2.1
Bump jwt from 2.1.0 to 2.2.1
2019-06-05 20:48:38 +01:00
Luis Ramos
78f0164f5b Merge pull request #3881 from openfoodfoundation/dependabot/bundler/stripe-4.18.1
Bump stripe from 4.11.0 to 4.18.1
2019-06-05 20:48:12 +01:00
Transifex-Openfoodnetwork
2b9ff963da Updating translations for config/locales/en_GB.yml 2019-06-06 05:03:44 +10:00
Transifex-Openfoodnetwork
3100781f27 Updating translations for config/locales/en_GB.yml 2019-06-06 05:00:36 +10:00
Pau Pérez Fabregat
5028c9d283 Merge pull request #3899 from openfoodfoundation/transifex
Transifex
2019-06-05 12:28:12 +02:00
luisramos0
ff2901a9d1 Add address suburb translation key to fix edit subscription address page
Keeping these in the root of the translations file so that they can be used in other places later
2019-06-04 20:59:45 +01:00
luisramos0
9944f3e1e6 Make translations of tooltips in subscriptions list page work again 2019-06-04 20:59:45 +01:00
luisramos0
cfcf73b6a1 Make save and saving messages translatable in subscriptions items panel 2019-06-04 20:59:45 +01:00
luisramos0
eb42e81afc Make some text entries translatable in create subscription pages: title in step 1 details and 4 review and date placeholders in step 1 details 2019-06-04 20:59:45 +01:00
luisramos0
64af81a4a2 Make search_by_email text translatable in subscriptions list page 2019-06-04 20:59:42 +01:00
Transifex-Openfoodnetwork
215f6e92f2 Updating translations for config/locales/fr.yml 2019-06-05 02:44:40 +10:00
Luis Ramos
fd64e53f61 Merge pull request #3841 from luisramos0/2-0-fix-ship-methods-translations
Move shipping methods translations to lazy lookups
2019-06-04 15:15:31 +01:00
Luis Ramos
4dcf309910 Merge pull request #3884 from luisramos0/3879_ship_cats
Remove matching of product shipping category with shipping method's category on checkout
2019-06-03 22:53:13 +01:00
dependabot-preview[bot]
1b92b126c8 Bump fuubar from 2.3.2 to 2.4.0
Bumps fuubar from 2.3.2 to 2.4.0.
2019-06-03 19:17:54 +00:00
Matt-Yorkley
98d1cbec8c Update all locales with the latest Transifex translations 2019-06-02 18:06:51 +01:00
Kristina Lim
2c52c1a6fc Remove unused argument from Spree::Ability method 2019-06-02 01:30:46 +08:00
luisramos0
1a4e83d633 Change products controller to clear variants unit description if variant_unit is items 2019-06-01 16:56:17 +01:00
luisramos0
9078a1edaa Add missing translation keys to the create product page: fields names displayed in error messages 2019-05-30 23:50:51 +01:00
luisramos0
32c107ab5a move translation to use relative path so that the new translation key is used 2019-05-30 23:26:23 +01:00
Masha
fbf52dd1f9 removed translations that are not required, left exchange_form.remove key but reference a global remove in the table 2019-05-30 23:08:05 +01:00
Masha
436a2ba0a2 went much shorted way 2019-05-30 23:08:05 +01:00
Masha
412fffba1d the translations for Remove in the exchange forms added 2019-05-30 23:08:05 +01:00
Pau Pérez Fabregat
ada640b159 Merge pull request #3850 from lin-d-hop/update-readme
Update outdated things on the README
2019-05-30 23:56:36 +02:00
luisramos0
5024da4123 Make tag rules type descriptions in the management page translatable 2019-05-30 20:39:58 +01:00
luisramos0
6620243603 Make the submit button on the add tag rule dialog translatable 2019-05-30 20:22:02 +01:00
luisramos0
48361b146c Add translation keys to actions in the order payments list page 2019-05-30 20:13:17 +01:00
luisramos0
1d4529092f Make fee type options in enterprise fees page translatable 2019-05-30 00:46:20 +01:00
luisramos0
6e08310744 Make the fields in the column calculator values in the enterprise fees page translatable for all fields of all current calculators 2019-05-29 21:57:03 +01:00
luisramos0
5719455731 Make enterprise fees name placeholder translatable 2019-05-29 21:33:30 +01:00
luisramos0
c5a95dee79 Remove matching of product shipping category with shipping method's category to allow users to checkout products with categories not supported by the shipping methods.
See issue #3884 for more details.
2019-05-29 14:43:19 +01:00
Matt-Yorkley
563f9a4f5f Remove another N+1 2019-05-29 12:28:56 +01:00
Luis Ramos
187fbd788b Merge pull request #3873 from Matt-Yorkley/branding
Use OFN logo in admin area
2019-05-29 10:12:48 +01:00
Matt-Yorkley
2dd4c1ccaf Cut OC edit #for_order_cycle queries in half 2019-05-29 10:01:46 +01:00
Matt-Yorkley
8733036fb0 Remove 2 N+1s, reduce queries in #visible action ~90% 2019-05-29 10:01:44 +01:00
Matt-Yorkley
c0a40c616b Use devise's check_authorization and skip_authorization_check 2019-05-28 22:02:18 +01:00
Luis Ramos
88f109da67 Merge pull request #3868 from luisramos0/delete-en-us
Remove unused en-US locale file
2019-05-28 20:06:07 +01:00
Kristina Lim
ecea0600b6 Remove feature flag for Enterprise Fee Summary 2019-05-29 02:50:41 +08:00
Kristina Lim
93850d4317 Merge pull request #3846 from luisramos0/transpec_features
Transpec spec/features
2019-05-29 01:17:30 +08:00
luisramos0
79f16e0ea3 Run transpec in spec/features/consumer/external_services_spec.rb 2019-05-28 17:04:06 +01:00
luisramos0
7397ab4fd8 Run transpec in spec/features/admin/payment_method_spec.rb 2019-05-28 17:04:06 +01:00
luisramos0
ec7e92202b Run transpec in spec/features/admin/enterprise_user_spec.rb and spec/features/admin/overview_spec.rb 2019-05-28 17:04:06 +01:00
luisramos0
9a21ca38e1 Run transpec in a few more spec/features/admin specs 2019-05-28 17:04:06 +01:00
luisramos0
d2f62f86a9 Run transpec in a few spec/features/admin specs 2019-05-28 16:59:51 +01:00
luisramos0
80537e7e01 Run transpec in spec/features/admin/image_settings_spec.rb 2019-05-28 16:57:11 +01:00
luisramos0
7f43a66fb3 Run transpec in spec/features/admin/adjustments_spec 2019-05-28 16:57:11 +01:00
luisramos0
f2bfb9bedb Fix rubocop issues in adjustment_decorator, line_item_decorator and product_decorator 2019-05-28 16:50:59 +01:00
luisramos0
ced6264846 Fix rubocop issues in enterprise model 2019-05-28 16:30:50 +01:00
luisramos0
f58d9ec790 Fix rubocop issues in exchange model 2019-05-28 16:10:40 +01:00
luisramos0
06c0b1375b Fix rubocop issues in enterprise_relationship model 2019-05-28 16:07:10 +01:00
luisramos0
ffbd79d3dd Change all model scopes without a callable object to use a proc 2019-05-28 15:55:13 +01:00
Kristina Lim
99f163d294 Make code style changes for spec file 2019-05-28 21:32:25 +08:00
Kristina Lim
75fdfb3c6a Remove some usage of guard clauses for OC update 2019-05-28 21:32:25 +08:00
Kristina Lim
56a2347ea0 Extract removal of unauthorized OC exchange attributes to method 2019-05-28 21:29:20 +08:00
Kristina Lim
ea8d189d6c Bulk update OC variant changes in OC form 2019-05-28 21:27:43 +08:00
Kristina Lim
bc6f14105e Require spec_helper.rb in spec file for OC form applicator 2019-05-28 21:26:33 +08:00
Kristina Lim
9def777d02 Install activerecord-import gem 2019-05-28 21:26:32 +08:00
dependabot-preview[bot]
0b6eaa8d02 Bump jwt from 2.1.0 to 2.2.1
Bumps [jwt](https://github.com/jwt/ruby-jwt) from 2.1.0 to 2.2.1.
- [Release notes](https://github.com/jwt/ruby-jwt/releases)
- [Changelog](https://github.com/jwt/ruby-jwt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jwt/ruby-jwt/compare/v2.1.0...v2.2.1)
2019-05-28 13:10:44 +00:00
dependabot-preview[bot]
df2553eac5 Bump stripe from 4.11.0 to 4.18.1
Bumps [stripe](https://github.com/stripe/stripe-ruby) from 4.11.0 to 4.18.1.
- [Release notes](https://github.com/stripe/stripe-ruby/releases)
- [Changelog](https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stripe/stripe-ruby/compare/v4.11.0...v4.18.1)
2019-05-28 13:10:43 +00:00
Luis Ramos
6a0925539f Merge pull request #3842 from luisramos0/rubocop-line-length
Fix a few rubocop warnings manually and run rubocop autocorrect
2019-05-28 14:08:16 +01:00
luisramos0
d10f9a1a43 Rebuilding rubocop_todo auto after all the fixes 2019-05-28 12:57:29 +01:00
luisramos0
07854cf372 Fix a few problems introduced by rubocop auto correct 2019-05-28 12:57:29 +01:00
luisramos0
86b0d71c7e Result of rubocop auto-correct and rebuilding rubocop_manual_todo 2019-05-28 12:57:29 +01:00
luisramos0
4a67acf954 Removing a few rubocop warnings 2019-05-28 12:55:17 +01:00
Luis Ramos
31098218d2 Merge pull request #3856 from Drumstickx/master
Fixed sql injection vulnerability in users_and_enterprises_report.
2019-05-28 10:32:27 +01:00
Luis Ramos
9ccf502365 Merge pull request #3797 from lin-d-hop/variant-master-price
Remove non-functional Price field from Edit Product screen
2019-05-28 10:30:05 +01:00
Luis Ramos
de5eeeb6f2 Merge pull request #3812 from openfoodfoundation/dependabot/bundler/unicorn-5.5.1
Bump unicorn from 5.5.0 to 5.5.1
2019-05-27 13:06:58 +01:00
dependabot-preview[bot]
09d4ab9f0d Bump unicorn from 5.5.0 to 5.5.1
Bumps [unicorn](https://bogomips.org/unicorn/) from 5.5.0 to 5.5.1.

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-27 09:22:42 +00:00
Pau Pérez Fabregat
2d3bd7f471 Merge pull request #3828 from eelcodevlieger/webdrivers
Webdrivers
2019-05-27 11:20:04 +02:00
Pau Pérez Fabregat
018b019f10 Merge pull request #3865 from mkllnk/438-aus-locale
Add Australian English locale
2019-05-27 11:11:04 +02:00
Pau Pérez Fabregat
6aa039876d Merge pull request #3809 from openfoodfoundation/dependabot/bundler/jquery-rails-3.0.4
Bump jquery-rails from 3.0.0 to 3.0.4
2019-05-27 10:40:44 +02:00
Pau Pérez Fabregat
6b08e2ab2c Merge pull request #3864 from openfoodfoundation/disable-harmful-rake-tasks-in-production
Disable harmful rake tasks in production
2019-05-27 10:36:07 +02:00
Matt-Yorkley
099914be40 Use OFN logo in admin area 2019-05-27 02:20:04 +01:00
luisramos0
4143c50b1f Move joyride translations to the correct path 2019-05-24 23:54:00 +01:00
luisramos0
dc32d282a6 Fix some rubocop issues in menu css file 2019-05-24 23:54:00 +01:00
luisramos0
2654db7c82 Add new menu style as per design 2019-05-24 23:53:56 +01:00
dependabot-preview[bot]
1a9ad4fcbc Bump jquery-rails from 3.0.0 to 3.0.4
Bumps [jquery-rails](https://github.com/rails/jquery-rails) from 3.0.0 to 3.0.4.
- [Release notes](https://github.com/rails/jquery-rails/releases)
- [Changelog](https://github.com/rails/jquery-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rails/jquery-rails/compare/v3.0.0...v3.0.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-24 20:40:14 +00:00
Luis Ramos
655c54f367 Merge pull request #3835 from openfoodfoundation/dependabot/bundler/i18n-js-3.2.2
Bump i18n-js from 3.2.1 to 3.2.2
2019-05-24 21:38:16 +01:00
luisramos0
0dc0776705 Separate mobile menu cart code from large menu cart code 2019-05-24 15:17:41 +01:00
luisramos0
ec9d50c824 Add new cart icon and extract cart joyride from cart haml file 2019-05-24 15:16:36 +01:00
luisramos0
60c08347a5 Extract language selector from large menu haml file, add language name and clean up the code that generates the shopping@ label 2019-05-24 15:12:31 +01:00
Luis Ramos
b6a456cb67 Merge pull request #3863 from mkllnk/quiet-cron
Make inserting delayed jobs from cron quiet
2019-05-24 14:50:19 +01:00
Luis Ramos
db0c874622 Merge pull request #3669 from luisramos0/2-0-without-spree-fe-views
[Spree Upgrade] Remove dependency to spree frontend - views and assets
2019-05-24 14:37:34 +01:00
luisramos0
97f09c672a Remove unused en-US locale file 2019-05-24 10:11:44 +01:00
Pau Pérez Fabregat
1d72d461df Merge pull request #3866 from openfoodfoundation/transifex
Transifex
2019-05-24 10:10:10 +02:00
luisramos0
5858a83239 Simplify spec_helper config to make file downloads work in headless chrome 2019-05-23 20:31:52 +01:00
Luis Ramos
4a321f200f Merge pull request #3783 from kristinalim/fix/3782-missing_translation
3782 Fix missing translation in subscription update modal
2019-05-23 18:45:20 +01:00
Luis Ramos
ae1d260729 Merge pull request #3810 from openfoodfoundation/dependabot/bundler/deface-1.0.2
Bump deface from 1.0.0 to 1.0.2
2019-05-23 18:42:51 +01:00
luisramos0
15360971b0 Move signed_* files to views/shared/menu and add new logged in and profile icons 2019-05-23 15:58:02 +01:00
Luis Ramos
12282ad906 Merge pull request #3794 from m-budryte/replace_&_with_OR
& replaced by OR when multiple property filters are selected
2019-05-23 14:35:51 +01:00
Transifex-Openfoodnetwork
a4d59b72b0 Updating translations for config/locales/nb.yml 2019-05-23 20:35:12 +10:00
Transifex-Openfoodnetwork
6b2e10860e Updating translations for config/locales/nb.yml 2019-05-23 20:32:02 +10:00
Maikel Linke
c93e51b73e Update source locale description
The Australian instance has been using the source locale. But now we
added an Australian English locale via Transifex.

The I18n wiki page moved as well.
2019-05-23 20:14:59 +10:00
Transifex-Openfoodnetwork
3c162984f1 Updating translations for config/locales/en_AU.yml 2019-05-23 19:57:49 +10:00
Transifex-Openfoodnetwork
207fe7b64e Updating translations for config/locales/en_AU.yml 2019-05-23 19:54:40 +10:00
Pau Pérez Fabregat
7c9299bdb5 Merge pull request #3852 from openfoodfoundation/transifex
Transifex
2019-05-22 16:35:27 +02:00
Pau Perez
4c19c1a0a5 Disable harmful rake tasks in production
No need to check whether you are running that `bundle exec rake db:reset`
command on staging or production anymore 😱.

As described in https://github.com/adamcooke/rails-safe-tasks

> This gem provides an extra layer of safety between you and deleting all your
> production data by accident.

> It restricts the use of various rake tasks (including db:drop, db:reset etc...)
> when you are running your application in a production environment.
2019-05-22 15:30:43 +02:00
Maikel Linke
38e9976ce4 Make inserting delayed jobs from cron quiet
`config/schedule.rb` defines entries for cron jobs. Every five minutes
it insert several delayed jobs via `script/enqueue`. A recent upgrade of
Postgresql (a year or two ago) made that script noisy. Every time we
insert a delayed job with that script it outputs:

  INSERT 0 1

Standard output like this is seen as error message by cron an forwarded
to the unix user's local mailbox in `/var/mail/openfoodnetwork`. This
file grows over time and accumulates tens of thousands of error
messages, hiding any important failures.

This patch makes inserting delayed jobs quiet. A failure is still
reported.
2019-05-22 03:36:07 +10:00
Matt-Yorkley
74d7db9fba Allow unauthenticated access to enterprise API endpoints 2019-05-21 17:13:00 +01:00
Drumstickx
414ae58cbd Rubocop changes. 2019-05-21 16:48:02 +02:00
Drumstickx
c162654757 Reduce code duplication. 2019-05-21 16:46:40 +02:00
Drumstickx
29f68ed5d8 Rubocop changes. 2019-05-21 14:51:52 +02:00
luisramos0
115b5dadef Remove more dead code from usersregistration (signup calls are always ajax) 2019-05-21 12:39:29 +02:00
luisramos0
d9438cb082 Add spinner.gif from spree_frontend, this makes ofn completely independent of spree_frontend assets 2019-05-21 12:39:29 +02:00
luisramos0
ffd883e84d Remove dead code from usersregistration (signup calls are always ajax) and remove application.html.erb (spree frontend default layout) because this usersregistration was the last bit of OFN code to use it 2019-05-21 12:39:29 +02:00
luisramos0
25fd6f2e78 Move empty check template from spree_frontend, it is required from the checkout page
This makes ofn code completely independent from spree_frontend views
2019-05-21 12:39:29 +02:00
luisramos0
a0c56f31c7 Move Google Analytics script from spree_frontend to ofn: this is one of the very last dependencies to spree_frontend code 2019-05-21 12:39:29 +02:00
Transifex-Openfoodnetwork
85c41c1f12 Updating translations for config/locales/pt.yml 2019-05-21 20:18:30 +10:00
Transifex-Openfoodnetwork
d252916858 Updating translations for config/locales/pt.yml 2019-05-21 20:15:53 +10:00
Transifex-Openfoodnetwork
09a9b64d28 Updating translations for config/locales/pt.yml 2019-05-21 20:15:20 +10:00
Transifex-Openfoodnetwork
31c1c82310 Updating translations for config/locales/fr.yml 2019-05-21 20:10:37 +10:00
Transifex-Openfoodnetwork
a66c2314ef Updating translations for config/locales/fr.yml 2019-05-21 20:07:31 +10:00
Drumstickx
2f83d02168 Reduce code duplication. 2019-05-19 22:36:55 +02:00
Drumstickx
0e6a576e33 Fix user_id IS NOT NULL check. 2019-05-19 22:05:34 +02:00
Drumstickx
4204943a7c Styling. 2019-05-19 22:04:44 +02:00
Drumstickx
1246c3b6b9 Styling. 2019-05-19 18:57:09 +02:00
Drumstickx
ec2db4dd2a Fixed sql injection vulnerability in users_and_enterprises_report. 2019-05-19 17:58:57 +02:00
Transifex-Openfoodnetwork
ec343fda3b Updating translations for config/locales/en_GB.yml 2019-05-15 05:58:11 +10:00
Transifex-Openfoodnetwork
ff3e8c29a7 Updating translations for config/locales/en_GB.yml 2019-05-15 05:55:01 +10:00
lin-d-hop
f19244cebd Update outdated things on the README 2019-05-14 15:25:05 +01:00
Pau Pérez Fabregat
59d4e3d9e2 Merge pull request #3848 from luisramos0/pr_3813
Get PR 3813 to master (it was only on the hotfix branch 2-0-1)
2019-05-13 19:15:24 +02:00
luisramos0
189865fd80 Make stock locations backorderable_default false.
This is required because when the default stock location is created, the backorderable_default column doesnt exist and when this column is created, the initial default is true. This is why we need to force it to false here. This column is the default value for on_demand which must be false.
2019-05-10 22:00:24 +01:00
Pau Pérez Fabregat
7e9a149c8d Merge pull request #3837 from luisramos0/transpec
transpec!!!
2019-05-10 14:59:41 +02:00
Pau Pérez Fabregat
f113ac61d7 Merge pull request #3839 from coopdevs/report-cache-diff-in-new-tab
Report cache diff in new tab
2019-05-10 14:38:33 +02:00
Pau Perez
9a98a7c974 Report cache diff to Bugsnag in a new tab
This will allow us to see the difference between the cache entry and the
actual shopfront. Otherwise, there is no way to see what wasn't
refreshed in the cache.
2019-05-10 13:13:20 +02:00
luisramos0
07e9043e34 Move shipping methods translations to lazy lookups 2019-05-10 11:44:49 +01:00
Luis Ramos
f844ff275b Merge pull request #3799 from idanceinbetween/product-description-field-text-formatting-3757
added buttons to form and updated sanitizer to allow extra formatting
2019-05-10 10:48:55 +01:00
Maikel
50ca1f7173 Merge pull request #3824 from mkllnk/aus-content-updates
Aus content updates
2019-05-10 10:40:09 +10:00
luisramos0
6996353d05 Run transpec for spec/controllers 2019-05-10 01:20:40 +01:00
luisramos0
df459a21a4 Run transpec for spec/lib 2019-05-10 01:08:34 +01:00
luisramos0
e7c6892ab8 Run transpec for spec/mailers 2019-05-09 23:47:32 +01:00
luisramos0
2c6ca7e169 Run transpec for spec/helpers 2019-05-09 23:43:51 +01:00
luisramos0
0075ffbc02 Run transpec for spec/support 2019-05-09 23:39:30 +01:00
luisramos0
9cfba8ad19 Revert transpec in ability_spec.rb:461 so that spec is green again 2019-05-09 23:33:43 +01:00
luisramos0
6dcc0b1d68 Run transpec for spec/jobs 2019-05-09 23:29:11 +01:00
luisramos0
fe017713ae Run transpec in spec/serializers 2019-05-09 22:43:07 +01:00
luisramos0
04801e5c2e Run transpec in spec/models 2019-05-09 22:25:29 +01:00
Luis Ramos
59e7cb313d Merge pull request #3815 from amers185/add_social_links
Add extra (Instagram) social media links to emails sent to customers and users [Looking for feedback/direction on completing solution]
2019-05-09 21:14:42 +01:00
dependabot[bot]
ef3ea0701e Bump i18n-js from 3.2.1 to 3.2.2
Bumps [i18n-js](https://github.com/fnando/i18n-js) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/fnando/i18n-js/releases)
- [Changelog](https://github.com/fnando/i18n-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fnando/i18n-js/compare/v3.2.1...v3.2.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-09 19:19:16 +00:00
Luis Ramos
6d62f4c4b4 Merge pull request #3817 from kristinalim/fix/1218-remove_oc_debug_information
1218 Remove OC "Debug Information" which appears in non-production environments
2019-05-09 16:05:18 +01:00
Luis Ramos
19881927e3 Merge pull request #3699 from HugsDaniel/3688-missing-translation-edit-sub
Add review & edit sub keys
2019-05-09 16:04:38 +01:00
Luis Ramos
24c96fab8b Merge pull request #3795 from lin-d-hop/translation-oc-spinner
Add translation to order cycle spinner
2019-05-09 16:03:53 +01:00
Luis Ramos
b821188f5d Merge pull request #3826 from luisramos0/knapsack
Add new knapsack report to get the build jobs more balanced
2019-05-09 16:00:38 +01:00
Maikel
7d163632a4 Merge pull request #3827 from openfoodfoundation/transifex
Transifex
2019-05-09 17:39:26 +10:00
Maikel Linke
a97792cbc3 Remove story from code comment 2019-05-09 11:57:13 +10:00
Eelco de Vlieger
d498ecf901 Issue 3450 - webdrivers update.
Ran `bundle install` to update Gemfile.lock (suggestion by semaphoreci check)
Moved webdrivers gem down in the list to be in better alphabetical order (suggested by codeclimate check)
2019-05-08 22:28:31 +01:00
Transifex-Openfoodnetwork
5ea9d8cf8b Updating translations for config/locales/de_DE.yml 2019-05-09 06:29:23 +10:00
Transifex-Openfoodnetwork
9abd60ef1e Updating translations for config/locales/de_DE.yml 2019-05-09 06:26:14 +10:00
luisramos0
ca5eddd27e Add new knapsack report to get the build jobs more balanced 2019-05-08 19:59:17 +01:00
Eelco de Vlieger
2900dd89d8 issue 3450 - update webdrivers version - version 3.9 was released yesterday, which caused a test error, so setting version to latest 3.8.1 for now 2019-05-08 19:50:36 +01:00
Eelco de Vlieger
5667c00587 issue 3450 - add webdrivers dependency (+ spec helper setup) and remove chromedriver-helper dependency
https://github.com/openfoodfoundation/openfoodnetwork/issues/3450
2019-05-08 19:10:14 +01:00
eelcodevlieger
295e814988 Merge pull request #1 from openfoodfoundation/master
sync
2019-05-08 18:59:26 +01:00
Masha
5eacf05a45 used string interpolation for clarity 2019-05-08 15:05:15 +01:00
Masha
d5ff733f0b spaces location swapped 2019-05-08 15:05:13 +01:00
Masha
5470f8d758 new translation key for products_or created 2019-05-08 15:03:28 +01:00
Masha
94cbac00a5 & replaced by OR when multiple property filters are selected 2019-05-08 15:00:59 +01:00
luisramos0
77178ca595 Add href and target attributes to product serializer sanitizer to allow links with target in product descriptions 2019-05-08 14:46:57 +01:00
idanceinbetween
7790401d59 added buttons to form and updated sanitizer to allow extra formatting 2019-05-08 14:45:05 +01:00
Pau Pérez Fabregat
a45782f59b Merge pull request #3814 from coopdevs/test-bulk-update-error
Test empty variants_attrs in bulk_update
2019-05-08 15:43:09 +02:00
Maikel
a0f60a9bfe Merge pull request #3806 from openfoodfoundation/transifex
Transifex
2019-05-08 15:50:50 +10:00
Maikel Linke
a3adbd9fc8 Replace connect-learn banner with custom content
The connect and learn banner is only used in Australia at the moment. We
would like to have customisable content here. Now every instance can
choose to place a custom alert banner at the top. Unfortunately, custom
banners are not translated into other languages. That's why I kept the
standard register call. For example, the register call is in use where
it is displayed in French and Italian. Completely switching to custom
content would break the translation.

Translations in custom content are an existing feature request,
"multi-lang 2.0".
2019-05-08 11:38:49 +10:00
Luis Ramos
4c767cd5b4 Merge pull request #3802 from kristinalim/fix/order_cycle_optimizations
3760 Optimizations related to OCs
2019-05-07 21:12:44 +01:00
Luis Ramos
6658f85f59 Merge pull request #3758 from jazzdragon/3292-link-popup-text-translation
3292 link popup text translation
2019-05-07 21:11:31 +01:00
Luis Ramos
dffa50468b Merge pull request #3801 from Matt-Yorkley/need_for_speed
Fix /maps performance
2019-05-07 21:08:34 +01:00
Kristina Lim
12b28fdc32 Remove "Debug Information" in edit OC page 2019-05-08 01:33:58 +08:00
Pau Pérez Fabregat
fc38906e60 Merge pull request #3672 from Matt-Yorkley/spree2/pi_shipping_category
[Spree Upgrade] shipping_category now required for products
2019-05-07 16:12:05 +02:00
Matt-Yorkley
fc8b220b4c Add specs for endpoint and serializers 2019-05-07 10:27:04 +01:00
Transifex-Openfoodnetwork
13985e28f4 Updating translations for config/locales/pt.yml 2019-05-07 19:01:37 +10:00
Transifex-Openfoodnetwork
8f62cf2bce Updating translations for config/locales/pt.yml 2019-05-07 19:01:29 +10:00
Kristina Lim
c3d4288692 Fix translation for closed/closes in subscription update modal 2019-05-07 14:52:03 +08:00
Syed Usama Amer
f71df770d0 added social links 2019-05-06 23:28:14 -05:00
Maikel Linke
38c9ecd44f Update pricing copy for Australian business model 2019-05-07 14:24:31 +10:00
Maikel Linke
0cf964e1bd Update About URL 2019-05-07 11:23:48 +10:00
Matt-Yorkley
6a8a67560b Fix API authentication 2019-05-07 00:36:08 +01:00
Matt-Yorkley
6bdc5d4438 Fix maps performance 2019-05-07 00:36:08 +01:00
Pau Perez
f940397781 Test empty variants_attrs in bulk_update
This covers the scenario we saw in
https://app.bugsnag.com/katuma/katuma/errors/5cd0595bece0b7001984f64c?event_id=5cd0595b0038be3b070d0000&i=sk&m=nw.
There is some other context we might be missing that makes it not
possible to reproduce.

I guess then, that this is an isolated case that does not prevent us
from deploying v2.0.0.
2019-05-06 22:23:37 +02:00
dependabot[bot]
010953cc6b Bump deface from 1.0.0 to 1.0.2
Bumps [deface](https://github.com/spree/deface) from 1.0.0 to 1.0.2.
- [Release notes](https://github.com/spree/deface/releases)
- [Changelog](https://github.com/spree/deface/blob/master/CHANGELOG.markdown)
- [Commits](https://github.com/spree/deface/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-06 19:16:37 +00:00
Kristina Lim
56bc497fe2 Simplify code for enterprise serializer for OCs 2019-05-06 23:49:55 +08:00
lin-d-hop
7b87e609c4 Set master variant price in products controller
Set master variant price in products controller

Code climate tidy up

Syntax improvement

Revert "Remove non-functional Price field from Edit Product screen"

This reverts commit 585072302c.

Syntax improvement

fixing revert

Revert "Remove non-functional Price field from Edit Product screen"

This reverts commit 585072302c.

fixing conflicts
2019-05-06 14:20:01 +01:00
Transifex-Openfoodnetwork
0e954e50d8 Updating translations for config/locales/nb.yml 2019-05-06 21:35:17 +10:00
Kristina Lim
7593168341 Update code style for Enterpise.not_ready_for_checkout
This was changed into multiple lines for readability.
2019-05-06 18:37:28 +08:00
Kristina Lim
c0a5bcce92 Update some comments in Enterprise and OrderCycle models 2019-05-06 18:35:01 +08:00
Kristina Lim
4430c88a95 Eager-load some data for admin order cycle pages 2019-05-06 15:41:29 +08:00
Kristina Lim
f14e7e97b1 Do not check need to warn of invalid OCs unless request is HTML 2019-05-06 15:41:29 +08:00
Kristina Lim
781afc1015 Change OC :suppliers and :distributors to associations 2019-05-06 13:43:44 +10:00
Kristina Lim
71bff0dd5b Reduce the number of queries in Enterprise.not_ready_for_checkout 2019-05-06 13:43:44 +10:00
lin-d-hop
10fba9b39f Add translation to order cycle spinner
lazy text
2019-05-05 19:12:53 +01:00
lin-d-hop
585072302c Remove non-functional Price field from Edit Product screen
Update initializer to override Product Price as required field.

Revert "Update initializer to override Product Price as required field."

This reverts commit 1bfca09c5cf9245fbc3d30a23e9d80ac545adcf5.
2019-05-05 16:41:54 +01:00
Matt-Yorkley
3323ac7650 Fix duplicate error messages 2019-05-05 13:30:38 +01:00
Pau Pérez Fabregat
b443f5ece9 Merge pull request #3789 from hughbric/remove_payment_enterprise_id_refs
references to payment_enterprise_id removed, new migration created
2019-05-05 12:30:19 +01:00
Matt-yorkley
bc349faf8c Fix on_hand failure 2019-05-05 12:00:46 +01:00
Matt-Yorkley
c04c54ebf6 Refactor importer setup and fix shipping_category usage 2019-05-05 12:00:46 +01:00
Matt-Yorkley
fd31a76fba Test shipping_category presence validation 2019-05-05 12:00:46 +01:00
Matt-Yorkley
dee9521f77 shipping_category now required for products 2019-05-05 12:00:46 +01:00
Luis Ramos
17f126d80c Merge pull request #3788 from stveep/3249-display-name-on-edit-variant-page
Add display_name and display_as to admin edit variant page
2019-05-05 11:31:27 +01:00
jazzdragon
37d15a1be3 Add classes to indicate collapsible is for medium screens or smaller 2019-05-04 20:12:12 -07:00
jazzdragon
623471290e Make sure styling doesn't get messed up if resizing down and back up 2019-05-04 19:52:08 -07:00
jazzdragon
a876f81f0a Make collapsible always visible on large screen 2019-05-04 19:48:30 -07:00
jazzdragon
271330d2fc Add collapsible elements and styles 2019-05-04 19:43:46 -07:00
stveep
7090281da5 Reorganise defaces so that display name fields come first 2019-05-04 21:48:32 +01:00
Pau Pérez Fabregat
958b144948 Merge pull request #3787 from eelcodevlieger/issue_3777-Make_all_map_icons_green
issue 3777 - Make all map icons green
2019-05-04 19:54:02 +02:00
Pau Pérez Fabregat
e3d9cab02b Merge pull request #3785 from kkoomin/3687-missing-translation-on-demand
changed string into translation key & add 'infinity' key
2019-05-04 19:01:39 +02:00
stveep
a959702905 Add display_name and display_as to admin edit variant page 2019-05-04 17:20:12 +01:00
Michael Hughes
9e56198092 references to payment_enterprise_id removed, new migration created 2019-05-04 16:32:48 +01:00
Eelco de Vlieger
4b2114c1e4 issue 3777 - Make all map icons green 2019-05-04 14:44:16 +01:00
kkoomin
f65ce82778 changed string into translation key & add 'infinity' key 2019-05-04 14:40:45 +01:00
luisramos0
d7e706e6e7 Make text area translations run immeditaly on setup with the t function instead of sending the translation expression down to the textAngular code 2019-04-29 13:40:52 +01:00
jazzdragon
7a27973ae3 Add translation and references in taTranslations (not working in alert) 2019-04-27 19:22:15 -07:00
jazzdragon
b42426a3b8 Add test for existing input alert text 2019-04-27 18:52:23 -07:00
jazzdragon
f6c0071554 Add reference comment 2019-04-27 17:01:07 -07:00
jazzdragon
35de9077da Add config for taTranslations (no functional change) 2019-04-27 16:57:02 -07:00
luisramos0
a1905e43f7 Move a group of translations related to customers to the js translations namespace 2019-04-15 18:12:04 +01:00
luisramos0
9662323261 Move a group of translations related to schedules to the js translations namespace 2019-04-15 17:42:45 +01:00
Hugo Daniel
abdf3b5480 Add edit subcription translation key 2019-04-15 16:27:18 +01:00
803 changed files with 20873 additions and 14001 deletions

4
.dockerignore Normal file
View File

@@ -0,0 +1,4 @@
.git
.gitignore
log/*
tmp/*

View File

@@ -22,48 +22,43 @@
Metrics/LineLength:
Max: 100
Exclude:
- Gemfile
- app/controllers/admin/bulk_line_items_controller.rb
- app/controllers/admin/contents_controller.rb
- app/controllers/admin/customers_controller.rb
- app/controllers/admin/enterprises_controller.rb
- app/controllers/admin/enterprise_fees_controller.rb
- app/controllers/admin/enterprise_groups_controller.rb
- app/controllers/admin/enterprise_relationships_controller.rb
- app/controllers/admin/enterprises_controller.rb
- app/controllers/admin/enterprise_roles_controller.rb
- app/controllers/admin/inventory_items_controller.rb
- app/controllers/admin/manager_invitations_controller.rb
- app/controllers/admin/order_cycles_controller.rb
- app/controllers/admin/product_import_controller.rb
- app/controllers/admin/proxy_orders_controller.rb
- app/controllers/admin/schedules_controller.rb
- app/controllers/admin/subscription_line_items_controller.rb
- app/controllers/admin/subscriptions_controller.rb
- app/controllers/admin/variant_overrides_controller.rb
- app/controllers/api/enterprise_attachment_controller.rb
- app/controllers/api/order_cycles_controller.rb
- app/controllers/api/product_images_controller.rb
- app/controllers/application_controller.rb
- app/controllers/base_controller.rb
- app/controllers/cart_controller.rb
- app/controllers/checkout_controller.rb
- app/controllers/shop_controller.rb
- app/controllers/spree/admin/adjustments_controller_decorator.rb
- app/controllers/spree/admin/base_controller_decorator.rb
- app/controllers/spree/admin/line_items_controller_decorator.rb
- app/controllers/spree/admin/orders_controller_decorator.rb
- app/controllers/spree/admin/payments_controller_decorator.rb
- app/controllers/spree/admin/payment_methods_controller_decorator.rb
- app/controllers/spree/admin/products_controller_decorator.rb
- app/controllers/spree/admin/reports_controller_decorator.rb
- app/controllers/spree/admin/shipping_methods_controller_decorator.rb
- app/controllers/spree/api/products_controller_decorator.rb
- app/controllers/spree/credit_cards_controller.rb
- app/controllers/spree/orders_controller_decorator.rb
- app/controllers/spree/paypal_controller_decorator.rb
- app/controllers/stripe/callbacks_controller.rb
- app/controllers/user_confirmations_controller.rb
- app/helpers/admin/account_helper.rb
- app/helpers/admin/injection_helper.rb
- app/helpers/angular_form_builder.rb
- app/helpers/angular_form_helper.rb
- app/helpers/application_helper.rb
- app/helpers/checkout_helper.rb
- app/helpers/enterprises_helper.rb
- app/helpers/footer_links_helper.rb
@@ -73,24 +68,19 @@ Metrics/LineLength:
- app/helpers/shop_helper.rb
- app/helpers/spree/admin/base_helper_decorator.rb
- app/helpers/spree/admin/navigation_helper_decorator.rb
- app/helpers/spree/admin/orders_helper_decorator.rb
- app/helpers/spree/orders_helper.rb
- app/jobs/products_cache_integrity_checker_job.rb
- app/jobs/subscription_confirm_job.rb
- app/jobs/subscription_placement_job.rb
- app/mailers/producer_mailer.rb
- app/mailers/spree/order_mailer_decorator.rb
- app/mailers/subscription_mailer.rb
- app/models/column_preference.rb
- app/models/concerns/order_shipment.rb
- app/models/concerns/product_stock.rb
- app/models/concerns/variant_stock.rb
- app/models/content_configuration.rb
- app/models/customer.rb
- app/models/enterprise_fee.rb
- app/models/enterprise.rb
- app/models/enterprise_relationship.rb
- app/models/enterprise_group.rb
- app/models/enterprise_role.rb
- app/models/exchange.rb
- app/models/inventory_item.rb
- app/models/order_cycle.rb
- app/models/product_import/entry_processor.rb
- app/models/product_import/entry_validator.rb
- app/models/product_import/product_importer.rb
@@ -101,9 +91,10 @@ Metrics/LineLength:
- app/models/schedule.rb
- app/models/spree/ability_decorator.rb
- app/models/spree/adjustment_decorator.rb
- app/models/spree/app_configuration_decorator.rb
- app/models/spree/calculator/default_tax_decorator.rb
- app/models/spree/calculator/flexi_rate_decorator.rb
- app/models/spree/classification_decorator.rb
- app/models/spree/concerns/payment_method_distributors.rb
- app/models/spree/gateway/stripe_connect.rb
- app/models/spree/line_item_decorator.rb
- app/models/spree/order_decorator.rb
@@ -112,16 +103,14 @@ Metrics/LineLength:
- app/models/spree/product_decorator.rb
- app/models/spree/shipment_decorator.rb
- app/models/spree/shipping_method_decorator.rb
- app/models/spree/tax_rate_decorator.rb
- app/models/spree/taxon_decorator.rb
- app/models/spree/user_decorator.rb
- app/models/spree/variant_decorator.rb
- app/models/subscription.rb
- app/models/variant_override.rb
- app/models/variant_override_set.rb
- app/overrides/add_distributor_details_js_to_product.rb
- app/overrides/add_enterprise_fees_to_admin_configurations_menu.rb
- app/overrides/replace_checkout_payment_button.rb
- app/overrides/replace_payment_name_with_description.rb
- app/serializers/api/admin/basic_enterprise_serializer.rb
- app/serializers/api/admin/enterprise_fee_serializer.rb
- app/serializers/api/admin/enterprise_serializer.rb
@@ -131,47 +120,43 @@ Metrics/LineLength:
- app/serializers/api/admin/index_order_cycle_serializer.rb
- app/serializers/api/admin/line_item_serializer.rb
- app/serializers/api/admin/order_cycle_serializer.rb
- app/serializers/api/admin/product_serializer.rb
- app/serializers/api/admin/subscription_serializer.rb
- app/serializers/api/admin/tag_rule_serializer.rb
- app/serializers/api/admin/variant_override_serializer.rb
- app/serializers/api/admin/variant_serializer.rb
- app/services/cart_service.rb
- app/services/default_stock_location.rb
- app/services/embedded_page_service.rb
- app/services/line_item_syncer.rb
- app/services/order_cycle_form.rb
- app/services/order_factory.rb
- app/services/order_syncer.rb
- app/services/subscriptions_count.rb
- app/services/variants_stock_levels.rb
- app/views/json/_groups.rabl
- app/views/json/partials/_enterprise.rabl
- app/views/json/_producer.rabl
- app/views/json/partials/_enterprise.rabl
- app/views/spree/api/products/bulk_show.v1.rabl
- app/views/spree/api/variants/bulk_show.v1.rabl
- engines/web/app/helpers/web/cookies_policy_helper.rb
- Gemfile
- lib/discourse/single_sign_on.rb
- lib/open_food_network/available_payment_method_filter.rb
- lib/open_food_network/bulk_coop_report.rb
- lib/open_food_network/customers_report.rb
- app/services/order_cycle_distributed_variants.rb
- lib/open_food_network/enterprise_fee_applicator.rb
- lib/open_food_network/enterprise_fee_calculator.rb
- lib/open_food_network/enterprise_issue_validator.rb
- lib/open_food_network/group_buy_report.rb
- lib/open_food_network/lettuce_share_report.rb
- lib/open_food_network/locking.rb
- lib/open_food_network/order_and_distributor_report.rb
- lib/open_food_network/order_cycle_form_applicator.rb
- lib/open_food_network/order_cycle_management_report.rb
- lib/open_food_network/order_cycle_permissions.rb
- lib/open_food_network/order_grouper.rb
- lib/open_food_network/orders_and_fulfillments_report.rb
- lib/open_food_network/payments_report.rb
- lib/open_food_network/permalink_generator.rb
- lib/open_food_network/permissions.rb
- lib/open_food_network/products_and_inventory_report_base.rb
- lib/open_food_network/products_cache.rb
- lib/open_food_network/products_renderer.rb
- lib/open_food_network/proxy_order_syncer.rb
- lib/open_food_network/reports/bulk_coop_allocation_report.rb
- lib/open_food_network/reports/line_items.rb
@@ -179,16 +164,13 @@ Metrics/LineLength:
- lib/open_food_network/users_and_enterprises_report.rb
- lib/open_food_network/variant_and_line_item_naming.rb
- lib/open_food_network/xero_invoices_report.rb
- lib/spree/core/calculated_adjustments_decorator.rb
- lib/spree/core/controller_helpers/respond_with_decorator.rb
- lib/spree/localized_number.rb
- lib/spree/product_filters.rb
- lib/stripe/profile_storer.rb
- lib/tasks/cache.rake
- lib/tasks/data.rake
- lib/tasks/dev.rake
- lib/tasks/enterprises.rake
- spec/archive/features/consumer/checkout_spec.rb
- spec/controllers/admin/bulk_line_items_controller_spec.rb
- spec/controllers/admin/column_preferences_controller_spec.rb
- spec/controllers/admin/customers_controller_spec.rb
@@ -216,18 +198,20 @@ Metrics/LineLength:
- spec/controllers/shops_controller_spec.rb
- spec/controllers/spree/admin/adjustments_controller_spec.rb
- spec/controllers/spree/admin/base_controller_spec.rb
- spec/controllers/spree/admin/line_items_controller_spec.rb
- spec/controllers/spree/admin/orders_controller_spec.rb
- spec/controllers/spree/admin/orders/customer_details_controller_spec.rb
- spec/controllers/spree/admin/orders_controller_spec.rb
- spec/controllers/spree/admin/payment_methods_controller_spec.rb
- spec/controllers/spree/admin/payments_controller_spec.rb
- spec/controllers/spree/admin/reports_controller_spec.rb
- spec/controllers/spree/admin/variants_controller_spec.rb
- spec/controllers/spree/api/line_items_controller_spec.rb
- spec/controllers/spree/api/products_controller_spec.rb
- spec/controllers/spree/api/shipments_controller_spec.rb
- spec/controllers/spree/api/variants_controller_spec.rb
- spec/controllers/spree/credit_cards_controller_spec.rb
- spec/controllers/spree/orders_controller_spec.rb
- spec/controllers/spree/users_controller_spec.rb
- spec/controllers/spree/user_sessions_controller_spec.rb
- spec/controllers/spree/users_controller_spec.rb
- spec/controllers/stripe/callbacks_controller_spec.rb
- spec/controllers/stripe/webhooks_controller_spec.rb
- spec/controllers/user_confirmations_controller_spec.rb
@@ -239,10 +223,10 @@ Metrics/LineLength:
- spec/features/admin/enterprise_fees_spec.rb
- spec/features/admin/enterprise_relationships_spec.rb
- spec/features/admin/enterprise_roles_spec.rb
- spec/features/admin/enterprise_user_spec.rb
- spec/features/admin/enterprises/images_spec.rb
- spec/features/admin/enterprises/index_spec.rb
- spec/features/admin/enterprises_spec.rb
- spec/features/admin/enterprise_user_spec.rb
- spec/features/admin/image_settings_spec.rb
- spec/features/admin/multilingual_spec.rb
- spec/features/admin/order_cycles_spec.rb
@@ -283,6 +267,7 @@ Metrics/LineLength:
- spec/helpers/order_cycles_helper_spec.rb
- spec/helpers/spree/admin/base_helper_spec.rb
- spec/jobs/confirm_order_job_spec.rb
- spec/jobs/products_cache_integrity_checker_job_spec.rb
- spec/jobs/refresh_products_cache_job_spec.rb
- spec/jobs/subscription_confirm_job_spec.rb
- spec/jobs/subscription_placement_job_spec.rb
@@ -290,7 +275,6 @@ Metrics/LineLength:
- spec/lib/open_food_network/bulk_coop_report_spec.rb
- spec/lib/open_food_network/cached_products_renderer_spec.rb
- spec/lib/open_food_network/customers_report_spec.rb
- spec/services/order_cycle_distributed_variants.rb
- spec/lib/open_food_network/enterprise_fee_applicator_spec.rb
- spec/lib/open_food_network/enterprise_fee_calculator_spec.rb
- spec/lib/open_food_network/enterprise_injection_data_spec.rb
@@ -301,6 +285,7 @@ Metrics/LineLength:
- spec/lib/open_food_network/order_cycle_form_applicator_spec.rb
- spec/lib/open_food_network/order_cycle_permissions_spec.rb
- spec/lib/open_food_network/order_grouper_spec.rb
- spec/lib/open_food_network/orders_and_fulfillments_report_spec.rb
- spec/lib/open_food_network/packing_report_spec.rb
- spec/lib/open_food_network/permissions_spec.rb
- spec/lib/open_food_network/products_and_inventory_report_spec.rb
@@ -319,6 +304,8 @@ Metrics/LineLength:
- spec/mailers/producer_mailer_spec.rb
- spec/mailers/subscription_mailer_spec.rb
- spec/models/column_preference_spec.rb
- spec/models/concerns/order_shipment_spec.rb
- spec/models/concerns/product_stock_spec.rb
- spec/models/customer_spec.rb
- spec/models/enterprise_caching_spec.rb
- spec/models/enterprise_fee_spec.rb
@@ -345,8 +332,8 @@ Metrics/LineLength:
- spec/models/spree/product_spec.rb
- spec/models/spree/property_spec.rb
- spec/models/spree/shipping_method_spec.rb
- spec/models/spree/taxon_spec.rb
- spec/models/spree/tax_rate_spec.rb
- spec/models/spree/taxon_spec.rb
- spec/models/spree/user_spec.rb
- spec/models/spree/variant_spec.rb
- spec/models/stripe_account_spec.rb
@@ -370,17 +357,19 @@ Metrics/LineLength:
- spec/serializers/admin/for_order_cycle/supplied_product_serializer_spec.rb
- spec/serializers/admin/subscription_customer_serializer_spec.rb
- spec/serializers/admin/variant_override_serializer_spec.rb
- spec/serializers/current_order_serializer.rb
- spec/serializers/enterprise_serializer_spec.rb
- spec/serializers/api/enterprise_shopfront_serializer_spec.rb
- spec/serializers/current_order_serializer_spec.rb
- spec/serializers/order_serializer_spec.rb
- spec/services/cart_service_spec.rb
- spec/services/embedded_page_service_spec.rb
- spec/services/order_cycle_distributed_variants_spec.rb
- spec/services/order_cycle_form_spec.rb
- spec/services/order_factory_spec.rb
- spec/services/order_syncer_spec.rb
- spec/services/subscription_estimator_spec.rb
- spec/services/subscription_form_spec.rb
- spec/services/subscription_validator_spec.rb
- spec/services/subscription_variants_service_spec.rb
- spec/spec_helper.rb
- spec/support/cancan_helper.rb
- spec/support/delayed_job_helper.rb
@@ -397,8 +386,8 @@ Metrics/AbcSize:
Exclude:
- app/controllers/admin/bulk_line_items_controller.rb
- app/controllers/admin/customers_controller.rb
- app/controllers/admin/enterprise_fees_controller.rb
- app/controllers/admin/enterprises_controller.rb
- app/controllers/admin/enterprise_fees_controller.rb
- app/controllers/admin/order_cycles_controller.rb
- app/controllers/admin/product_import_controller.rb
- app/controllers/admin/schedules_controller.rb
@@ -412,17 +401,19 @@ Metrics/AbcSize:
- app/controllers/cart_controller.rb
- app/controllers/checkout_controller.rb
- app/controllers/discourse_sso_controller.rb
- app/controllers/enterprises_controller.rb
- app/controllers/spree/admin/adjustments_controller_decorator.rb
- app/controllers/spree/admin/line_items_controller_decorator.rb
- app/controllers/spree/admin/orders/customer_details_controller_decorator.rb
- app/controllers/spree/admin/orders_controller_decorator.rb
- app/controllers/spree/admin/overview_controller_decorator.rb
- app/controllers/spree/admin/payment_methods_controller_decorator.rb
- app/controllers/spree/admin/payments_controller_decorator.rb
- app/controllers/spree/admin/payment_methods_controller_decorator.rb
- app/controllers/spree/admin/products_controller_decorator.rb
- app/controllers/spree/admin/reports_controller_decorator.rb
- app/controllers/spree/admin/search_controller_decorator.rb
- app/controllers/spree/admin/shipping_methods_controller_decorator.rb
- app/controllers/spree/admin/variants_controller_decorator.rb
- app/controllers/spree/api/products_controller_decorator.rb
- app/controllers/spree/api/shipments_controller_decorator.rb
- app/controllers/spree/credit_cards_controller.rb
- app/controllers/spree/orders_controller_decorator.rb
- app/controllers/spree/user_sessions_controller_decorator.rb
@@ -433,21 +424,19 @@ Metrics/AbcSize:
- app/helpers/checkout_helper.rb
- app/helpers/i18n_helper.rb
- app/helpers/order_cycles_helper.rb
- app/helpers/spree/admin/orders_helper_decorator.rb
- app/helpers/spree/orders_helper.rb
- app/jobs/subscription_placement_job.rb
- app/mailers/producer_mailer.rb
- app/models/calculator/flat_percent_per_item.rb
- app/models/column_preference.rb
- app/models/enterprise_group.rb
- app/models/enterprise.rb
- app/models/enterprise_group.rb
- app/models/enterprise_relationship.rb
- app/models/model_set.rb
- app/models/product_import/entry_processor.rb
- app/models/product_import/entry_validator.rb
- app/models/proxy_order.rb
- app/models/spree/ability_decorator.rb
- app/models/spree/adjustment_decorator.rb
- app/models/spree/calculator/default_tax_decorator.rb
- app/models/spree/calculator/flexi_rate_decorator.rb
- app/models/spree/line_item_decorator.rb
@@ -457,7 +446,6 @@ Metrics/AbcSize:
- app/models/spree/product_set.rb
- app/models/spree/taxon_decorator.rb
- app/serializers/api/admin/enterprise_serializer.rb
- app/serializers/api/enterprise_serializer.rb
- app/serializers/api/product_serializer.rb
- app/serializers/api/variant_serializer.rb
- app/services/cart_service.rb
@@ -489,33 +477,99 @@ Metrics/AbcSize:
- lib/spree/localized_number.rb
- lib/stripe/account_connector.rb
- lib/tasks/enterprises.rake
- spec/archive/features/consumer/checkout_spec.rb
- spec/controllers/spree/admin/orders_controller_spec.rb
- lib/tasks/sample_data/product_factory.rb
- spec/controllers/spree/api/shipments_controller_spec.rb
- spec/features/admin/product_import_spec.rb
- spec/features/admin/reports_spec.rb
- spec/features/admin/subscriptions_spec.rb
- spec/features/consumer/shopping/checkout_spec.rb
- spec/features/consumer/shopping/variant_overrides_spec.rb
- spec/models/enterprise_spec.rb
- spec/models/product_importer_spec.rb
- spec/support/performance_helper.rb
Metrics/BlockLength:
Max: 25
ExcludedMethods: ["class_eval", "collection", "context", "describe", "it", "member", "namespace", "resource", "resources"]
Exclude:
- lib/tasks/data.rake
- lib/tasks/dev.rake
- spec/controllers/spree/admin/invoices_controller_spec.rb
- spec/factories/variant_factory.rb
- spec/features/admin/adjustments_spec.rb
- spec/features/admin/bulk_order_management_spec.rb
- spec/features/admin/bulk_product_update_spec.rb
- spec/features/admin/caching_spec.rb
- spec/features/admin/content_spec.rb
- spec/features/admin/customers_spec.rb
- spec/features/admin/enterprise_fees_spec.rb
- spec/features/admin/enterprise_groups_spec.rb
- spec/features/admin/enterprise_relationships_spec.rb
- spec/features/admin/enterprise_roles_spec.rb
- spec/features/admin/enterprises/images_spec.rb
- spec/features/admin/enterprises/index_spec.rb
- spec/features/admin/enterprises_spec.rb
- spec/features/admin/enterprise_user_spec.rb
- spec/features/admin/multilingual_spec.rb
- spec/features/admin/order_cycles_spec.rb
- spec/features/admin/orders_spec.rb
- spec/features/admin/overview_spec.rb
- spec/features/admin/payment_method_spec.rb
- spec/features/admin/product_import_spec.rb
- spec/features/admin/products_spec.rb
- spec/features/admin/reports/enterprise_fee_summaries_spec.rb
- spec/features/admin/reports_spec.rb
- spec/features/admin/schedules_spec.rb
- spec/features/admin/shipping_methods_spec.rb
- spec/features/admin/subscriptions_spec.rb
- spec/features/admin/tag_rules_spec.rb
- spec/features/admin/tax_settings_spec.rb
- spec/features/admin/users_spec.rb
- spec/features/admin/variant_overrides_spec.rb
- spec/features/admin/variants_spec.rb
- spec/features/consumer/account/cards_spec.rb
- spec/features/consumer/account/settings_spec.rb
- spec/features/consumer/account_spec.rb
- spec/features/consumer/authentication_spec.rb
- spec/features/consumer/cookies_spec.rb
- spec/features/consumer/external_services_spec.rb
- spec/features/consumer/groups_spec.rb
- spec/features/consumer/multilingual_spec.rb
- spec/features/consumer/producers_spec.rb
- spec/features/consumer/registration_spec.rb
- spec/features/consumer/shopping/cart_spec.rb
- spec/features/consumer/shopping/checkout_auth_spec.rb
- spec/features/consumer/shopping/checkout_spec.rb
- spec/features/consumer/shopping/embedded_groups_spec.rb
- spec/features/consumer/shopping/embedded_shopfronts_spec.rb
- spec/features/consumer/shopping/orders_spec.rb
- spec/features/consumer/shopping/products_spec.rb
- spec/features/consumer/shopping/shopping_spec.rb
- spec/features/consumer/shopping/variant_overrides_spec.rb
- spec/features/consumer/shops_spec.rb
- spec/lib/open_food_network/group_buy_report_spec.rb
- spec/models/tag_rule/discount_order_spec.rb
- spec/spec_helper.rb
- spec/support/delayed_job_helper.rb
- spec/support/matchers/select2_matchers.rb
- spec/support/matchers/table_matchers.rb
Metrics/CyclomaticComplexity:
Max: 6
Exclude:
- app/controllers/admin/enterprise_fees_controller.rb
- app/controllers/admin/enterprises_controller.rb
- app/controllers/admin/enterprise_fees_controller.rb
- app/controllers/checkout_controller.rb
- app/controllers/spree/admin/orders_controller_decorator.rb
- app/controllers/spree/admin/payments_controller_decorator.rb
- app/controllers/spree/orders_controller_decorator.rb
- app/helpers/checkout_helper.rb
- app/helpers/i18n_helper.rb
- app/helpers/order_cycles_helper.rb
- app/helpers/spree/admin/orders_helper_decorator.rb
- app/models/enterprise.rb
- app/models/enterprise_relationship.rb
- app/models/product_import/entry_processor.rb
- app/models/product_import/entry_validator.rb
- app/models/spree/ability_decorator.rb
- app/models/spree/adjustment_decorator.rb
- app/models/spree/payment_decorator.rb
- app/models/spree/product_decorator.rb
- app/models/spree/product_set.rb
@@ -535,17 +589,15 @@ Metrics/PerceivedComplexity:
Exclude:
- app/controllers/admin/enterprises_controller.rb
- app/controllers/checkout_controller.rb
- app/controllers/spree/admin/orders_controller_decorator.rb
- app/controllers/spree/admin/payments_controller_decorator.rb
- app/controllers/spree/orders_controller_decorator.rb
- app/helpers/checkout_helper.rb
- app/helpers/i18n_helper.rb
- app/helpers/order_cycles_helper.rb
- app/helpers/spree/admin/orders_helper_decorator.rb
- app/models/enterprise_relationship.rb
- app/models/product_import/entry_processor.rb
- app/models/product_import/entry_validator.rb
- app/models/spree/ability_decorator.rb
- app/models/spree/line_item_decorator.rb
- app/models/spree/order_decorator.rb
- app/models/spree/product_decorator.rb
- app/models/spree/product_set.rb
@@ -562,8 +614,8 @@ Metrics/MethodLength:
Max: 10
Exclude:
- app/controllers/admin/customers_controller.rb
- app/controllers/admin/enterprise_fees_controller.rb
- app/controllers/admin/enterprises_controller.rb
- app/controllers/admin/enterprise_fees_controller.rb
- app/controllers/admin/manager_invitations_controller.rb
- app/controllers/admin/order_cycles_controller.rb
- app/controllers/admin/stripe_accounts_controller.rb
@@ -572,14 +624,12 @@ Metrics/MethodLength:
- app/controllers/cart_controller.rb
- app/controllers/checkout_controller.rb
- app/controllers/shop_controller.rb
- app/controllers/spree/admin/line_items_controller_decorator.rb
- app/controllers/spree/admin/orders_controller_decorator.rb
- app/controllers/spree/admin/payment_methods_controller_decorator.rb
- app/controllers/spree/admin/orders/customer_details_controller_decorator.rb
- app/controllers/spree/admin/payments_controller_decorator.rb
- app/controllers/spree/admin/payment_methods_controller_decorator.rb
- app/controllers/spree/admin/products_controller_decorator.rb
- app/controllers/spree/admin/reports_controller_decorator.rb
- app/controllers/spree/admin/search_controller_decorator.rb
- app/controllers/spree/admin/shipping_methods_controller_decorator.rb
- app/controllers/spree/credit_cards_controller.rb
- app/controllers/spree/orders_controller_decorator.rb
- app/controllers/spree/user_sessions_controller_decorator.rb
@@ -589,7 +639,6 @@ Metrics/MethodLength:
- app/controllers/user_registrations_controller.rb
- app/helpers/checkout_helper.rb
- app/helpers/order_cycles_helper.rb
- app/helpers/spree/admin/orders_helper_decorator.rb
- app/jobs/subscription_placement_job.rb
- app/mailers/producer_mailer.rb
- app/models/column_preference.rb
@@ -601,24 +650,23 @@ Metrics/MethodLength:
- app/models/product_import/entry_validator.rb
- app/models/product_import/product_importer.rb
- app/models/spree/ability_decorator.rb
- app/models/spree/adjustment_decorator.rb
- app/models/spree/calculator/default_tax_decorator.rb
- app/models/spree/calculator/flexi_rate_decorator.rb
- app/models/spree/line_item_decorator.rb
- app/models/spree/order_decorator.rb
- app/models/spree/payment_decorator.rb
- app/models/spree/payment_method_decorator.rb
- app/models/spree/product_decorator.rb
- app/models/spree/product_set.rb
- app/models/spree/taxon_decorator.rb
- app/serializers/api/admin/order_cycle_serializer.rb
- app/services/cart_service.rb
- app/serializers/api/cached_enterprise_serializer.rb
- app/services/order_cycle_form.rb
- engines/order_management/app/services/order_management/reports/enterprise_fee_summary/scope.rb
- lib/discourse/single_sign_on.rb
- lib/open_food_network/bulk_coop_report.rb
- lib/open_food_network/cached_products_renderer.rb
- lib/open_food_network/column_preference_defaults.rb
- lib/open_food_network/customers_report.rb
- lib/open_food_network/enterprise_fee_calculator.rb
- lib/open_food_network/enterprise_issue_validator.rb
- lib/open_food_network/group_buy_report.rb
- lib/open_food_network/lettuce_share_report.rb
- lib/open_food_network/option_value_namer.rb
@@ -643,7 +691,7 @@ Metrics/MethodLength:
- lib/spree/core/controller_helpers/respond_with_decorator.rb
- lib/spree/localized_number.rb
- lib/stripe/profile_storer.rb
- spec/archive/features/consumer/checkout_spec.rb
- lib/tasks/sample_data/product_factory.rb
- spec/features/consumer/shopping/checkout_spec.rb
- spec/features/consumer/shopping/variant_overrides_spec.rb
- spec/models/product_importer_spec.rb
@@ -662,8 +710,10 @@ Metrics/ClassLength:
- app/models/product_import/entry_validator.rb
- app/models/product_import/product_importer.rb
- app/models/spree/ability_decorator.rb
- app/serializers/api/enterprise_serializer.rb
- app/serializers/api/cached_enterprise_serializer.rb
- app/serializers/api/enterprise_shopfront_serializer.rb
- app/services/cart_service.rb
- engines/order_management/app/services/order_management/reports/enterprise_fee_summary/scope.rb
- lib/open_food_network/bulk_coop_report.rb
- lib/open_food_network/enterprise_fee_calculator.rb
- lib/open_food_network/order_cycle_form_applicator.rb
@@ -686,6 +736,7 @@ Metrics/ModuleLength:
- spec/controllers/api/orders_controller_spec.rb
- spec/controllers/spree/api/products_controller_spec.rb
- spec/lib/open_food_network/address_finder_spec.rb
- spec/lib/open_food_network/cached_products_renderer_spec.rb
- spec/lib/open_food_network/customers_report_spec.rb
- spec/lib/open_food_network/enterprise_fee_calculator_spec.rb
- spec/lib/open_food_network/option_value_namer_spec.rb
@@ -716,8 +767,3 @@ Metrics/ParameterLists:
- app/models/product_import/entry_validator.rb
- lib/open_food_network/xero_invoices_report.rb
- spec/features/admin/reports_spec.rb
Metrics/BlockNesting:
Max: 3
Exclude:
- app/controllers/checkout_controller.rb

View File

@@ -13,8 +13,6 @@ AllCops:
- 'script/**/*'
- 'vendor/**/*'
- 'node_modules/**/*'
# The parser gem fails to parse this file with out current Ruby version.
- 'spec/factories.rb'
# Excluding: inadequate Naming/FileName rule rejects GemFile name with camelcase
- 'engines/web/Gemfile'
@@ -187,15 +185,14 @@ Metrics/AbcSize:
Max: 15
Metrics/BlockLength:
ExcludedMethods: ["collection", "context", "describe", "it", "member", "namespace", "resource", "resources"]
Max: 25
ExcludedMethods: ["class_eval", "collection", "context", "describe", "it", "member", "namespace", "resource", "resources"]
Metrics/BlockNesting:
Max: 3
Metrics/ClassLength:
Max: 100
Exclude:
- engines/order_management/app/services/order_management/reports/enterprise_fee_summary/scope.rb
Metrics/ModuleLength:
Max: 100
@@ -205,8 +202,6 @@ Metrics/CyclomaticComplexity:
Metrics/MethodLength:
Max: 10
Exclude:
- engines/order_management/app/services/order_management/reports/enterprise_fee_summary/scope.rb
Metrics/ParameterLists:
Max: 5

File diff suppressed because it is too large Load Diff

View File

@@ -1,60 +0,0 @@
language: ruby
sudo: false
cache: bundler
bundler_args: --without development
rvm:
- "2.1.5"
addons:
postgresql: "9.5"
# Set the timezone for phantomjs with TZ
# Set the timezone for karma with TIMEZONE
env:
global:
- TZ="Australia/Melbourne"
- TIMEZONE="Australia/Melbourne"
- CI_NODE_TOTAL=5
matrix:
- CI_NODE_INDEX=0
- CI_NODE_INDEX=1
- CI_NODE_INDEX=2
- CI_NODE_INDEX=3 RSPEC_ENGINES="true"
- CI_NODE_INDEX=4 KARMA="true" GITHUB_DEPLOY="true"
before_script:
- cp config/database.travis.yml config/database.yml
- cp config/application.yml.example config/application.yml
- RAILS_ENV=test bundle exec rake db:create db:schema:load
# Only install PhantomJS if it is not already present (ie. cached)
- npm list -g phantomjs-prebuilt@~2.1.7 --depth=0 || npm install -g phantomjs-prebuilt@~2.1.7
- export PATH=`npm bin -g`:$PATH
- >
if [ "$KARMA" = "true" ]; then
npm install -g npm@'3.8.8'
npm install
npm install -g karma-cli@0.1.2
fi
script:
- 'if [ "$KARMA" = "true" ]; then bundle exec rake karma:run; else echo "Skipping karma run"; fi'
- 'if [ "$RSPEC_ENGINES" = "true" ]; then bundle exec rake ofn:specs:engines:rspec; else echo "Skipping RSpec run in engines"; fi'
- "bundle exec rake 'knapsack:rspec[--format progress --tag ~performance]'"
after_success:
- >
if [ "$GITHUB_DEPLOY" = "true" -a "$TRAVIS_PULL_REQUEST" = "false" -a -n "$TRAVIS_BRANCH" -a "$TRAVIS_BRANCH" != "transifex" -a -n "$GITHUB_API_SECRET" ]; then
description="`git show "$TRAVIS_BRANCH" -s --oneline --no-color`"
data="{
\"ref\":\"$TRAVIS_BRANCH\",
\"description\":\"$description\",
\"environment\":\"staging\",
\"required_contexts\":[]}"
curl -u "$GITHUB_API_SECRET" -d "$data" "https://api.github.com/repos/$TRAVIS_REPO_SLUG/deployments"
else
echo "Not deploying on this build."
fi
notifications:
email: false

47
DOCKER.md Normal file
View File

@@ -0,0 +1,47 @@
### Docker
It is possible to setup the Open Food Network app easily with Docker and Docker Compose.
The objective is to spare configuration time, in order to help people testing the app and contribute to it.
It can also be used as documentation. It is not perfect but it is used in many other projects and many devs are used to it nowadays.
### Install Docker
Please check the documentation here, https://docs.docker.com/install/ to install Docker.
For Docker Compose, information are here: https://docs.docker.com/compose/install/.
Better to have at least 2GB free on your computer in order to download images and create containers for Open Food Network app.
### Use Docker with Open Food Network
Open a terminal with a shell.
Clone the repository:
```sh
$ git clone git@github.com:openfoodfoundation/openfoodnetwork.git
```
Go at the root of the app:
```sh
$ cd openfoodnetwork
```
Download the Docker images and build the containers:
```sh
$ docker-compose build
```
Run the app with all the required containers:
```sh
$ docker-compose up
```
This command will setup the database and seed it with sample data. The default admin user is 'ofn@example.com' with 'ofn123' password.
Check the app in the browser at `http:://localhost:3000`.
You will then get the trace of the containers in the terminal. You can stop the containers using Ctrl-C in the terminal.

31
Dockerfile Normal file
View File

@@ -0,0 +1,31 @@
FROM ubuntu:18.04
# Install all the requirements
RUN apt-get update && apt-get install -y curl git build-essential software-properties-common wget zlib1g-dev libssl1.0-dev libreadline-dev libyaml-dev libffi-dev libxml2-dev libxslt1-dev wait-for-it
# Setup ENV variables
ENV PATH /usr/local/src/rbenv/shims:/usr/local/src/rbenv/bin:$PATH
ENV RBENV_ROOT /usr/local/src/rbenv
ENV RUBY_VERSION 2.1.5
ENV CONFIGURE_OPTS --disable-install-doc
# Rbenv & Ruby part
RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \
git clone https://github.com/rbenv/ruby-build.git ${RBENV_ROOT}/plugins/ruby-build && \
${RBENV_ROOT}/plugins/ruby-build/install.sh && \
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh && \
rbenv install $RUBY_VERSION && \
rbenv global $RUBY_VERSION && \
gem install bundler --version=1.17.2
# Postgres
RUN sh -c "echo 'deb https://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main' > /etc/apt/sources.list.d/pgdg.list" && \
wget --quiet -O - https://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - && \
apt-get update && \
apt-get install -yqq --no-install-recommends postgresql-client-9.5 libpq-dev
ENV BUNDLE_PATH /bundles
COPY . /usr/src/app/
WORKDIR /usr/src/app

97
Gemfile
View File

@@ -2,11 +2,13 @@ source 'https://rubygems.org'
ruby "2.1.5"
git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" }
gem 'i18n', '~> 0.6.11'
gem 'i18n-js', '~> 3.3.0'
gem 'rails', '~> 3.2.22'
gem 'rails-i18n', '~> 3.0.0'
gem 'i18n', '~> 0.6.11'
gem 'i18n-js', '~> 3.2.1'
gem 'rails_safe_tasks', '~> 1.0'
gem "activerecord-import"
# Patched version. See http://rubysec.com/advisories/CVE-2015-5312/.
gem 'nokogiri', '>= 1.6.7.1'
@@ -18,10 +20,11 @@ gem 'pg'
# OFN-maintained and patched version of Spree v2.0.4. See
# https://github.com/openfoodfoundation/openfoodnetwork/wiki/Spree-2.0-upgrade
# for details.
gem 'spree', github: 'openfoodfoundation/spree', branch: '2-0-4-stable'
gem 'spree_api', github: 'openfoodfoundation/spree', branch: '2-0-4-stable'
gem 'spree_backend', github: 'openfoodfoundation/spree', branch: '2-0-4-stable'
gem 'spree_core', github: 'openfoodfoundation/spree', branch: '2-0-4-stable'
gem 'spree_i18n', github: 'spree/spree_i18n', branch: '1-3-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-0-stable'
# Our branch contains two changes
# - Pass customer email and phone number to PayPal (merged to upstream master)
@@ -33,51 +36,53 @@ gem 'stripe'
# which is needed for Pin Payments (and possibly others).
gem 'activemerchant', '~> 1.78'
gem 'devise', '~> 2.2.5'
gem 'devise-encryptable', '0.1.2'
gem 'jwt', '~> 2.2'
gem 'oauth2', '~> 1.4.1' # Used for Stripe Connect
gem 'jwt', '~> 2.1'
gem 'delayed_job_active_record'
gem 'daemons'
gem 'delayed_job_active_record'
gem 'delayed_job_web'
# Fix bug in simple_form preventing collection_check_boxes usage within form_for block
# When merged, revert to upstream gem
gem 'simple_form', github: 'RohanM/simple_form'
gem 'unicorn'
gem 'andand'
gem 'angularjs-rails', '1.5.5'
gem 'aws-sdk'
gem 'bugsnag'
gem 'db2fog'
gem 'haml'
gem 'rabl'
gem 'redcarpet'
gem 'sass', "~> 3.3"
gem 'sass-rails', '~> 3.2.3', groups: [:default, :assets]
gem 'redcarpet'
gem 'aws-sdk'
gem 'db2fog'
gem 'andand'
gem 'truncate_html'
gem 'rabl'
gem 'unicorn'
# AMS is pinned to 0.8.4 because 0.9.x is a complete re-write, as is 0.10.x
# Once Rails is updated to 5.x we should bump directly to 0.10.x
gem "active_model_serializers", "0.8.4"
gem 'oj'
gem 'deface', '1.0.0'
gem 'paperclip', '~> 3.4.1'
gem 'acts-as-taggable-on', '~> 3.4'
gem 'angularjs-file-upload-rails', '~> 2.4.1'
gem 'blockenspiel'
gem 'custom_error_message', github: 'jeremydurham/custom-err-msg'
gem 'dalli'
gem 'deface', '1.0.2'
gem 'diffy'
gem 'figaro'
gem 'geocoder'
gem 'gmaps4rails'
gem 'spinjs-rails'
gem 'rack-ssl', require: 'rack/ssl'
gem 'rack-rewrite'
gem 'custom_error_message', github: 'jeremydurham/custom-err-msg'
gem 'angularjs-file-upload-rails', '~> 2.4.1'
gem 'roadie-rails', '~> 1.1.1'
gem 'figaro'
gem 'blockenspiel'
gem 'acts-as-taggable-on', '~> 3.4'
gem 'oj'
gem 'paper_trail', '~> 5.2.3'
gem 'diffy'
gem 'paperclip', '~> 3.4.1'
gem 'rack-rewrite'
gem 'rack-ssl', require: 'rack/ssl'
gem 'roadie-rails', '~> 1.1.1'
gem 'skylight', '< 2.0'
gem 'spinjs-rails'
gem 'combine_pdf'
gem 'wicked_pdf'
@@ -93,64 +98,64 @@ gem 'whenever', require: false
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'compass-rails'
gem 'coffee-rails', '~> 3.2.1'
gem 'compass-rails'
gem 'therubyracer', '=0.12.0'
gem 'uglifier', '>= 1.0.3'
gem 'turbo-sprockets-rails3'
gem 'angular-rails-templates', '~> 0.3.0'
gem 'foundation-icons-sass-rails'
gem 'momentjs-rails'
gem 'angular-rails-templates', '~> 0.3.0'
gem 'turbo-sprockets-rails3'
end
gem "foundation-rails"
gem 'foundation_rails_helper', github: 'willrjmarshall/foundation_rails_helper', branch: "rails3"
gem 'jquery-rails', '3.0.0'
gem 'jquery-migrate-rails'
gem 'jquery-rails', '3.0.4'
gem 'ofn-qz', github: 'openfoodfoundation/ofn-qz', ref: '60da2ae4c44cbb4c8d602f59fb5fff8d0f21db3c'
group :test, :development do
# Pretty printed test output
gem 'fuubar', '~> 2.3.2'
gem 'rspec-rails', ">= 3.5.2"
gem 'shoulda-matchers'
gem "factory_bot_rails", require: false
gem 'atomic'
gem 'awesome_print'
gem 'capybara', '>= 2.15.4'
gem 'database_cleaner', '0.7.1', require: false
gem 'awesome_print'
gem 'letter_opener', '>= 1.4.1'
gem 'timecop'
gem 'selenium-webdriver'
gem 'chromedriver-helper'
gem 'rspec-retry'
gem "factory_bot_rails", require: false
gem 'fuubar', '~> 2.4.1'
gem 'json_spec', '~> 1.1.4'
gem 'unicorn-rails'
gem 'atomic'
gem 'knapsack'
gem 'letter_opener', '>= 1.4.1'
gem 'rspec-rails', ">= 3.5.2"
gem 'rspec-retry'
gem 'selenium-webdriver'
gem 'shoulda-matchers'
gem 'timecop'
gem 'unicorn-rails'
gem 'webdrivers', '3.8.1'
end
group :test do
gem 'webmock'
gem 'simplecov', require: false
gem 'webmock'
# See spec/spec_helper.rb for instructions
#gem 'perftools.rb'
# gem 'perftools.rb'
end
group :development do
gem 'byebug', '~> 9.0.0' # 9.1 requires ruby 2.2
gem "newrelic_rpm", "~> 3.0"
gem 'pry-byebug', '>= 3.4.3'
gem 'debugger-linecache'
gem 'guard'
gem 'listen', '3.0.8' # 3.1.0 requires ruby 2.2
gem 'guard-livereload'
gem 'guard-rails'
gem 'guard-rspec', '~> 4.7.3'
gem 'listen', '3.0.8' # 3.1.0 requires ruby 2.2
gem "newrelic_rpm", "~> 3.0"
gem 'pry-byebug', '>= 3.4.3'
gem 'rubocop', '>= 0.49.1'
gem 'spring', '1.7.2'
gem 'spring-commands-rspec'

View File

@@ -31,16 +31,9 @@ GIT
GIT
remote: https://github.com/openfoodfoundation/spree.git
revision: 46d6f8f5fd434105b0c69958276d1727a3066a97
revision: 8a8585a43cd04d1a50dc65227f337a91b18d66d5
branch: 2-0-4-stable
specs:
spree (2.0.4)
spree_api (= 2.0.4)
spree_backend (= 2.0.4)
spree_cmd (= 2.0.4)
spree_core (= 2.0.4)
spree_frontend (= 2.0.4)
spree_sample (= 2.0.4)
spree_api (2.0.4)
rabl (= 0.8.4)
spree_core (= 2.0.4)
@@ -53,8 +46,6 @@ GIT
select2-rails (~> 3.4.7)
spree_api (= 2.0.4)
spree_core (= 2.0.4)
spree_cmd (2.0.4)
thor (>= 0.14.6)
spree_core (2.0.4)
activemerchant (~> 1.34)
acts_as_list (= 0.2.0)
@@ -75,28 +66,6 @@ GIT
state_machine (= 1.2.0)
stringex (~> 1.5.1)
truncate_html (= 0.9.2)
spree_frontend (2.0.4)
canonical-rails
deface (>= 0.9.0)
jquery-rails (~> 3.0.0)
rails (~> 3.2.13)
spree_api (= 2.0.4)
spree_core (= 2.0.4)
stringex (~> 1.5.1)
spree_sample (2.0.4)
spree_core (= 2.0.4)
GIT
remote: https://github.com/spree/spree_auth_devise.git
revision: 0181835fb6ac77a05191d26f6f32a0f4a548d851
branch: 2-0-stable
specs:
spree_auth_devise (2.0.0)
devise (~> 2.2.5)
devise-encryptable (= 0.1.2)
spree_backend (~> 2.0.0)
spree_core (~> 2.0.0)
spree_frontend (~> 2.0.0)
GIT
remote: https://github.com/spree/spree_i18n.git
@@ -160,6 +129,8 @@ GEM
activesupport (= 3.2.22.5)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activerecord-import (1.0.2)
activerecord (>= 3.2)
activeresource (3.2.22.5)
activemodel (= 3.2.22.5)
activesupport (= 3.2.22.5)
@@ -170,7 +141,7 @@ GEM
activerecord (>= 3.2, < 5)
acts_as_list (0.2.0)
activerecord (>= 3.0)
addressable (2.5.2)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
andand (1.3.3)
angular-rails-templates (0.3.0)
@@ -179,8 +150,6 @@ GEM
tilt
angularjs-file-upload-rails (2.4.1)
angularjs-rails (1.5.5)
archive-zip (0.7.0)
io-like (~> 0.3.0)
arel (3.0.3)
ast (2.4.0)
atomic (1.1.101)
@@ -191,7 +160,7 @@ GEM
json (~> 1.4)
nokogiri (>= 1.4.4)
uuidtools (~> 2.1)
bcrypt (3.1.11)
bcrypt (3.1.13)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
blockenspiel (0.5.0)
@@ -200,8 +169,6 @@ GEM
builder (3.0.4)
byebug (9.0.6)
cancan (1.6.10)
canonical-rails (0.1.0)
rails (>= 3.1, < 5.1)
capybara (2.18.0)
addressable
mini_mime (>= 0.1.3)
@@ -211,9 +178,6 @@ GEM
xpath (>= 2.0, < 4.0)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
chromedriver-helper (1.1.0)
archive-zip (~> 0.7.0)
nokogiri (~> 1.6)
chronic (0.10.2)
chunky_png (1.3.10)
climate_control (0.2.0)
@@ -260,9 +224,10 @@ GEM
fog (~> 1.0)
rails (>= 3.2.0, < 5.0)
debugger-linecache (1.2.0)
deface (1.0.0)
deface (1.0.2)
colorize (>= 0.5.8)
nokogiri (~> 1.6.0)
polyglot
rails (>= 3.1)
delayed_job (4.1.5)
activesupport (>= 3.0, < 5.3)
@@ -283,7 +248,7 @@ GEM
devise (>= 2.1.0)
diff-lcs (1.3)
diffy (3.3.0)
docile (1.3.1)
docile (1.3.2)
dry-inflector (0.1.2)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
@@ -460,7 +425,7 @@ GEM
foundation-rails (5.5.2.1)
railties (>= 3.1.0)
sass (>= 3.3.0, < 3.5)
fuubar (2.3.2)
fuubar (2.4.1)
rspec-core (~> 3.0)
ruby-progressbar (~> 1.4)
geocoder (1.1.8)
@@ -489,23 +454,22 @@ GEM
rspec (>= 2.99.0, < 4.0)
haml (4.0.7)
tilt
hashdiff (0.3.7)
hashdiff (0.4.0)
highline (1.6.18)
hike (1.2.3)
http_parser.rb (0.6.0)
httparty (0.16.2)
multi_xml (>= 0.5.2)
i18n (0.6.11)
i18n-js (3.2.1)
i18n-js (3.3.0)
i18n (>= 0.6.6)
immigrant (0.3.6)
activerecord (>= 3.0)
io-like (0.3.0)
ipaddress (0.8.3)
jaro_winkler (1.5.1)
journey (1.0.4)
jquery-migrate-rails (1.2.1)
jquery-rails (3.0.0)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (4.0.5)
@@ -514,12 +478,12 @@ GEM
json_spec (1.1.5)
multi_json (~> 1.0)
rspec (>= 2.0, < 4.0)
jwt (2.1.0)
jwt (2.2.1)
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.11.2)
knapsack (1.17.1)
knapsack (1.17.2)
rake
launchy (2.4.3)
addressable (~> 2.3)
@@ -543,9 +507,9 @@ GEM
i18n (~> 0.6.0)
multi_json (1.13.1)
multi_xml (0.6.0)
multipart-post (2.0.0)
multipart-post (2.1.1)
nenv (0.3.0)
net-http-persistent (3.0.0)
net-http-persistent (3.0.1)
connection_pool (~> 2.2)
newrelic_rpm (3.18.1.330)
nokogiri (1.6.8.1)
@@ -595,7 +559,7 @@ GEM
rabl (0.8.4)
activesupport (>= 2.3.14)
rack (1.4.7)
rack-cache (1.8.0)
rack-cache (1.9.0)
rack (>= 0.4)
rack-mini-profiler (0.10.7)
rack (>= 1.2.0)
@@ -617,6 +581,7 @@ GEM
rails-i18n (3.0.1)
i18n (~> 0.5)
rails (>= 3.0.0, < 4.0.0)
rails_safe_tasks (1.0.0)
railties (3.2.22.5)
actionpack (= 3.2.22.5)
activesupport (= 3.2.22.5)
@@ -641,7 +606,7 @@ GEM
trollop (~> 2.1)
rdoc (3.12.2)
json (~> 1.4)
redcarpet (3.4.0)
redcarpet (3.5.0)
ref (2.0.0)
request_store (1.4.1)
rack (>= 1.4)
@@ -690,10 +655,10 @@ GEM
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-ole (1.2.12.1)
ruby-progressbar (1.10.0)
ruby-progressbar (1.10.1)
ruby-rc4 (0.1.5)
rubyzip (1.2.2)
safe_yaml (1.0.4)
safe_yaml (1.0.5)
sass (3.3.14)
sass-rails (3.2.6)
railties (~> 3.2.0)
@@ -708,7 +673,7 @@ GEM
shellany (0.0.1)
shoulda-matchers (2.8.0)
activesupport (>= 3.0.0)
simplecov (0.16.1)
simplecov (0.17.0)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
@@ -733,7 +698,7 @@ GEM
tilt (~> 1.1, != 1.3.0)
state_machine (1.2.0)
stringex (1.5.1)
stripe (4.11.0)
stripe (4.19.0)
faraday (~> 0.13)
net-http-persistent (~> 3.0)
therubyracer (0.12.0)
@@ -754,7 +719,7 @@ GEM
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.3.2)
unicorn (5.5.0)
unicorn (5.5.1)
kgio (~> 2.6)
raindrops (~> 0.7)
unicorn-rails (2.2.1)
@@ -767,10 +732,14 @@ GEM
railties (>= 3.0)
warden (1.2.7)
rack (>= 1.0)
webmock (3.5.1)
webdrivers (3.8.1)
nokogiri (~> 1.6)
rubyzip (~> 1.0)
selenium-webdriver (~> 3.0)
webmock (3.6.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
hashdiff (>= 0.4.0, < 2.0.0)
whenever (0.11.0)
chronic (>= 0.6.3)
wicked_pdf (1.1.0)
@@ -785,6 +754,7 @@ PLATFORMS
DEPENDENCIES
active_model_serializers (= 0.8.4)
activemerchant (~> 1.78)
activerecord-import
acts-as-taggable-on (~> 3.4)
andand
angular-rails-templates (~> 0.3.0)
@@ -797,7 +767,6 @@ DEPENDENCIES
bugsnag
byebug (~> 9.0.0)
capybara (>= 2.15.4)
chromedriver-helper
coffee-rails (~> 3.2.1)
combine_pdf
compass-rails
@@ -807,9 +776,11 @@ DEPENDENCIES
database_cleaner (= 0.7.1)
db2fog
debugger-linecache
deface (= 1.0.0)
deface (= 1.0.2)
delayed_job_active_record
delayed_job_web
devise (~> 2.2.5)
devise-encryptable (= 0.1.2)
diffy
eventmachine (>= 1.2.3)
factory_bot_rails
@@ -818,7 +789,7 @@ DEPENDENCIES
foundation-icons-sass-rails
foundation-rails
foundation_rails_helper!
fuubar (~> 2.3.2)
fuubar (~> 2.4.1)
geocoder
gmaps4rails
guard
@@ -827,12 +798,12 @@ DEPENDENCIES
guard-rspec (~> 4.7.3)
haml
i18n (~> 0.6.11)
i18n-js (~> 3.2.1)
i18n-js (~> 3.3.0)
immigrant
jquery-migrate-rails
jquery-rails (= 3.0.0)
jquery-rails (= 3.0.4)
json_spec (~> 1.1.4)
jwt (~> 2.1)
jwt (~> 2.2)
knapsack
letter_opener (>= 1.4.1)
listen (= 3.0.8)
@@ -853,6 +824,7 @@ DEPENDENCIES
rack-ssl
rails (~> 3.2.22)
rails-i18n (~> 3.0.0)
rails_safe_tasks (~> 1.0)
redcarpet
roadie-rails (~> 1.1.1)
roo (~> 2.7.0)
@@ -868,8 +840,9 @@ DEPENDENCIES
simplecov
skylight (< 2.0)
spinjs-rails
spree!
spree_auth_devise!
spree_api!
spree_backend!
spree_core!
spree_i18n!
spree_paypal_express!
spring (= 1.7.2)
@@ -883,6 +856,7 @@ DEPENDENCIES
unicorn
unicorn-rails
web!
webdrivers (= 3.8.1)
webmock
whenever
wicked_pdf

View File

@@ -10,7 +10,6 @@ Supported by the Open Food Foundation and a network of global affiliates, we are
We're part of global movement - get involved!
* Fill in this [short survey][survey] to tell us who you are and what you want to do with OFN.
* Join the conversation [on Slack][slack-invite]. Make sure you introduce yourself in the #general channel
* Head to [https://openfoodnetwork.org](https://openfoodnetwork.org) for more information about the global OFN project.
* Check out the [User Guide](https://guide.openfoodnetwork.org/) for a list of features and tutorials.
@@ -28,28 +27,13 @@ If you're interested in provisioning a server, see [ofn-install][ofn-install] fo
We also have a [Super Admin Guide][super-admin-guide] to help with configuration of new servers.
## Testing
## Credits
* Andrew Spinks (http://github.com/andrewspinks)
* Rohan Mitchell (http://github.com/rohanm)
* Rob Harrington (http://github.com/oeoeaio)
* Alex Serdyuk (http://github.com/alexs333)
* David Cook (http://github.com/dacook)
* Will Marshall (http://soundcloud.com/willmarshall)
* Laura Summers (https://github.com/summerscope)
* Maikel Linke (https://github.com/mkllnk)
* Lynne Davis (https://github.com/lin-d-hop)
* Paul Mackay (https://github.com/pmackay)
* Steve Pettitt (https://github.com/stveep)
* Matt Yorkley (https://github.com/Matt-Yorkley)
* Pau Pérez (https://github.com/sauloperez)
* Enrico Stano (https://github.com/enricostano)
We use [BrowserStack](https://www.browserstack.com/) as a manual testing tool. BrowserStack provides open source projects with unlimited and free of charge accounts. A big thanks to them!
## Licence
Copyright (c) 2012 - 2018 Open Food Foundation, released under the AGPL licence.
Copyright (c) 2012 - 2019 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://openfoodnetwork.org/slack-invite

0
Rakefile Normal file → Executable file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

View File

@@ -1,67 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px"
viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve">
<metadata>
<sfw xmlns="&ns_sfw;">
<slices></slices>
<sliceSourceBounds height="96" width="16383" y="-85.5" x="-8112" bottomLeftOrigin="true"></sliceSourceBounds>
</sfw>
</metadata>
<g>
<path opacity="0.25" fill="#282828" d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643
C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643
C24.988,26.679,20.059,25,14,25z"/>
<g>
<path fill="#FFFFFF" d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"/>
<g>
<path fill="#0B8C61" d="M9.46,8.846L9.458,9.319l-0.003,2.397c1.098-0.034,2.3-0.052,3.438-0.052c0.201,0,0.401,0.001,0.6,0.002
l-0.935-2.824L9.46,8.846z"/>
<circle fill="#0B8C61" cx="8.728" cy="17.454" r="1.569"/>
<path fill="#0B8C61" d="M12.395,17.13c-0.015-0.107-0.027-0.199-0.037-0.282c-0.047-0.382-0.165-0.741-0.325-1.075
c-0.049-0.096-0.097-0.193-0.155-0.285c-0.038-0.063-0.078-0.124-0.119-0.184c-0.514-0.723-1.278-1.251-2.166-1.464
c-0.202-0.04-0.409-0.061-0.619-0.061c-0.295,0-0.592,0.041-0.881,0.122c-0.276,0.077-0.487,0.112-0.685,0.112
c-0.027,0-0.048-0.008-0.074-0.009C5.969,14.557,5,15.892,5,17.455c0,2.055,1.672,3.727,3.728,3.727
c2.035,0,3.689-1.642,3.719-3.671l-0.041-0.296L12.395,17.13z M8.728,19.523c-1.142,0-2.07-0.928-2.07-2.069
s0.928-2.07,2.07-2.07c1.141,0,2.069,0.929,2.069,2.07S9.869,19.523,8.728,19.523z"/>
<circle fill="#0B8C61" cx="20.826" cy="19.013" r="1.006"/>
<path fill="#0B8C61" d="M22.72,15.398c0.13-0.696,0.212-1.403,0.271-2.108c0.055-0.659-0.112-0.814-0.758-0.839
c-0.961-0.034-1.848-0.071-2.808-0.109c-0.029-0.001-0.077-0.022-0.077-0.06c0-0.724,0.037-2.484,0.037-2.484
S19.196,9.66,18.931,9.66c-0.116,0-0.247,0.026-0.383,0.103c0,0.821,0,1.654,0,2.527c0,0-1.172-0.031-2.844-0.065
c-0.074-0.002-0.281-0.128-0.378-0.392c-0.251-0.694-0.8-2.045-1.52-4.126c0,0-0.373-0.888-1.316-0.888c-0.781,0-4.679,0-4.679,0
v5.199c0,0-0.353,0.148-0.649,0.178c-0.078,0.472-0.067,0.711,0.115,0.784c0.46-0.15,0.942-0.252,1.451-0.252
c0.389,0,0.761,0.061,1.122,0.149c1.119,0.237,2.101,0.923,2.748,1.879c0.034,0.048,0.064,0.097,0.096,0.147
c0.094,0.151,0.179,0.306,0.255,0.47c0.083,0.167,0.154,0.338,0.217,0.515c0.004,0.012,0.008,0.024,0.011,0.037
c0.127,0.368,0.206,0.754,0.238,1.156c0.101,0.014,0.196,0.036,0.289,0.036c0.007,0,0.013,0,0.02,0
c2.176-0.056,4.355-0.06,6.529-0.169c-0.906,0.251-1.575,1.082-1.575,2.067c0,1.184,0.962,2.147,2.148,2.147
c1.184,0,2.147-0.963,2.147-2.147c0-1.071-0.79-1.958-1.816-2.119C22.761,16.794,22.451,16.842,22.72,15.398z M12.893,12.163
c-1.343,0-2.729,0.025-3.938,0.069l0.003-2.916l0.004-0.97l3.957-0.006l1.263,3.813l0.045,0.018
C13.793,12.166,13.345,12.163,12.893,12.163z M22.082,19.013c0,0.693-0.564,1.257-1.256,1.257c-0.692,0-1.256-0.564-1.256-1.257
c0-0.692,0.564-1.255,1.256-1.255C21.518,17.758,22.082,18.321,22.082,19.013z"/>
<path fill="#0B8C61" d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z M23.973,19.013
c0,1.735-1.412,3.147-3.147,3.147c-1.736,0-3.148-1.412-3.148-3.147c0-0.34,0.055-0.67,0.158-0.98
c-0.652,0.016-1.301,0.027-1.94,0.039c-0.716,0.013-1.431,0.025-2.137,0.043l-0.037,0.001h-0.018
c-0.102,0-0.208-0.014-0.315-0.03c-0.312,2.306-2.272,4.096-4.661,4.096C6.121,22.181,4,20.061,4,17.455
c0-1.725,0.939-3.222,2.323-4.047c-0.278-0.463-0.209-1.002-0.148-1.375L6.3,11.276l0.511-0.051V6.819v-1h1h4.679
c1.269,0,2.003,0.943,2.238,1.5l0.012,0.03l0.011,0.03c0.497,1.435,0.905,2.503,1.203,3.283c0.083,0.217,0.156,0.408,0.217,0.572
c0.531,0.011,0.998,0.022,1.376,0.031V9.763V9.177l0.512-0.286c0.273-0.153,0.566-0.23,0.872-0.23
c0.55,0,0.938,0.254,1.044,0.332l0.419,0.307l-0.011,0.52c0,0.001-0.017,0.815-0.028,1.56c0.635,0.025,1.257,0.05,1.916,0.073
c0.277,0.011,0.925,0.036,1.358,0.525c0.384,0.434,0.393,0.974,0.358,1.396c-0.07,0.848-0.161,1.55-0.284,2.208
c-0.04,0.216-0.066,0.397-0.089,0.547c-0.062,0.425-0.158,0.742-0.292,0.981C23.731,17.644,23.973,18.308,23.973,19.013z"/>
</g>
</g>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:ns="&amp;ns_sfw;"
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"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="28px"
height="33px"
viewBox="0 0 28 33"
enable-background="new 0 0 28 33"
xml:space="preserve"
sodipodi:docname="green_producer.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)"><defs
id="defs29" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1803"
inkscape:window-height="857"
id="namedview27"
showgrid="false"
inkscape:zoom="17.609546"
inkscape:cx="3.0055332"
inkscape:cy="16.5"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="g20" />
<metadata
id="metadata2">
<ns:sfw>
<ns:slices />
<ns:sliceSourceBounds
height="96"
width="16383"
y="-85.5"
x="-8112"
bottomLeftOrigin="true" />
</ns:sfw>
<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>
<g
id="g24">
<path
opacity="0.25"
fill="#282828"
d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643 C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643 C24.988,26.679,20.059,25,14,25z"
id="path4" />
<g
id="g22">
<path
fill="#FFFFFF"
d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"
id="path6" />
<g
id="g20">
<path
fill="#C1122B"
d="M9.46,8.846L9.458,9.319l-0.003,2.397c1.098-0.034,2.3-0.052,3.438-0.052c0.201,0,0.401,0.001,0.6,0.002 l-0.935-2.824L9.46,8.846z"
id="path8"
style="fill:#0b8c61;fill-opacity:1" />
<circle
fill="#C1122B"
cx="8.728"
cy="17.454"
r="1.569"
id="circle10"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M12.395,17.13c-0.015-0.107-0.027-0.199-0.037-0.282c-0.047-0.382-0.165-0.741-0.325-1.075 c-0.049-0.096-0.097-0.193-0.155-0.285c-0.038-0.063-0.078-0.124-0.119-0.184c-0.514-0.723-1.278-1.251-2.166-1.464 c-0.202-0.04-0.409-0.061-0.619-0.061c-0.295,0-0.592,0.041-0.881,0.122c-0.276,0.077-0.487,0.112-0.685,0.112 c-0.027,0-0.048-0.008-0.074-0.009C5.969,14.557,5,15.892,5,17.455c0,2.055,1.672,3.727,3.728,3.727 c2.035,0,3.689-1.642,3.719-3.671l-0.041-0.296L12.395,17.13z M8.728,19.523c-1.142,0-2.07-0.928-2.07-2.069 s0.928-2.07,2.07-2.07c1.141,0,2.069,0.929,2.069,2.07S9.869,19.523,8.728,19.523z"
id="path12"
style="fill:#0b8c61;fill-opacity:1" />
<circle
fill="#C1122B"
cx="20.826"
cy="19.013"
r="1.006"
id="circle14"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M22.72,15.398c0.13-0.696,0.212-1.403,0.271-2.108c0.055-0.659-0.112-0.814-0.758-0.839 c-0.961-0.034-1.848-0.071-2.808-0.109c-0.029-0.001-0.077-0.022-0.077-0.06c0-0.724,0.037-2.484,0.037-2.484 S19.196,9.66,18.931,9.66c-0.116,0-0.247,0.026-0.383,0.103c0,0.821,0,1.654,0,2.527c0,0-1.172-0.031-2.844-0.065 c-0.074-0.002-0.281-0.128-0.378-0.392c-0.251-0.694-0.8-2.045-1.52-4.126c0,0-0.373-0.888-1.316-0.888c-0.781,0-4.679,0-4.679,0 v5.199c0,0-0.353,0.148-0.649,0.178c-0.078,0.472-0.067,0.711,0.115,0.784c0.46-0.15,0.942-0.252,1.451-0.252 c0.389,0,0.761,0.061,1.122,0.149c1.119,0.237,2.101,0.923,2.748,1.879c0.034,0.048,0.064,0.097,0.096,0.147 c0.094,0.151,0.179,0.306,0.255,0.47c0.083,0.167,0.154,0.338,0.217,0.515c0.004,0.012,0.008,0.024,0.011,0.037 c0.127,0.368,0.206,0.754,0.238,1.156c0.101,0.014,0.196,0.036,0.289,0.036c0.007,0,0.013,0,0.02,0 c2.176-0.056,4.355-0.06,6.529-0.169c-0.906,0.251-1.575,1.082-1.575,2.067c0,1.184,0.962,2.147,2.148,2.147 c1.184,0,2.147-0.963,2.147-2.147c0-1.071-0.79-1.958-1.816-2.119C22.761,16.794,22.451,16.842,22.72,15.398z M12.893,12.163 c-1.343,0-2.729,0.025-3.938,0.069l0.003-2.916l0.004-0.97l3.957-0.006l1.263,3.813l0.045,0.018 C13.793,12.166,13.345,12.163,12.893,12.163z M22.082,19.013c0,0.693-0.564,1.257-1.256,1.257c-0.692,0-1.256-0.564-1.256-1.257 c0-0.692,0.564-1.255,1.256-1.255C21.518,17.758,22.082,18.321,22.082,19.013z"
id="path16"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z M23.973,19.013 c0,1.735-1.412,3.147-3.147,3.147c-1.736,0-3.148-1.412-3.148-3.147c0-0.34,0.055-0.67,0.158-0.98 c-0.652,0.016-1.301,0.027-1.94,0.039c-0.716,0.013-1.431,0.025-2.137,0.043l-0.037,0.001h-0.018 c-0.102,0-0.208-0.014-0.315-0.03c-0.312,2.306-2.272,4.096-4.661,4.096C6.121,22.181,4,20.061,4,17.455 c0-1.725,0.939-3.222,2.323-4.047c-0.278-0.463-0.209-1.002-0.148-1.375L6.3,11.276l0.511-0.051V6.819v-1h1h4.679 c1.269,0,2.003,0.943,2.238,1.5l0.012,0.03l0.011,0.03c0.497,1.435,0.905,2.503,1.203,3.283c0.083,0.217,0.156,0.408,0.217,0.572 c0.531,0.011,0.998,0.022,1.376,0.031V9.763V9.177l0.512-0.286c0.273-0.153,0.566-0.23,0.872-0.23 c0.55,0,0.938,0.254,1.044,0.332l0.419,0.307l-0.011,0.52c0,0.001-0.017,0.815-0.028,1.56c0.635,0.025,1.257,0.05,1.916,0.073 c0.277,0.011,0.925,0.036,1.358,0.525c0.384,0.434,0.393,0.974,0.358,1.396c-0.07,0.848-0.161,1.55-0.284,2.208 c-0.04,0.216-0.066,0.397-0.089,0.547c-0.062,0.425-0.158,0.742-0.292,0.981C23.731,17.644,23.973,18.308,23.973,19.013z"
id="path18"
style="fill:#0b8c61;fill-opacity:1" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -1,69 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px"
viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve">
<metadata>
<sfw xmlns="&ns_sfw;">
<slices></slices>
<sliceSourceBounds height="96" width="16383" y="-85.5" x="-8112" bottomLeftOrigin="true"></sliceSourceBounds>
</sfw>
</metadata>
<g>
<path opacity="0.25" fill="#282828" d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643
C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643
C24.988,26.679,20.059,25,14,25z"/>
<g>
<path fill="#FFFFFF" d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"/>
<g>
<path fill="#0B8C61" d="M14,0C6.28,0,0,6.717,0,13.333c0,9.941,13.132,18.169,13.691,18.571C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.333C28,6.717,21.72,0,14,0z M14.002,30.908
C10.865,28.805,1,21.533,1,13.333C1,7.511,6.56,1,14,1c7.44,0,13,6.511,13,12.333C27,21.682,17.14,28.843,14.002,30.908z"/>
<path fill="#0B8C61" d="M23.703,15.582c0.123-0.658,0.214-1.36,0.284-2.208c0.035-0.422,0.026-0.962-0.358-1.396
c-0.433-0.489-1.081-0.514-1.358-0.525c-0.659-0.024-1.281-0.048-1.916-0.073c0.011-0.745,0.028-1.56,0.028-1.56l0.011-0.52
l-0.419-0.307c-0.106-0.078-0.495-0.332-1.044-0.332c-0.306,0-0.599,0.077-0.872,0.23l-0.512,0.286v0.586v1.502
c-0.378-0.009-0.845-0.02-1.376-0.031c-0.062-0.164-0.135-0.355-0.217-0.572c-0.298-0.78-0.706-1.847-1.203-3.283l-0.011-0.03
l-0.013-0.03c-0.234-0.557-0.969-1.5-2.238-1.5H7.811h-1v1v4.407L6.3,11.276l-0.125,0.757c-0.061,0.373-0.13,0.911,0.148,1.375
C4.939,14.233,4,15.729,4,17.455c0,2.606,2.121,4.727,4.728,4.727c2.39,0,4.349-1.79,4.661-4.096
c0.107,0.016,0.212,0.03,0.315,0.03h0.018l0.037-0.001c0.706-0.018,1.421-0.031,2.137-0.043c0.639-0.011,1.288-0.023,1.94-0.039
c-0.103,0.311-0.158,0.641-0.158,0.98c0,1.735,1.412,3.147,3.148,3.147c1.736,0,3.147-1.412,3.147-3.147
c0-0.706-0.242-1.369-0.651-1.903c0.135-0.239,0.23-0.556,0.292-0.981C23.636,15.978,23.662,15.798,23.703,15.582z M8.728,21.181
C6.672,21.181,5,19.51,5,17.455c0-1.562,0.969-2.898,2.335-3.451c0.026,0.001,0.046,0.009,0.074,0.009
c0.197,0,0.409-0.034,0.685-0.112c0.289-0.081,0.586-0.122,0.881-0.122c0.21,0,0.417,0.021,0.619,0.061
c0.888,0.213,1.652,0.741,2.166,1.464c0.041,0.06,0.082,0.121,0.119,0.184c0.057,0.091,0.105,0.188,0.155,0.285
c0.16,0.334,0.279,0.693,0.325,1.075c0.009,0.083,0.022,0.176,0.037,0.283l0.011,0.082l0.041,0.296
C12.417,19.539,10.763,21.181,8.728,21.181z M22.973,19.013c0,1.184-0.964,2.147-2.147,2.147c-1.186,0-2.148-0.963-2.148-2.147
c0-0.985,0.669-1.815,1.575-2.067c-2.174,0.109-4.353,0.113-6.529,0.169c-0.007,0-0.013,0-0.02,0
c-0.092,0-0.188-0.022-0.289-0.036c-0.032-0.402-0.111-0.788-0.238-1.156c-0.004-0.012-0.007-0.024-0.011-0.037
c-0.063-0.177-0.134-0.348-0.217-0.515c-0.076-0.163-0.161-0.318-0.255-0.469c-0.032-0.05-0.062-0.099-0.096-0.147
c-0.646-0.956-1.628-1.642-2.748-1.879c-0.362-0.089-0.734-0.149-1.122-0.149c-0.509,0-0.991,0.102-1.451,0.252
c-0.181-0.073-0.192-0.312-0.115-0.784c0.296-0.029,0.649-0.178,0.649-0.178V6.819c0,0,3.899,0,4.679,0
c0.943,0,1.316,0.888,1.316,0.888c0.72,2.081,1.269,3.432,1.52,4.126c0.097,0.264,0.303,0.39,0.378,0.392
c1.672,0.035,2.844,0.065,2.844,0.065c0-0.873,0-1.706,0-2.527c0.136-0.076,0.267-0.103,0.383-0.103
c0.265,0,0.453,0.138,0.453,0.138s-0.037,1.76-0.037,2.484c0,0.038,0.048,0.059,0.077,0.06c0.961,0.038,1.848,0.075,2.808,0.109
c0.646,0.025,0.813,0.18,0.758,0.839c-0.059,0.705-0.14,1.412-0.271,2.108c-0.269,1.444,0.042,1.395-1.562,1.496
C22.183,17.055,22.973,17.943,22.973,19.013z"/>
<path fill="#0B8C61" d="M19.57,19.013c0,0.693,0.564,1.257,1.256,1.257c0.692,0,1.256-0.564,1.256-1.257
c0-0.692-0.564-1.255-1.256-1.255C20.134,17.758,19.57,18.321,19.57,19.013z M21.832,19.013c0,0.555-0.451,1.007-1.006,1.007
c-0.555,0-1.006-0.452-1.006-1.007c0-0.554,0.451-1.005,1.006-1.005C21.381,18.008,21.832,18.459,21.832,19.013z"/>
<path fill="#0B8C61" d="M12.919,8.341L8.961,8.347l-0.004,0.97l-0.003,2.916c1.209-0.044,2.595-0.069,3.939-0.069
c0.452,0,0.9,0.003,1.334,0.009l-0.045-0.018L12.919,8.341z M12.893,11.663c-1.138,0-2.34,0.018-3.438,0.052l0.003-2.397
L9.46,8.846l3.098-0.005l0.935,2.824C13.294,11.664,13.094,11.663,12.893,11.663z"/>
<path fill="#0B8C61" d="M8.728,15.385c-1.142,0-2.07,0.929-2.07,2.07s0.928,2.069,2.07,2.069c1.141,0,2.069-0.928,2.069-2.069
S9.869,15.385,8.728,15.385z M8.728,19.023c-0.865,0-1.57-0.704-1.57-1.569c0-0.866,0.704-1.57,1.57-1.57
c0.865,0,1.569,0.704,1.569,1.57C10.297,18.32,9.593,19.023,8.728,19.023z"/>
</g>
</g>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:ns="&amp;ns_sfw;"
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"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="28px"
height="33px"
viewBox="0 0 28 33"
enable-background="new 0 0 28 33"
xml:space="preserve"
sodipodi:docname="green_producer.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)"><defs
id="defs29" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1803"
inkscape:window-height="857"
id="namedview27"
showgrid="false"
inkscape:zoom="17.609546"
inkscape:cx="3.0055332"
inkscape:cy="16.5"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="g20" />
<metadata
id="metadata2">
<ns:sfw>
<ns:slices />
<ns:sliceSourceBounds
height="96"
width="16383"
y="-85.5"
x="-8112"
bottomLeftOrigin="true" />
</ns:sfw>
<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>
<g
id="g24">
<path
opacity="0.25"
fill="#282828"
d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643 C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643 C24.988,26.679,20.059,25,14,25z"
id="path4" />
<g
id="g22">
<path
fill="#FFFFFF"
d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"
id="path6" />
<g
id="g20">
<path
fill="#C1122B"
d="M9.46,8.846L9.458,9.319l-0.003,2.397c1.098-0.034,2.3-0.052,3.438-0.052c0.201,0,0.401,0.001,0.6,0.002 l-0.935-2.824L9.46,8.846z"
id="path8"
style="fill:#0b8c61;fill-opacity:1" />
<circle
fill="#C1122B"
cx="8.728"
cy="17.454"
r="1.569"
id="circle10"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M12.395,17.13c-0.015-0.107-0.027-0.199-0.037-0.282c-0.047-0.382-0.165-0.741-0.325-1.075 c-0.049-0.096-0.097-0.193-0.155-0.285c-0.038-0.063-0.078-0.124-0.119-0.184c-0.514-0.723-1.278-1.251-2.166-1.464 c-0.202-0.04-0.409-0.061-0.619-0.061c-0.295,0-0.592,0.041-0.881,0.122c-0.276,0.077-0.487,0.112-0.685,0.112 c-0.027,0-0.048-0.008-0.074-0.009C5.969,14.557,5,15.892,5,17.455c0,2.055,1.672,3.727,3.728,3.727 c2.035,0,3.689-1.642,3.719-3.671l-0.041-0.296L12.395,17.13z M8.728,19.523c-1.142,0-2.07-0.928-2.07-2.069 s0.928-2.07,2.07-2.07c1.141,0,2.069,0.929,2.069,2.07S9.869,19.523,8.728,19.523z"
id="path12"
style="fill:#0b8c61;fill-opacity:1" />
<circle
fill="#C1122B"
cx="20.826"
cy="19.013"
r="1.006"
id="circle14"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M22.72,15.398c0.13-0.696,0.212-1.403,0.271-2.108c0.055-0.659-0.112-0.814-0.758-0.839 c-0.961-0.034-1.848-0.071-2.808-0.109c-0.029-0.001-0.077-0.022-0.077-0.06c0-0.724,0.037-2.484,0.037-2.484 S19.196,9.66,18.931,9.66c-0.116,0-0.247,0.026-0.383,0.103c0,0.821,0,1.654,0,2.527c0,0-1.172-0.031-2.844-0.065 c-0.074-0.002-0.281-0.128-0.378-0.392c-0.251-0.694-0.8-2.045-1.52-4.126c0,0-0.373-0.888-1.316-0.888c-0.781,0-4.679,0-4.679,0 v5.199c0,0-0.353,0.148-0.649,0.178c-0.078,0.472-0.067,0.711,0.115,0.784c0.46-0.15,0.942-0.252,1.451-0.252 c0.389,0,0.761,0.061,1.122,0.149c1.119,0.237,2.101,0.923,2.748,1.879c0.034,0.048,0.064,0.097,0.096,0.147 c0.094,0.151,0.179,0.306,0.255,0.47c0.083,0.167,0.154,0.338,0.217,0.515c0.004,0.012,0.008,0.024,0.011,0.037 c0.127,0.368,0.206,0.754,0.238,1.156c0.101,0.014,0.196,0.036,0.289,0.036c0.007,0,0.013,0,0.02,0 c2.176-0.056,4.355-0.06,6.529-0.169c-0.906,0.251-1.575,1.082-1.575,2.067c0,1.184,0.962,2.147,2.148,2.147 c1.184,0,2.147-0.963,2.147-2.147c0-1.071-0.79-1.958-1.816-2.119C22.761,16.794,22.451,16.842,22.72,15.398z M12.893,12.163 c-1.343,0-2.729,0.025-3.938,0.069l0.003-2.916l0.004-0.97l3.957-0.006l1.263,3.813l0.045,0.018 C13.793,12.166,13.345,12.163,12.893,12.163z M22.082,19.013c0,0.693-0.564,1.257-1.256,1.257c-0.692,0-1.256-0.564-1.256-1.257 c0-0.692,0.564-1.255,1.256-1.255C21.518,17.758,22.082,18.321,22.082,19.013z"
id="path16"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z M23.973,19.013 c0,1.735-1.412,3.147-3.147,3.147c-1.736,0-3.148-1.412-3.148-3.147c0-0.34,0.055-0.67,0.158-0.98 c-0.652,0.016-1.301,0.027-1.94,0.039c-0.716,0.013-1.431,0.025-2.137,0.043l-0.037,0.001h-0.018 c-0.102,0-0.208-0.014-0.315-0.03c-0.312,2.306-2.272,4.096-4.661,4.096C6.121,22.181,4,20.061,4,17.455 c0-1.725,0.939-3.222,2.323-4.047c-0.278-0.463-0.209-1.002-0.148-1.375L6.3,11.276l0.511-0.051V6.819v-1h1h4.679 c1.269,0,2.003,0.943,2.238,1.5l0.012,0.03l0.011,0.03c0.497,1.435,0.905,2.503,1.203,3.283c0.083,0.217,0.156,0.408,0.217,0.572 c0.531,0.011,0.998,0.022,1.376,0.031V9.763V9.177l0.512-0.286c0.273-0.153,0.566-0.23,0.872-0.23 c0.55,0,0.938,0.254,1.044,0.332l0.419,0.307l-0.011,0.52c0,0.001-0.017,0.815-0.028,1.56c0.635,0.025,1.257,0.05,1.916,0.073 c0.277,0.011,0.925,0.036,1.358,0.525c0.384,0.434,0.393,0.974,0.358,1.396c-0.07,0.848-0.161,1.55-0.284,2.208 c-0.04,0.216-0.066,0.397-0.089,0.547c-0.062,0.425-0.158,0.742-0.292,0.981C23.731,17.644,23.973,18.308,23.973,19.013z"
id="path18"
style="fill:#0b8c61;fill-opacity:1" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -1,67 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px"
viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve">
<metadata>
<sfw xmlns="&ns_sfw;">
<slices></slices>
<sliceSourceBounds height="96" width="16383" y="-85.5" x="-8112" bottomLeftOrigin="true"></sliceSourceBounds>
</sfw>
</metadata>
<g>
<path opacity="0.25" fill="#282828" d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643
C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643
C24.988,26.679,20.059,25,14,25z"/>
<g>
<path fill="#FFFFFF" d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"/>
<g>
<path fill="#C1122B" d="M9.46,8.846L9.458,9.319l-0.003,2.397c1.098-0.034,2.3-0.052,3.438-0.052c0.201,0,0.401,0.001,0.6,0.002
l-0.935-2.824L9.46,8.846z"/>
<circle fill="#C1122B" cx="8.728" cy="17.454" r="1.569"/>
<path fill="#C1122B" d="M12.395,17.13c-0.015-0.107-0.027-0.199-0.037-0.282c-0.047-0.382-0.165-0.741-0.325-1.075
c-0.049-0.096-0.097-0.193-0.155-0.285c-0.038-0.063-0.078-0.124-0.119-0.184c-0.514-0.723-1.278-1.251-2.166-1.464
c-0.202-0.04-0.409-0.061-0.619-0.061c-0.295,0-0.592,0.041-0.881,0.122c-0.276,0.077-0.487,0.112-0.685,0.112
c-0.027,0-0.048-0.008-0.074-0.009C5.969,14.557,5,15.892,5,17.455c0,2.055,1.672,3.727,3.728,3.727
c2.035,0,3.689-1.642,3.719-3.671l-0.041-0.296L12.395,17.13z M8.728,19.523c-1.142,0-2.07-0.928-2.07-2.069
s0.928-2.07,2.07-2.07c1.141,0,2.069,0.929,2.069,2.07S9.869,19.523,8.728,19.523z"/>
<circle fill="#C1122B" cx="20.826" cy="19.013" r="1.006"/>
<path fill="#C1122B" d="M22.72,15.398c0.13-0.696,0.212-1.403,0.271-2.108c0.055-0.659-0.112-0.814-0.758-0.839
c-0.961-0.034-1.848-0.071-2.808-0.109c-0.029-0.001-0.077-0.022-0.077-0.06c0-0.724,0.037-2.484,0.037-2.484
S19.196,9.66,18.931,9.66c-0.116,0-0.247,0.026-0.383,0.103c0,0.821,0,1.654,0,2.527c0,0-1.172-0.031-2.844-0.065
c-0.074-0.002-0.281-0.128-0.378-0.392c-0.251-0.694-0.8-2.045-1.52-4.126c0,0-0.373-0.888-1.316-0.888c-0.781,0-4.679,0-4.679,0
v5.199c0,0-0.353,0.148-0.649,0.178c-0.078,0.472-0.067,0.711,0.115,0.784c0.46-0.15,0.942-0.252,1.451-0.252
c0.389,0,0.761,0.061,1.122,0.149c1.119,0.237,2.101,0.923,2.748,1.879c0.034,0.048,0.064,0.097,0.096,0.147
c0.094,0.151,0.179,0.306,0.255,0.47c0.083,0.167,0.154,0.338,0.217,0.515c0.004,0.012,0.008,0.024,0.011,0.037
c0.127,0.368,0.206,0.754,0.238,1.156c0.101,0.014,0.196,0.036,0.289,0.036c0.007,0,0.013,0,0.02,0
c2.176-0.056,4.355-0.06,6.529-0.169c-0.906,0.251-1.575,1.082-1.575,2.067c0,1.184,0.962,2.147,2.148,2.147
c1.184,0,2.147-0.963,2.147-2.147c0-1.071-0.79-1.958-1.816-2.119C22.761,16.794,22.451,16.842,22.72,15.398z M12.893,12.163
c-1.343,0-2.729,0.025-3.938,0.069l0.003-2.916l0.004-0.97l3.957-0.006l1.263,3.813l0.045,0.018
C13.793,12.166,13.345,12.163,12.893,12.163z M22.082,19.013c0,0.693-0.564,1.257-1.256,1.257c-0.692,0-1.256-0.564-1.256-1.257
c0-0.692,0.564-1.255,1.256-1.255C21.518,17.758,22.082,18.321,22.082,19.013z"/>
<path fill="#C1122B" d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z M23.973,19.013
c0,1.735-1.412,3.147-3.147,3.147c-1.736,0-3.148-1.412-3.148-3.147c0-0.34,0.055-0.67,0.158-0.98
c-0.652,0.016-1.301,0.027-1.94,0.039c-0.716,0.013-1.431,0.025-2.137,0.043l-0.037,0.001h-0.018
c-0.102,0-0.208-0.014-0.315-0.03c-0.312,2.306-2.272,4.096-4.661,4.096C6.121,22.181,4,20.061,4,17.455
c0-1.725,0.939-3.222,2.323-4.047c-0.278-0.463-0.209-1.002-0.148-1.375L6.3,11.276l0.511-0.051V6.819v-1h1h4.679
c1.269,0,2.003,0.943,2.238,1.5l0.012,0.03l0.011,0.03c0.497,1.435,0.905,2.503,1.203,3.283c0.083,0.217,0.156,0.408,0.217,0.572
c0.531,0.011,0.998,0.022,1.376,0.031V9.763V9.177l0.512-0.286c0.273-0.153,0.566-0.23,0.872-0.23
c0.55,0,0.938,0.254,1.044,0.332l0.419,0.307l-0.011,0.52c0,0.001-0.017,0.815-0.028,1.56c0.635,0.025,1.257,0.05,1.916,0.073
c0.277,0.011,0.925,0.036,1.358,0.525c0.384,0.434,0.393,0.974,0.358,1.396c-0.07,0.848-0.161,1.55-0.284,2.208
c-0.04,0.216-0.066,0.397-0.089,0.547c-0.062,0.425-0.158,0.742-0.292,0.981C23.731,17.644,23.973,18.308,23.973,19.013z"/>
</g>
</g>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:ns="&amp;ns_sfw;"
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"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="28px"
height="33px"
viewBox="0 0 28 33"
enable-background="new 0 0 28 33"
xml:space="preserve"
sodipodi:docname="green_producer.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)"><defs
id="defs29" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1803"
inkscape:window-height="857"
id="namedview27"
showgrid="false"
inkscape:zoom="17.609546"
inkscape:cx="3.0055332"
inkscape:cy="16.5"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="g20" />
<metadata
id="metadata2">
<ns:sfw>
<ns:slices />
<ns:sliceSourceBounds
height="96"
width="16383"
y="-85.5"
x="-8112"
bottomLeftOrigin="true" />
</ns:sfw>
<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>
<g
id="g24">
<path
opacity="0.25"
fill="#282828"
d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643 C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643 C24.988,26.679,20.059,25,14,25z"
id="path4" />
<g
id="g22">
<path
fill="#FFFFFF"
d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"
id="path6" />
<g
id="g20">
<path
fill="#C1122B"
d="M9.46,8.846L9.458,9.319l-0.003,2.397c1.098-0.034,2.3-0.052,3.438-0.052c0.201,0,0.401,0.001,0.6,0.002 l-0.935-2.824L9.46,8.846z"
id="path8"
style="fill:#0b8c61;fill-opacity:1" />
<circle
fill="#C1122B"
cx="8.728"
cy="17.454"
r="1.569"
id="circle10"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M12.395,17.13c-0.015-0.107-0.027-0.199-0.037-0.282c-0.047-0.382-0.165-0.741-0.325-1.075 c-0.049-0.096-0.097-0.193-0.155-0.285c-0.038-0.063-0.078-0.124-0.119-0.184c-0.514-0.723-1.278-1.251-2.166-1.464 c-0.202-0.04-0.409-0.061-0.619-0.061c-0.295,0-0.592,0.041-0.881,0.122c-0.276,0.077-0.487,0.112-0.685,0.112 c-0.027,0-0.048-0.008-0.074-0.009C5.969,14.557,5,15.892,5,17.455c0,2.055,1.672,3.727,3.728,3.727 c2.035,0,3.689-1.642,3.719-3.671l-0.041-0.296L12.395,17.13z M8.728,19.523c-1.142,0-2.07-0.928-2.07-2.069 s0.928-2.07,2.07-2.07c1.141,0,2.069,0.929,2.069,2.07S9.869,19.523,8.728,19.523z"
id="path12"
style="fill:#0b8c61;fill-opacity:1" />
<circle
fill="#C1122B"
cx="20.826"
cy="19.013"
r="1.006"
id="circle14"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M22.72,15.398c0.13-0.696,0.212-1.403,0.271-2.108c0.055-0.659-0.112-0.814-0.758-0.839 c-0.961-0.034-1.848-0.071-2.808-0.109c-0.029-0.001-0.077-0.022-0.077-0.06c0-0.724,0.037-2.484,0.037-2.484 S19.196,9.66,18.931,9.66c-0.116,0-0.247,0.026-0.383,0.103c0,0.821,0,1.654,0,2.527c0,0-1.172-0.031-2.844-0.065 c-0.074-0.002-0.281-0.128-0.378-0.392c-0.251-0.694-0.8-2.045-1.52-4.126c0,0-0.373-0.888-1.316-0.888c-0.781,0-4.679,0-4.679,0 v5.199c0,0-0.353,0.148-0.649,0.178c-0.078,0.472-0.067,0.711,0.115,0.784c0.46-0.15,0.942-0.252,1.451-0.252 c0.389,0,0.761,0.061,1.122,0.149c1.119,0.237,2.101,0.923,2.748,1.879c0.034,0.048,0.064,0.097,0.096,0.147 c0.094,0.151,0.179,0.306,0.255,0.47c0.083,0.167,0.154,0.338,0.217,0.515c0.004,0.012,0.008,0.024,0.011,0.037 c0.127,0.368,0.206,0.754,0.238,1.156c0.101,0.014,0.196,0.036,0.289,0.036c0.007,0,0.013,0,0.02,0 c2.176-0.056,4.355-0.06,6.529-0.169c-0.906,0.251-1.575,1.082-1.575,2.067c0,1.184,0.962,2.147,2.148,2.147 c1.184,0,2.147-0.963,2.147-2.147c0-1.071-0.79-1.958-1.816-2.119C22.761,16.794,22.451,16.842,22.72,15.398z M12.893,12.163 c-1.343,0-2.729,0.025-3.938,0.069l0.003-2.916l0.004-0.97l3.957-0.006l1.263,3.813l0.045,0.018 C13.793,12.166,13.345,12.163,12.893,12.163z M22.082,19.013c0,0.693-0.564,1.257-1.256,1.257c-0.692,0-1.256-0.564-1.256-1.257 c0-0.692,0.564-1.255,1.256-1.255C21.518,17.758,22.082,18.321,22.082,19.013z"
id="path16"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z M23.973,19.013 c0,1.735-1.412,3.147-3.147,3.147c-1.736,0-3.148-1.412-3.148-3.147c0-0.34,0.055-0.67,0.158-0.98 c-0.652,0.016-1.301,0.027-1.94,0.039c-0.716,0.013-1.431,0.025-2.137,0.043l-0.037,0.001h-0.018 c-0.102,0-0.208-0.014-0.315-0.03c-0.312,2.306-2.272,4.096-4.661,4.096C6.121,22.181,4,20.061,4,17.455 c0-1.725,0.939-3.222,2.323-4.047c-0.278-0.463-0.209-1.002-0.148-1.375L6.3,11.276l0.511-0.051V6.819v-1h1h4.679 c1.269,0,2.003,0.943,2.238,1.5l0.012,0.03l0.011,0.03c0.497,1.435,0.905,2.503,1.203,3.283c0.083,0.217,0.156,0.408,0.217,0.572 c0.531,0.011,0.998,0.022,1.376,0.031V9.763V9.177l0.512-0.286c0.273-0.153,0.566-0.23,0.872-0.23 c0.55,0,0.938,0.254,1.044,0.332l0.419,0.307l-0.011,0.52c0,0.001-0.017,0.815-0.028,1.56c0.635,0.025,1.257,0.05,1.916,0.073 c0.277,0.011,0.925,0.036,1.358,0.525c0.384,0.434,0.393,0.974,0.358,1.396c-0.07,0.848-0.161,1.55-0.284,2.208 c-0.04,0.216-0.066,0.397-0.089,0.547c-0.062,0.425-0.158,0.742-0.292,0.981C23.731,17.644,23.973,18.308,23.973,19.013z"
id="path18"
style="fill:#0b8c61;fill-opacity:1" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -1,69 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px"
viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve">
<metadata>
<sfw xmlns="&ns_sfw;">
<slices></slices>
<sliceSourceBounds height="96" width="16383" y="-85.5" x="-8112" bottomLeftOrigin="true"></sliceSourceBounds>
</sfw>
</metadata>
<g>
<path opacity="0.25" fill="#282828" d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643
C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643
C24.988,26.679,20.059,25,14,25z"/>
<g>
<path fill="#FFFFFF" d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"/>
<g>
<path fill="#C1122B" d="M14,0C6.28,0,0,6.717,0,13.333c0,9.941,13.132,18.169,13.691,18.571C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.333C28,6.717,21.72,0,14,0z M14.002,30.908
C10.865,28.805,1,21.533,1,13.333C1,7.511,6.56,1,14,1c7.44,0,13,6.511,13,12.333C27,21.682,17.14,28.843,14.002,30.908z"/>
<path fill="#C1122B" d="M23.703,15.582c0.123-0.658,0.214-1.36,0.284-2.208c0.035-0.422,0.026-0.962-0.358-1.396
c-0.433-0.489-1.081-0.514-1.358-0.525c-0.659-0.024-1.281-0.048-1.916-0.073c0.011-0.745,0.028-1.56,0.028-1.56l0.011-0.52
l-0.419-0.307c-0.106-0.078-0.495-0.332-1.044-0.332c-0.306,0-0.599,0.077-0.872,0.23l-0.512,0.286v0.586v1.502
c-0.378-0.009-0.845-0.02-1.376-0.031c-0.062-0.164-0.135-0.355-0.217-0.572c-0.298-0.78-0.706-1.847-1.203-3.283l-0.011-0.03
l-0.013-0.03c-0.234-0.557-0.969-1.5-2.238-1.5H7.811h-1v1v4.407L6.3,11.276l-0.125,0.757c-0.061,0.373-0.13,0.911,0.148,1.375
C4.939,14.233,4,15.729,4,17.455c0,2.606,2.121,4.727,4.728,4.727c2.39,0,4.349-1.79,4.661-4.096
c0.107,0.016,0.212,0.03,0.315,0.03h0.018l0.037-0.001c0.706-0.018,1.421-0.031,2.137-0.043c0.639-0.011,1.288-0.023,1.94-0.039
c-0.103,0.311-0.158,0.641-0.158,0.98c0,1.735,1.412,3.147,3.148,3.147c1.736,0,3.147-1.412,3.147-3.147
c0-0.706-0.242-1.369-0.651-1.903c0.135-0.239,0.23-0.556,0.292-0.981C23.636,15.978,23.662,15.798,23.703,15.582z M8.728,21.181
C6.672,21.181,5,19.51,5,17.455c0-1.562,0.969-2.898,2.335-3.451c0.026,0.001,0.046,0.009,0.074,0.009
c0.197,0,0.409-0.034,0.685-0.112c0.289-0.081,0.586-0.122,0.881-0.122c0.21,0,0.417,0.021,0.619,0.061
c0.888,0.213,1.652,0.741,2.166,1.464c0.041,0.06,0.082,0.121,0.119,0.184c0.057,0.091,0.105,0.188,0.155,0.285
c0.16,0.334,0.279,0.693,0.325,1.075c0.009,0.083,0.022,0.176,0.037,0.283l0.011,0.082l0.041,0.296
C12.417,19.539,10.763,21.181,8.728,21.181z M22.973,19.013c0,1.184-0.964,2.147-2.147,2.147c-1.186,0-2.148-0.963-2.148-2.147
c0-0.985,0.669-1.815,1.575-2.067c-2.174,0.109-4.353,0.113-6.529,0.169c-0.007,0-0.013,0-0.02,0
c-0.092,0-0.188-0.022-0.289-0.036c-0.032-0.402-0.111-0.788-0.238-1.156c-0.004-0.012-0.007-0.024-0.011-0.037
c-0.063-0.177-0.134-0.348-0.217-0.515c-0.076-0.163-0.161-0.318-0.255-0.469c-0.032-0.05-0.062-0.099-0.096-0.147
c-0.646-0.956-1.628-1.642-2.748-1.879c-0.362-0.089-0.734-0.149-1.122-0.149c-0.509,0-0.991,0.102-1.451,0.252
c-0.181-0.073-0.192-0.312-0.115-0.784c0.296-0.029,0.649-0.178,0.649-0.178V6.819c0,0,3.899,0,4.679,0
c0.943,0,1.316,0.888,1.316,0.888c0.72,2.081,1.269,3.432,1.52,4.126c0.097,0.264,0.303,0.39,0.378,0.392
c1.672,0.035,2.844,0.065,2.844,0.065c0-0.873,0-1.706,0-2.527c0.136-0.076,0.267-0.103,0.383-0.103
c0.265,0,0.453,0.138,0.453,0.138s-0.037,1.76-0.037,2.484c0,0.038,0.048,0.059,0.077,0.06c0.961,0.038,1.848,0.075,2.808,0.109
c0.646,0.025,0.813,0.18,0.758,0.839c-0.059,0.705-0.14,1.412-0.271,2.108c-0.269,1.444,0.042,1.395-1.562,1.496
C22.183,17.055,22.973,17.943,22.973,19.013z"/>
<path fill="#C1122B" d="M19.57,19.013c0,0.693,0.564,1.257,1.256,1.257c0.692,0,1.256-0.564,1.256-1.257
c0-0.692-0.564-1.255-1.256-1.255C20.134,17.758,19.57,18.321,19.57,19.013z M21.832,19.013c0,0.555-0.451,1.007-1.006,1.007
c-0.555,0-1.006-0.452-1.006-1.007c0-0.554,0.451-1.005,1.006-1.005C21.381,18.008,21.832,18.459,21.832,19.013z"/>
<path fill="#C1122B" d="M12.919,8.341L8.961,8.347l-0.004,0.97l-0.003,2.916c1.209-0.044,2.595-0.069,3.939-0.069
c0.452,0,0.9,0.003,1.334,0.009l-0.045-0.018L12.919,8.341z M12.893,11.663c-1.138,0-2.34,0.018-3.438,0.052l0.003-2.397
L9.46,8.846l3.098-0.005l0.935,2.824C13.294,11.664,13.094,11.663,12.893,11.663z"/>
<path fill="#C1122B" d="M8.728,15.385c-1.142,0-2.07,0.929-2.07,2.07s0.928,2.069,2.07,2.069c1.141,0,2.069-0.928,2.069-2.069
S9.869,15.385,8.728,15.385z M8.728,19.023c-0.865,0-1.57-0.704-1.57-1.569c0-0.866,0.704-1.57,1.57-1.57
c0.865,0,1.569,0.704,1.569,1.57C10.297,18.32,9.593,19.023,8.728,19.023z"/>
</g>
</g>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:ns="&amp;ns_sfw;"
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"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="28px"
height="33px"
viewBox="0 0 28 33"
enable-background="new 0 0 28 33"
xml:space="preserve"
sodipodi:docname="green_producer.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)"><defs
id="defs29" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1803"
inkscape:window-height="857"
id="namedview27"
showgrid="false"
inkscape:zoom="17.609546"
inkscape:cx="3.0055332"
inkscape:cy="16.5"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="g20" />
<metadata
id="metadata2">
<ns:sfw>
<ns:slices />
<ns:sliceSourceBounds
height="96"
width="16383"
y="-85.5"
x="-8112"
bottomLeftOrigin="true" />
</ns:sfw>
<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>
<g
id="g24">
<path
opacity="0.25"
fill="#282828"
d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643 C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643 C24.988,26.679,20.059,25,14,25z"
id="path4" />
<g
id="g22">
<path
fill="#FFFFFF"
d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"
id="path6" />
<g
id="g20">
<path
fill="#C1122B"
d="M9.46,8.846L9.458,9.319l-0.003,2.397c1.098-0.034,2.3-0.052,3.438-0.052c0.201,0,0.401,0.001,0.6,0.002 l-0.935-2.824L9.46,8.846z"
id="path8"
style="fill:#0b8c61;fill-opacity:1" />
<circle
fill="#C1122B"
cx="8.728"
cy="17.454"
r="1.569"
id="circle10"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M12.395,17.13c-0.015-0.107-0.027-0.199-0.037-0.282c-0.047-0.382-0.165-0.741-0.325-1.075 c-0.049-0.096-0.097-0.193-0.155-0.285c-0.038-0.063-0.078-0.124-0.119-0.184c-0.514-0.723-1.278-1.251-2.166-1.464 c-0.202-0.04-0.409-0.061-0.619-0.061c-0.295,0-0.592,0.041-0.881,0.122c-0.276,0.077-0.487,0.112-0.685,0.112 c-0.027,0-0.048-0.008-0.074-0.009C5.969,14.557,5,15.892,5,17.455c0,2.055,1.672,3.727,3.728,3.727 c2.035,0,3.689-1.642,3.719-3.671l-0.041-0.296L12.395,17.13z M8.728,19.523c-1.142,0-2.07-0.928-2.07-2.069 s0.928-2.07,2.07-2.07c1.141,0,2.069,0.929,2.069,2.07S9.869,19.523,8.728,19.523z"
id="path12"
style="fill:#0b8c61;fill-opacity:1" />
<circle
fill="#C1122B"
cx="20.826"
cy="19.013"
r="1.006"
id="circle14"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M22.72,15.398c0.13-0.696,0.212-1.403,0.271-2.108c0.055-0.659-0.112-0.814-0.758-0.839 c-0.961-0.034-1.848-0.071-2.808-0.109c-0.029-0.001-0.077-0.022-0.077-0.06c0-0.724,0.037-2.484,0.037-2.484 S19.196,9.66,18.931,9.66c-0.116,0-0.247,0.026-0.383,0.103c0,0.821,0,1.654,0,2.527c0,0-1.172-0.031-2.844-0.065 c-0.074-0.002-0.281-0.128-0.378-0.392c-0.251-0.694-0.8-2.045-1.52-4.126c0,0-0.373-0.888-1.316-0.888c-0.781,0-4.679,0-4.679,0 v5.199c0,0-0.353,0.148-0.649,0.178c-0.078,0.472-0.067,0.711,0.115,0.784c0.46-0.15,0.942-0.252,1.451-0.252 c0.389,0,0.761,0.061,1.122,0.149c1.119,0.237,2.101,0.923,2.748,1.879c0.034,0.048,0.064,0.097,0.096,0.147 c0.094,0.151,0.179,0.306,0.255,0.47c0.083,0.167,0.154,0.338,0.217,0.515c0.004,0.012,0.008,0.024,0.011,0.037 c0.127,0.368,0.206,0.754,0.238,1.156c0.101,0.014,0.196,0.036,0.289,0.036c0.007,0,0.013,0,0.02,0 c2.176-0.056,4.355-0.06,6.529-0.169c-0.906,0.251-1.575,1.082-1.575,2.067c0,1.184,0.962,2.147,2.148,2.147 c1.184,0,2.147-0.963,2.147-2.147c0-1.071-0.79-1.958-1.816-2.119C22.761,16.794,22.451,16.842,22.72,15.398z M12.893,12.163 c-1.343,0-2.729,0.025-3.938,0.069l0.003-2.916l0.004-0.97l3.957-0.006l1.263,3.813l0.045,0.018 C13.793,12.166,13.345,12.163,12.893,12.163z M22.082,19.013c0,0.693-0.564,1.257-1.256,1.257c-0.692,0-1.256-0.564-1.256-1.257 c0-0.692,0.564-1.255,1.256-1.255C21.518,17.758,22.082,18.321,22.082,19.013z"
id="path16"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z M23.973,19.013 c0,1.735-1.412,3.147-3.147,3.147c-1.736,0-3.148-1.412-3.148-3.147c0-0.34,0.055-0.67,0.158-0.98 c-0.652,0.016-1.301,0.027-1.94,0.039c-0.716,0.013-1.431,0.025-2.137,0.043l-0.037,0.001h-0.018 c-0.102,0-0.208-0.014-0.315-0.03c-0.312,2.306-2.272,4.096-4.661,4.096C6.121,22.181,4,20.061,4,17.455 c0-1.725,0.939-3.222,2.323-4.047c-0.278-0.463-0.209-1.002-0.148-1.375L6.3,11.276l0.511-0.051V6.819v-1h1h4.679 c1.269,0,2.003,0.943,2.238,1.5l0.012,0.03l0.011,0.03c0.497,1.435,0.905,2.503,1.203,3.283c0.083,0.217,0.156,0.408,0.217,0.572 c0.531,0.011,0.998,0.022,1.376,0.031V9.763V9.177l0.512-0.286c0.273-0.153,0.566-0.23,0.872-0.23 c0.55,0,0.938,0.254,1.044,0.332l0.419,0.307l-0.011,0.52c0,0.001-0.017,0.815-0.028,1.56c0.635,0.025,1.257,0.05,1.916,0.073 c0.277,0.011,0.925,0.036,1.358,0.525c0.384,0.434,0.393,0.974,0.358,1.396c-0.07,0.848-0.161,1.55-0.284,2.208 c-0.04,0.216-0.066,0.397-0.089,0.547c-0.062,0.425-0.158,0.742-0.292,0.981C23.731,17.644,23.973,18.308,23.973,19.013z"
id="path18"
style="fill:#0b8c61;fill-opacity:1" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -1,51 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px"
viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve">
<metadata>
<sfw xmlns="&ns_sfw;">
<slices></slices>
<sliceSourceBounds height="96" width="16383" y="-85.5" x="-8112" bottomLeftOrigin="true"></sliceSourceBounds>
</sfw>
</metadata>
<g>
<path opacity="0.25" fill="#282828" d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643
C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643
C24.988,26.679,20.059,25,14,25z"/>
<g>
<path fill="#FFFFFF" d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"/>
<g>
<path fill="#C1122B" d="M13.999,8.546c-1.24,0-2.249,1.009-2.249,2.248c0,1.242,1.009,2.253,2.249,2.253
c1.241,0,2.251-1.01,2.251-2.253C16.25,9.555,15.24,8.546,13.999,8.546z"/>
<path fill="#C1122B" d="M14,6.348c-2.453,0-4.448,1.995-4.448,4.448c0,0.859,0.468,3.112,3.602,8.541l0.387,0.671l0.134,0.225
l0.09,0.15l0.043,0.072l0.085,0.144l0.108,0.178l0.104-0.172l0.036-0.061l0.088-0.149l0.032-0.054l0.19-0.319l0.395-0.685
c3.134-5.44,3.602-7.687,3.602-8.542C18.448,8.343,16.452,6.348,14,6.348z M13.999,13.797c-1.654,0-2.999-1.347-2.999-3.003
c0-1.655,1.346-2.998,2.999-2.998c1.655,0,3.001,1.345,3.001,2.998C17,12.451,15.654,13.797,13.999,13.797z"/>
<path fill="#C1122B" d="M14,0C6.28,0,0,6.717,0,13.333c0,9.941,13.132,18.169,13.691,18.571C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.333C28,6.717,21.72,0,14,0z M19.336,22.021
c-0.002,1.728-2.686,2.632-5.337,2.632c-2.652,0-5.337-0.905-5.337-2.634c0-1.158,1.352-2.099,3.465-2.462
c-1.721-3.01-3.577-6.721-3.577-8.76c0-3.004,2.444-5.448,5.448-5.448s5.448,2.444,5.449,5.447c0,2.036-1.858,5.75-3.578,8.762
C17.984,19.92,19.336,20.86,19.336,22.021z"/>
<path fill="#C1122B" d="M15.175,20.763c-0.029,0.048-0.059,0.1-0.088,0.148c-0.04,0.068-0.084,0.142-0.121,0.204
c-0.111,0.184-0.206,0.339-0.293,0.483c-0.021,0.03-0.042,0.066-0.061,0.096c-0.081,0.133-0.142,0.231-0.194,0.313
c-0.015,0.025-0.032,0.054-0.045,0.073c-0.052,0.082-0.08,0.125-0.08,0.125l-0.295,0.463l-0.293-0.463
c0,0-0.031-0.048-0.085-0.134c-0.006-0.009-0.013-0.023-0.019-0.029c-0.053-0.086-0.123-0.198-0.212-0.345
c-0.025-0.038-0.052-0.086-0.079-0.127c-0.083-0.136-0.17-0.278-0.274-0.448c-0.042-0.072-0.089-0.15-0.134-0.225
c-0.026-0.044-0.053-0.09-0.078-0.132l-0.381,0.061c-1.729,0.277-2.477,0.925-2.477,1.195c0,0.172,0.269,0.481,0.859,0.754
c0.8,0.37,1.926,0.574,3.172,0.574c2.608,0,4.031-0.878,4.031-1.329c0-0.269-0.748-0.917-2.476-1.195L15.175,20.763z"/>
</g>
</g>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:ns="&amp;ns_sfw;"
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"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="28px"
height="33px"
viewBox="0 0 28 33"
enable-background="new 0 0 28 33"
xml:space="preserve"
sodipodi:docname="green_hub.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)"><defs
id="defs25" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1041"
inkscape:window-height="590"
id="namedview23"
showgrid="false"
inkscape:zoom="7.1515152"
inkscape:cx="-9.0021186"
inkscape:cy="16.5"
inkscape:window-x="752"
inkscape:window-y="122"
inkscape:window-maximized="0"
inkscape:current-layer="g16" />
<metadata
id="metadata2">
<ns:sfw>
<ns:slices />
<ns:sliceSourceBounds
height="96"
width="16383"
y="-85.5"
x="-8112"
bottomLeftOrigin="true" />
</ns:sfw>
<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>
<g
id="g20">
<path
opacity="0.25"
fill="#282828"
d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643 C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643 C24.988,26.679,20.059,25,14,25z"
id="path4" />
<g
id="g18">
<path
fill="#FFFFFF"
d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"
id="path6" />
<g
id="g16">
<path
fill="#C1122B"
d="M13.999,8.546c-1.24,0-2.249,1.009-2.249,2.248c0,1.242,1.009,2.253,2.249,2.253 c1.241,0,2.251-1.01,2.251-2.253C16.25,9.555,15.24,8.546,13.999,8.546z"
id="path8"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M14,6.348c-2.453,0-4.448,1.995-4.448,4.448c0,0.859,0.468,3.112,3.602,8.541l0.387,0.671l0.134,0.225 l0.09,0.15l0.043,0.072l0.085,0.144l0.108,0.178l0.104-0.172l0.036-0.061l0.088-0.149l0.032-0.054l0.19-0.319l0.395-0.685 c3.134-5.44,3.602-7.687,3.602-8.542C18.448,8.343,16.452,6.348,14,6.348z M13.999,13.797c-1.654,0-2.999-1.347-2.999-3.003 c0-1.655,1.346-2.998,2.999-2.998c1.655,0,3.001,1.345,3.001,2.998C17,12.451,15.654,13.797,13.999,13.797z"
id="path10"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M14,0C6.28,0,0,6.717,0,13.333c0,9.941,13.132,18.169,13.691,18.571C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.333C28,6.717,21.72,0,14,0z M19.336,22.021 c-0.002,1.728-2.686,2.632-5.337,2.632c-2.652,0-5.337-0.905-5.337-2.634c0-1.158,1.352-2.099,3.465-2.462 c-1.721-3.01-3.577-6.721-3.577-8.76c0-3.004,2.444-5.448,5.448-5.448s5.448,2.444,5.449,5.447c0,2.036-1.858,5.75-3.578,8.762 C17.984,19.92,19.336,20.86,19.336,22.021z"
id="path12"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M15.175,20.763c-0.029,0.048-0.059,0.1-0.088,0.148c-0.04,0.068-0.084,0.142-0.121,0.204 c-0.111,0.184-0.206,0.339-0.293,0.483c-0.021,0.03-0.042,0.066-0.061,0.096c-0.081,0.133-0.142,0.231-0.194,0.313 c-0.015,0.025-0.032,0.054-0.045,0.073c-0.052,0.082-0.08,0.125-0.08,0.125l-0.295,0.463l-0.293-0.463 c0,0-0.031-0.048-0.085-0.134c-0.006-0.009-0.013-0.023-0.019-0.029c-0.053-0.086-0.123-0.198-0.212-0.345 c-0.025-0.038-0.052-0.086-0.079-0.127c-0.083-0.136-0.17-0.278-0.274-0.448c-0.042-0.072-0.089-0.15-0.134-0.225 c-0.026-0.044-0.053-0.09-0.078-0.132l-0.381,0.061c-1.729,0.277-2.477,0.925-2.477,1.195c0,0.172,0.269,0.481,0.859,0.754 c0.8,0.37,1.926,0.574,3.172,0.574c2.608,0,4.031-0.878,4.031-1.329c0-0.269-0.748-0.917-2.476-1.195L15.175,20.763z"
id="path14"
style="fill:#0b8c61;fill-opacity:1" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -1,51 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px"
viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve">
<metadata>
<sfw xmlns="&ns_sfw;">
<slices></slices>
<sliceSourceBounds height="96" width="16383" y="-85.5" x="-8112" bottomLeftOrigin="true"></sliceSourceBounds>
</sfw>
</metadata>
<g>
<path opacity="0.25" fill="#282828" d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643
C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643
C24.988,26.679,20.059,25,14,25z"/>
<g>
<path fill="#FFFFFF" d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"/>
<g>
<path fill="#C1122B" d="M14,0C6.28,0,0,6.717,0,13.333c0,9.941,13.132,18.169,13.691,18.571C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.333C28,6.717,21.72,0,14,0z M14.002,30.908
C10.865,28.805,1,21.533,1,13.333C1,7.511,6.56,1,14,1s13,6.511,13,12.333C27,21.682,17.14,28.843,14.002,30.908z"/>
<path fill="#C1122B" d="M14,7.796c-1.654,0-3,1.344-3,2.998c0,1.656,1.346,3.003,3,3.003c1.655,0,3-1.347,3-3.003
C17,9.141,15.654,7.796,14,7.796z M14,13.047c-1.24,0-2.25-1.01-2.25-2.253c0-1.24,1.009-2.248,2.25-2.248
c1.241,0,2.25,1.009,2.25,2.248C16.25,12.037,15.24,13.047,14,13.047z"/>
<path fill="#C1122B" d="M14,5.348c-3.004,0-5.448,2.444-5.448,5.448c0,2.039,1.856,5.75,3.577,8.76
c-2.113,0.363-3.465,1.304-3.465,2.462c0,1.729,2.685,2.634,5.337,2.634c2.65,0,5.335-0.904,5.337-2.632
c0-1.16-1.352-2.1-3.465-2.464c1.719-3.012,3.578-6.725,3.578-8.762C19.448,7.792,17.003,5.348,14,5.348z M18.031,22.018
c0,0.451-1.423,1.329-4.031,1.329c-1.246,0-2.372-0.204-3.172-0.574c-0.591-0.273-0.859-0.582-0.859-0.754
c0-0.269,0.748-0.917,2.477-1.195l0.381-0.061c0.025,0.042,0.053,0.088,0.078,0.132c0.045,0.075,0.092,0.153,0.134,0.225
c0.104,0.17,0.191,0.313,0.274,0.448c0.027,0.042,0.054,0.089,0.079,0.127c0.089,0.147,0.159,0.258,0.212,0.345
c0.006,0.007,0.013,0.021,0.019,0.029c0.053,0.086,0.085,0.134,0.085,0.134l0.293,0.463l0.295-0.463c0,0,0.028-0.044,0.08-0.125
c0.012-0.019,0.029-0.048,0.045-0.073c0.052-0.082,0.113-0.18,0.194-0.313c0.019-0.029,0.04-0.066,0.061-0.096
c0.086-0.143,0.181-0.298,0.293-0.483c0.037-0.063,0.081-0.136,0.121-0.204c0.029-0.048,0.06-0.1,0.088-0.148l0.38,0.061
C17.283,21.101,18.031,21.749,18.031,22.018z M14.847,19.337l-0.396,0.688l-0.189,0.316l-0.032,0.054l-0.089,0.151l-0.036,0.06
l-0.104,0.172L13.892,20.6l-0.085-0.144l-0.043-0.072l-0.09-0.15l-0.135-0.227l-0.387-0.67c-3.134-5.43-3.602-7.682-3.602-8.541
c0-2.453,1.995-4.448,4.448-4.448c2.453,0,4.448,1.995,4.449,4.447C18.449,11.65,17.981,13.897,14.847,19.337z"/>
</g>
</g>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:ns="&amp;ns_sfw;"
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"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="28px"
height="33px"
viewBox="0 0 28 33"
enable-background="new 0 0 28 33"
xml:space="preserve"
sodipodi:docname="green_hub.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)"><defs
id="defs25" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1041"
inkscape:window-height="590"
id="namedview23"
showgrid="false"
inkscape:zoom="7.1515152"
inkscape:cx="-9.0021186"
inkscape:cy="16.5"
inkscape:window-x="752"
inkscape:window-y="122"
inkscape:window-maximized="0"
inkscape:current-layer="g16" />
<metadata
id="metadata2">
<ns:sfw>
<ns:slices />
<ns:sliceSourceBounds
height="96"
width="16383"
y="-85.5"
x="-8112"
bottomLeftOrigin="true" />
</ns:sfw>
<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>
<g
id="g20">
<path
opacity="0.25"
fill="#282828"
d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643 C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643 C24.988,26.679,20.059,25,14,25z"
id="path4" />
<g
id="g18">
<path
fill="#FFFFFF"
d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"
id="path6" />
<g
id="g16">
<path
fill="#C1122B"
d="M13.999,8.546c-1.24,0-2.249,1.009-2.249,2.248c0,1.242,1.009,2.253,2.249,2.253 c1.241,0,2.251-1.01,2.251-2.253C16.25,9.555,15.24,8.546,13.999,8.546z"
id="path8"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M14,6.348c-2.453,0-4.448,1.995-4.448,4.448c0,0.859,0.468,3.112,3.602,8.541l0.387,0.671l0.134,0.225 l0.09,0.15l0.043,0.072l0.085,0.144l0.108,0.178l0.104-0.172l0.036-0.061l0.088-0.149l0.032-0.054l0.19-0.319l0.395-0.685 c3.134-5.44,3.602-7.687,3.602-8.542C18.448,8.343,16.452,6.348,14,6.348z M13.999,13.797c-1.654,0-2.999-1.347-2.999-3.003 c0-1.655,1.346-2.998,2.999-2.998c1.655,0,3.001,1.345,3.001,2.998C17,12.451,15.654,13.797,13.999,13.797z"
id="path10"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M14,0C6.28,0,0,6.717,0,13.333c0,9.941,13.132,18.169,13.691,18.571C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.333C28,6.717,21.72,0,14,0z M19.336,22.021 c-0.002,1.728-2.686,2.632-5.337,2.632c-2.652,0-5.337-0.905-5.337-2.634c0-1.158,1.352-2.099,3.465-2.462 c-1.721-3.01-3.577-6.721-3.577-8.76c0-3.004,2.444-5.448,5.448-5.448s5.448,2.444,5.449,5.447c0,2.036-1.858,5.75-3.578,8.762 C17.984,19.92,19.336,20.86,19.336,22.021z"
id="path12"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M15.175,20.763c-0.029,0.048-0.059,0.1-0.088,0.148c-0.04,0.068-0.084,0.142-0.121,0.204 c-0.111,0.184-0.206,0.339-0.293,0.483c-0.021,0.03-0.042,0.066-0.061,0.096c-0.081,0.133-0.142,0.231-0.194,0.313 c-0.015,0.025-0.032,0.054-0.045,0.073c-0.052,0.082-0.08,0.125-0.08,0.125l-0.295,0.463l-0.293-0.463 c0,0-0.031-0.048-0.085-0.134c-0.006-0.009-0.013-0.023-0.019-0.029c-0.053-0.086-0.123-0.198-0.212-0.345 c-0.025-0.038-0.052-0.086-0.079-0.127c-0.083-0.136-0.17-0.278-0.274-0.448c-0.042-0.072-0.089-0.15-0.134-0.225 c-0.026-0.044-0.053-0.09-0.078-0.132l-0.381,0.061c-1.729,0.277-2.477,0.925-2.477,1.195c0,0.172,0.269,0.481,0.859,0.754 c0.8,0.37,1.926,0.574,3.172,0.574c2.608,0,4.031-0.878,4.031-1.329c0-0.269-0.748-0.917-2.476-1.195L15.175,20.763z"
id="path14"
style="fill:#0b8c61;fill-opacity:1" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -1,52 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px"
viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve">
<metadata>
<sfw xmlns="&ns_sfw;">
<slices></slices>
<sliceSourceBounds height="96" width="16383" y="-85.5" x="-8112" bottomLeftOrigin="true"></sliceSourceBounds>
</sfw>
</metadata>
<g>
<path opacity="0.25" fill="#282828" d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643
C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643
C24.988,26.679,20.059,25,14,25z"/>
<g>
<path fill="#FFFFFF" d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"/>
<g>
<path fill="#C1122B" d="M21.552,10.282h-3.274l-1.683-2.709c-0.165-0.287-0.533-0.384-0.8-0.228
c-0.135,0.078-0.229,0.201-0.27,0.35c-0.041,0.153-0.019,0.315,0.062,0.457l1.359,2.129h-6.311l1.379-2.161
c0.066-0.114,0.087-0.271,0.046-0.421c-0.04-0.15-0.136-0.275-0.271-0.353c-0.266-0.156-0.64-0.053-0.787,0.202l-1.697,2.733
H6.448c-0.522,0-0.948,0.426-0.948,0.948v0.827c0,0.492,0.363,0.97,0.793,1.041l0.105,0.018h15.156l0.119-0.016
c0.44-0.058,0.827-0.545,0.827-1.043V11.23C22.5,10.708,22.074,10.282,21.552,10.282z"/>
<path fill="#C1122B" d="M8.057,20.02c0.007,0.222,0.122,0.337,0.263,0.337h11.365c0.142,0,0.257-0.115,0.257-0.256l0.007-0.1
l0.971-5.886H7.082L8.057,20.02z M17.116,16.074c0-0.298,0.22-0.539,0.518-0.539c0.297,0,0.516,0.241,0.516,0.539v2.017
c0,0.298-0.219,0.539-0.516,0.539c-0.298,0-0.518-0.241-0.518-0.539V16.074z M14.694,16.074c0-0.298,0.219-0.539,0.517-0.539
s0.517,0.241,0.517,0.539v2.017c0,0.298-0.219,0.539-0.517,0.539s-0.517-0.241-0.517-0.539V16.074z M12.272,16.074
c0-0.298,0.219-0.539,0.517-0.539c0.297,0,0.517,0.241,0.517,0.539v2.017c0,0.298-0.22,0.539-0.517,0.539
c-0.298,0-0.517-0.241-0.517-0.539V16.074z M9.85,16.074c0-0.298,0.219-0.539,0.517-0.539c0.297,0,0.516,0.241,0.516,0.539v2.017
c0,0.298-0.219,0.539-0.516,0.539c-0.298,0-0.517-0.241-0.517-0.539V16.074z"/>
<path fill="#C1122B" d="M14,0C6.28,0,0,6.717,0,13.333c0,9.941,13.132,18.169,13.691,18.571C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.333C28,6.717,21.72,0,14,0z M23.5,12.057
c0,0.863-0.567,1.661-1.325,1.942l-1.025,5.889c-0.015,0.976-0.889,1.831-1.94,1.831H8.744c-1.052,0-1.925-0.855-1.947-1.906
l-1.024-5.828C5.036,13.691,4.5,12.91,4.5,12.057V11.23c0-1.074,0.874-1.948,1.948-1.948H8.75l1.396-2.247
c0.4-0.698,1.417-0.978,2.145-0.555c0.755,0.435,1.015,1.403,0.58,2.159l-0.41,0.642h2.662l-0.39-0.61
c-0.227-0.391-0.284-0.823-0.174-1.235c0.109-0.406,0.37-0.745,0.734-0.955c0.716-0.417,1.739-0.148,2.159,0.579l1.381,2.223
h2.718c1.074,0,1.948,0.874,1.948,1.948V12.057z"/>
</g>
</g>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:ns="&amp;ns_sfw;"
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"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="28px"
height="33px"
viewBox="0 0 28 33"
enable-background="new 0 0 28 33"
xml:space="preserve"
sodipodi:docname="green_shop.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)"><defs
id="defs23" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1707"
inkscape:window-height="910"
id="namedview21"
showgrid="false"
inkscape:zoom="7.1515152"
inkscape:cx="-9.0021186"
inkscape:cy="16.5"
inkscape:window-x="32"
inkscape:window-y="20"
inkscape:window-maximized="0"
inkscape:current-layer="g14" />
<metadata
id="metadata2">
<ns:sfw>
<ns:slices />
<ns:sliceSourceBounds
height="96"
width="16383"
y="-85.5"
x="-8112"
bottomLeftOrigin="true" />
</ns:sfw>
<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>
<g
id="g18">
<path
opacity="0.25"
fill="#282828"
d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643 C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643 C24.988,26.679,20.059,25,14,25z"
id="path4" />
<g
id="g16">
<path
fill="#FFFFFF"
d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"
id="path6" />
<g
id="g14">
<path
fill="#C1122B"
d="M21.552,10.282h-3.274l-1.683-2.709c-0.165-0.287-0.533-0.384-0.8-0.228 c-0.135,0.078-0.229,0.201-0.27,0.35c-0.041,0.153-0.019,0.315,0.062,0.457l1.359,2.129h-6.311l1.379-2.161 c0.066-0.114,0.087-0.271,0.046-0.421c-0.04-0.15-0.136-0.275-0.271-0.353c-0.266-0.156-0.64-0.053-0.787,0.202l-1.697,2.733 H6.448c-0.522,0-0.948,0.426-0.948,0.948v0.827c0,0.492,0.363,0.97,0.793,1.041l0.105,0.018h15.156l0.119-0.016 c0.44-0.058,0.827-0.545,0.827-1.043V11.23C22.5,10.708,22.074,10.282,21.552,10.282z"
id="path8"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M8.057,20.02c0.007,0.222,0.122,0.337,0.263,0.337h11.365c0.142,0,0.257-0.115,0.257-0.256l0.007-0.1 l0.971-5.886H7.082L8.057,20.02z M17.116,16.074c0-0.298,0.22-0.539,0.518-0.539c0.297,0,0.516,0.241,0.516,0.539v2.017 c0,0.298-0.219,0.539-0.516,0.539c-0.298,0-0.518-0.241-0.518-0.539V16.074z M14.694,16.074c0-0.298,0.219-0.539,0.517-0.539 s0.517,0.241,0.517,0.539v2.017c0,0.298-0.219,0.539-0.517,0.539s-0.517-0.241-0.517-0.539V16.074z M12.272,16.074 c0-0.298,0.219-0.539,0.517-0.539c0.297,0,0.517,0.241,0.517,0.539v2.017c0,0.298-0.22,0.539-0.517,0.539 c-0.298,0-0.517-0.241-0.517-0.539V16.074z M9.85,16.074c0-0.298,0.219-0.539,0.517-0.539c0.297,0,0.516,0.241,0.516,0.539v2.017 c0,0.298-0.219,0.539-0.516,0.539c-0.298,0-0.517-0.241-0.517-0.539V16.074z"
id="path10"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M14,0C6.28,0,0,6.717,0,13.333c0,9.941,13.132,18.169,13.691,18.571C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.333C28,6.717,21.72,0,14,0z M23.5,12.057 c0,0.863-0.567,1.661-1.325,1.942l-1.025,5.889c-0.015,0.976-0.889,1.831-1.94,1.831H8.744c-1.052,0-1.925-0.855-1.947-1.906 l-1.024-5.828C5.036,13.691,4.5,12.91,4.5,12.057V11.23c0-1.074,0.874-1.948,1.948-1.948H8.75l1.396-2.247 c0.4-0.698,1.417-0.978,2.145-0.555c0.755,0.435,1.015,1.403,0.58,2.159l-0.41,0.642h2.662l-0.39-0.61 c-0.227-0.391-0.284-0.823-0.174-1.235c0.109-0.406,0.37-0.745,0.734-0.955c0.716-0.417,1.739-0.148,2.159,0.579l1.381,2.223 h2.718c1.074,0,1.948,0.874,1.948,1.948V12.057z"
id="path12"
style="fill:#0b8c61;fill-opacity:1" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -1,73 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="33px"
viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve">
<metadata>
<sfw xmlns="&ns_sfw;">
<slices></slices>
<sliceSourceBounds height="96" width="16383" y="-85.5" x="-8112" bottomLeftOrigin="true"></sliceSourceBounds>
</sfw>
</metadata>
<g>
<path opacity="0.25" fill="#282828" d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643
C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643
C24.988,26.679,20.059,25,14,25z"/>
<g>
<path fill="#FFFFFF" d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"/>
<path fill="#C1122B" d="M14,0C6.28,0,0,6.717,0,13.333c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32
c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.333C28,6.717,21.72,0,14,0z M14.002,30.908
C10.865,28.805,1,21.533,1,13.333C1,7.511,6.56,1,14,1s13,6.511,13,12.333C27,21.682,17.14,28.843,14.002,30.908z"/>
<g>
<g>
<path fill="#C1122B" d="M19.457,22.366H8.494c-1.074,0-1.965-0.873-1.988-1.946l-1.079-6.143
C4.661,13.986,4.1,13.177,4.1,12.295v-0.866c0-1.097,0.892-1.989,1.988-1.989h2.441l1.479-2.379
c0.408-0.709,1.438-0.99,2.177-0.563c0.37,0.214,0.635,0.559,0.747,0.973c0.11,0.413,0.054,0.846-0.16,1.216l-0.479,0.751h2.98
L14.813,8.72c-0.229-0.395-0.288-0.833-0.177-1.251c0.11-0.413,0.375-0.758,0.745-0.971c0.731-0.428,1.766-0.151,2.191,0.588
l1.463,2.354h2.877c1.096,0,1.988,0.892,1.988,1.989v0.866c0,0.894-0.594,1.719-1.382,1.996l-1.08,6.199
C21.423,21.492,20.532,22.366,19.457,22.366z M6.088,10.383c-0.576,0-1.045,0.47-1.045,1.046v0.866
c0,0.54,0.401,1.064,0.874,1.143l0.33,0.055l1.195,6.836c0.019,0.635,0.488,1.094,1.052,1.094h10.964
c0.565,0,1.034-0.459,1.045-1.023l1.199-6.915l0.344-0.045c0.494-0.064,0.912-0.588,0.912-1.145v-0.866
c0-0.576-0.469-1.046-1.045-1.046H18.51L16.762,7.57c-0.186-0.324-0.605-0.433-0.909-0.256
c-0.153,0.088-0.262,0.229-0.307,0.398c-0.046,0.175-0.021,0.358,0.072,0.518l1.373,2.152h-6.42l1.393-2.183
c0.077-0.134,0.1-0.313,0.055-0.483c-0.046-0.17-0.156-0.313-0.308-0.401c-0.304-0.179-0.729-0.061-0.895,0.23l-1.763,2.838
H6.088z"/>
</g>
<g>
<path fill="#C1122B" d="M19.956,21.986H8.049c-0.697,0-1.264-0.566-1.264-1.263l-1.207-7.266h16.845l-1.204,7.282
C21.22,21.419,20.653,21.986,19.956,21.986z M6.69,14.399l1.031,6.247c0.006,0.253,0.151,0.397,0.328,0.397h11.907
c0.177,0,0.321-0.144,0.321-0.32l0.006-0.097l1.029-6.226H6.69z"/>
</g>
<g>
<g>
<path fill="#C1122B" d="M17.807,19.181c0.311,0,0.541-0.253,0.541-0.565v-2.113c0-0.312-0.23-0.565-0.541-0.565
c-0.312,0-0.542,0.253-0.542,0.565v2.113C17.264,18.929,17.495,19.181,17.807,19.181z"/>
</g>
<g>
<path fill="#C1122B" d="M15.268,19.181c0.312,0,0.542-0.253,0.542-0.565v-2.113c0-0.312-0.23-0.565-0.542-0.565
s-0.542,0.253-0.542,0.565v2.113C14.727,18.929,14.957,19.181,15.268,19.181z"/>
</g>
<g>
<path fill="#C1122B" d="M12.731,19.181c0.311,0,0.542-0.253,0.542-0.565v-2.113c0-0.312-0.23-0.565-0.542-0.565
c-0.312,0-0.542,0.253-0.542,0.565v2.113C12.19,18.929,12.419,19.181,12.731,19.181z"/>
</g>
<g>
<path fill="#C1122B" d="M10.194,19.181c0.311,0,0.541-0.253,0.541-0.565v-2.113c0-0.312-0.23-0.565-0.541-0.565
c-0.312,0-0.542,0.253-0.542,0.565v2.113C9.652,18.929,9.882,19.181,10.194,19.181z"/>
</g>
</g>
</g>
</g>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:ns="&amp;ns_sfw;"
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"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="28px"
height="33px"
viewBox="0 0 28 33"
enable-background="new 0 0 28 33"
xml:space="preserve"
sodipodi:docname="green_shop.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)"><defs
id="defs23" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1707"
inkscape:window-height="910"
id="namedview21"
showgrid="false"
inkscape:zoom="7.1515152"
inkscape:cx="-9.0021186"
inkscape:cy="16.5"
inkscape:window-x="32"
inkscape:window-y="20"
inkscape:window-maximized="0"
inkscape:current-layer="g14" />
<metadata
id="metadata2">
<ns:sfw>
<ns:slices />
<ns:sliceSourceBounds
height="96"
width="16383"
y="-85.5"
x="-8112"
bottomLeftOrigin="true" />
</ns:sfw>
<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>
<g
id="g18">
<path
opacity="0.25"
fill="#282828"
d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643 C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643 C24.988,26.679,20.059,25,14,25z"
id="path4" />
<g
id="g16">
<path
fill="#FFFFFF"
d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z"
id="path6" />
<g
id="g14">
<path
fill="#C1122B"
d="M21.552,10.282h-3.274l-1.683-2.709c-0.165-0.287-0.533-0.384-0.8-0.228 c-0.135,0.078-0.229,0.201-0.27,0.35c-0.041,0.153-0.019,0.315,0.062,0.457l1.359,2.129h-6.311l1.379-2.161 c0.066-0.114,0.087-0.271,0.046-0.421c-0.04-0.15-0.136-0.275-0.271-0.353c-0.266-0.156-0.64-0.053-0.787,0.202l-1.697,2.733 H6.448c-0.522,0-0.948,0.426-0.948,0.948v0.827c0,0.492,0.363,0.97,0.793,1.041l0.105,0.018h15.156l0.119-0.016 c0.44-0.058,0.827-0.545,0.827-1.043V11.23C22.5,10.708,22.074,10.282,21.552,10.282z"
id="path8"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M8.057,20.02c0.007,0.222,0.122,0.337,0.263,0.337h11.365c0.142,0,0.257-0.115,0.257-0.256l0.007-0.1 l0.971-5.886H7.082L8.057,20.02z M17.116,16.074c0-0.298,0.22-0.539,0.518-0.539c0.297,0,0.516,0.241,0.516,0.539v2.017 c0,0.298-0.219,0.539-0.516,0.539c-0.298,0-0.518-0.241-0.518-0.539V16.074z M14.694,16.074c0-0.298,0.219-0.539,0.517-0.539 s0.517,0.241,0.517,0.539v2.017c0,0.298-0.219,0.539-0.517,0.539s-0.517-0.241-0.517-0.539V16.074z M12.272,16.074 c0-0.298,0.219-0.539,0.517-0.539c0.297,0,0.517,0.241,0.517,0.539v2.017c0,0.298-0.22,0.539-0.517,0.539 c-0.298,0-0.517-0.241-0.517-0.539V16.074z M9.85,16.074c0-0.298,0.219-0.539,0.517-0.539c0.297,0,0.516,0.241,0.516,0.539v2.017 c0,0.298-0.219,0.539-0.516,0.539c-0.298,0-0.517-0.241-0.517-0.539V16.074z"
id="path10"
style="fill:#0b8c61;fill-opacity:1" />
<path
fill="#C1122B"
d="M14,0C6.28,0,0,6.717,0,13.333c0,9.941,13.132,18.169,13.691,18.571C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.333C28,6.717,21.72,0,14,0z M23.5,12.057 c0,0.863-0.567,1.661-1.325,1.942l-1.025,5.889c-0.015,0.976-0.889,1.831-1.94,1.831H8.744c-1.052,0-1.925-0.855-1.947-1.906 l-1.024-5.828C5.036,13.691,4.5,12.91,4.5,12.057V11.23c0-1.074,0.874-1.948,1.948-1.948H8.75l1.396-2.247 c0.4-0.698,1.417-0.978,2.145-0.555c0.755,0.435,1.015,1.403,0.58,2.159l-0.41,0.642h2.662l-0.39-0.61 c-0.227-0.391-0.284-0.823-0.174-1.235c0.109-0.406,0.37-0.745,0.734-0.955c0.716-0.417,1.739-0.148,2.159,0.579l1.381,2.223 h2.718c1.074,0,1.948,0.874,1.948,1.948V12.057z"
id="path12"
style="fill:#0b8c61;fill-opacity:1" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="18" viewBox="0 0 20 18">
<path fill="#FFF" fill-opacity=".5" fill-rule="nonzero" d="M18.338 10.593l1.64-7.312a.841.841 0 0 0-.812-1.031H5.528L5.21.675A.836.836 0 0 0 4.393 0H.833A.839.839 0 0 0 0 .844v.562c0 .466.373.844.833.844H3.26l2.439 12.074c-.584.34-.977.977-.977 1.707 0 1.088.87 1.969 1.945 1.969 1.074 0 1.944-.881 1.944-1.969 0-.55-.224-1.049-.584-1.406h7.28c-.36.357-.585.855-.585 1.406 0 1.088.87 1.969 1.945 1.969 1.074 0 1.944-.881 1.944-1.969 0-.78-.447-1.453-1.096-1.772l.191-.853a.841.841 0 0 0-.812-1.031h-9.32l-.228-1.125h10.179c.389 0 .726-.273.813-.657z"/>
</svg>

After

Width:  |  Height:  |  Size: 648 B

View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<path d="M0 0h16v16H0z"/>
<path fill="#F4704C" d="M13.85 5.928h-1.234v-1.54c0-2.338-2.026-4.234-4.525-4.234-2.5 0-4.526 1.896-4.526 4.235v1.54H2.33c-.682 0-1.235.516-1.235 1.154v7.7c0 .637.553 1.154 1.235 1.154h11.52c.681 0 1.234-.517 1.234-1.154v-7.7c0-.638-.553-1.155-1.234-1.155zM4.8 4.388c0-1.7 1.473-3.08 3.29-3.08 1.818 0 3.292 1.38 3.292 3.08v1.54H4.799v-1.54z"/>
<path fill="#FFF" d="M8.296 13.23c1.243 0 2.25-.942 2.25-2.105 0-1.162-1.007-2.105-2.25-2.105-1.242 0-2.25.943-2.25 2.105.003 1.162 1.009 2.103 2.25 2.106zm0-3.211c.654 0 1.183.495 1.183 1.106 0 .612-.53 1.107-1.183 1.107s-1.183-.495-1.183-1.107c0-.61.53-1.106 1.183-1.106z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 812 B

View File

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<defs>
<path id="a" d="M15 15.2a.79.79 0 0 1-.778.8H1.778A.79.79 0 0 1 1 15.2v-2.4c0-2.21 1.741-4 3.889-4h6.222c2.148 0 3.889 1.79 3.889 4v2.4zM8 8C5.852 8 4.111 6.21 4.111 4S5.852 0 8 0c2.148 0 3.889 1.79 3.889 4S10.148 8 8 8z"/>
</defs>
<use fill="#F4704C" fill-rule="nonzero" xlink:href="#a"/>
</svg>

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -15,7 +15,6 @@
//= require angular-animate
//= require angular-sanitize
//= require admin/spree_backend
//= require admin/spree_auth
//= require admin/spree_paypal_express
//= require ../shared/ng-infinite-scroll.min.js
//= require ../shared/ng-tags-input.min.js

View File

@@ -1 +1,26 @@
angular.module("admin.enterprises", [
angular.module("admin.enterprises", [
"admin.paymentMethods",
"admin.utils",
"admin.shippingMethods",
"admin.users",
"textAngular",
"admin.side_menu",
"admin.taxons",
'admin.indexUtils',
'admin.tagRules',
'admin.dropdown',
'ngSanitize']
)
# For more options: https://github.com/textAngular/textAngular/blob/master/src/textAngularSetup.js
.config [
'$provide', ($provide) ->
$provide.decorator 'taTranslations', [
'$delegate'
(taTranslations) ->
taTranslations.insertLink = {
tooltip: t('admin.enterprises.form.shop_preferences.shopfront_message_link_tooltip'),
dialogPrompt: t('admin.enterprises.form.shop_preferences.shopfront_message_link_prompt')
}
taTranslations
]
]

View File

@@ -5,7 +5,7 @@ angular.module('admin.orderCycles')
$scope.distributor_enterprises = Enterprise.hub_enterprises
$scope.supplied_products = Enterprise.supplied_products
$scope.enterprise_fees = EnterpriseFee.index(coordinator_id: ocInstance.coordinator_id)
$scope.schedules = Schedules.index()
$scope.schedules = Schedules.index({enterprise_id: ocInstance.coordinator_id})
$scope.OrderCycle = OrderCycle
$scope.order_cycle = OrderCycle.new({ coordinator_id: ocInstance.coordinator_id})

View File

@@ -1,12 +1,12 @@
angular.module('admin.orderCycles')
.controller 'AdminEditOrderCycleCtrl', ($scope, $filter, $location, $window, OrderCycle, Enterprise, EnterpriseFee, StatusMessage, Schedules, RequestMonitor) ->
.controller 'AdminEditOrderCycleCtrl', ($scope, $filter, $location, $window, OrderCycle, Enterprise, EnterpriseFee, StatusMessage, Schedules, RequestMonitor, ocInstance) ->
order_cycle_id = $location.absUrl().match(/\/admin\/order_cycles\/(\d+)/)[1]
$scope.enterprises = Enterprise.index(order_cycle_id: order_cycle_id)
$scope.supplier_enterprises = Enterprise.producer_enterprises
$scope.distributor_enterprises = Enterprise.hub_enterprises
$scope.supplied_products = Enterprise.supplied_products
$scope.enterprise_fees = EnterpriseFee.index(order_cycle_id: order_cycle_id)
$scope.schedules = Schedules.index()
$scope.schedules = Schedules.index({enterprise_id: ocInstance.coordinator_id})
$scope.OrderCycle = OrderCycle
$scope.order_cycle = OrderCycle.load(order_cycle_id)

View File

@@ -1,7 +1,7 @@
angular.module('admin.orderCycles').controller "AdminSimpleCreateOrderCycleCtrl", ($scope, $window, OrderCycle, Enterprise, EnterpriseFee, StatusMessage, Schedules, RequestMonitor, ocInstance) ->
$scope.StatusMessage = StatusMessage
$scope.OrderCycle = OrderCycle
$scope.schedules = Schedules.index()
$scope.schedules = Schedules.index({enterprise_id: ocInstance.coordinator_id})
$scope.order_cycle = OrderCycle.new {coordinator_id: ocInstance.coordinator_id}, =>
# TODO: make this a get method, which only fetches one enterprise
$scope.enterprises = Enterprise.index {coordinator_id: ocInstance.coordinator_id}, (enterprises) =>

View File

@@ -1,11 +1,11 @@
angular.module('admin.orderCycles').controller "AdminSimpleEditOrderCycleCtrl", ($scope, $location, $window, OrderCycle, Enterprise, EnterpriseFee, Schedules, RequestMonitor, StatusMessage) ->
angular.module('admin.orderCycles').controller "AdminSimpleEditOrderCycleCtrl", ($scope, $location, $window, OrderCycle, Enterprise, EnterpriseFee, Schedules, RequestMonitor, StatusMessage, ocInstance) ->
$scope.orderCycleId = ->
$location.absUrl().match(/\/admin\/order_cycles\/(\d+)/)[1]
$scope.StatusMessage = StatusMessage
$scope.enterprises = Enterprise.index(order_cycle_id: $scope.orderCycleId())
$scope.enterprise_fees = EnterpriseFee.index(order_cycle_id: $scope.orderCycleId())
$scope.schedules = Schedules.index()
$scope.schedules = Schedules.index({enterprise_id: ocInstance.coordinator_id})
$scope.OrderCycle = OrderCycle
$scope.order_cycle = OrderCycle.load $scope.orderCycleId(), (order_cycle) =>
$scope.init()

View File

@@ -47,7 +47,7 @@ angular.module("admin.orderCycles").directive 'scheduleDialog', ($window, $compi
scope.schedule_form.$setPristine()
scope.submitted = true
scope.errors = []
return scope.errors.push(t('admin.order_cycles.index.no_order_cycles_error')) unless scope.selectedOrderCycles.length > 0
return scope.errors.push(t('js.admin.order_cycles.schedules.no_order_cycles_error')) unless scope.selectedOrderCycles.length > 0
scope.schedule.order_cycle_ids = scope.selectedOrderCycles.map (oc) -> oc.id
if scope.schedule_form.$valid
method = if scope.schedule.id? then Schedules.update else Schedules.add

View File

@@ -24,8 +24,3 @@ angular.module("admin.orders").controller "orderCtrl", ($scope, shops, orderCycl
for shop in $scope.shops
shop.disabled = !$scope.distributorHasOrderCycles(shop)
# Removes the split button introduced by spree in the order form
# We only have one stock location in OFN so it's meaningless to split the order between stock locations
# We delete it instead of hiding or changing CSS so that, when spree code toggles the element, nothing hapens
$('.split-item').remove()

View File

@@ -1 +1 @@
angular.module("admin.products", ["textAngular", "admin.utils"])
angular.module("admin.products", ["textAngular", "admin.utils"])

View File

@@ -3,6 +3,8 @@ angular.module("admin.resources").factory 'ScheduleResource', ($resource) ->
'index':
method: 'GET'
isArray: true
params:
enterprise_id: '@enterprise_id'
'create':
method: 'POST'
'update':

View File

@@ -17,7 +17,7 @@ angular.module("admin.resources").factory "Schedules", ($q, $injector, RequestMo
@byID[schedule.id] = schedule if schedule.id?
Dereferencer.dereference(schedule.order_cycles, OrderCycles.byID)
orderCycle.schedules.push(schedule) for orderCycle in schedule.order_cycles
StatusMessage.display 'success', "#{t('admin.order_cycles.index.created_schedule')}: '#{schedule.name}'"
StatusMessage.display 'success', "#{t('js.admin.order_cycles.schedules.created_schedule')}: '#{schedule.name}'"
update: (params) =>
ScheduleResource.update params, (schedule) =>
@@ -29,7 +29,7 @@ angular.module("admin.resources").factory "Schedules", ($q, $injector, RequestMo
for orderCycle in schedule.order_cycles when orderCycle.id not in @byID[schedule.id].order_cycle_ids
orderCycle.schedules.push(@byID[schedule.id])
angular.extend(@byID[schedule.id], schedule)
StatusMessage.display 'success', "#{t('admin.order_cycles.index.updated_schedule')}: '#{schedule.name}'"
StatusMessage.display 'success', "#{t('js.admin.order_cycles.schedules.updated_schedule')}: '#{schedule.name}'"
remove: (schedule) ->
params = id: schedule.id
@@ -38,9 +38,9 @@ angular.module("admin.resources").factory "Schedules", ($q, $injector, RequestMo
if orderCycle.schedules # Only if we need to update the schedules
orderCycle.schedules.splice(i, 1) for s, i in orderCycle.schedules by -1 when s.id == schedule.id
delete @byID[schedule.id]
StatusMessage.display 'success', "#{t('admin.order_cycles.index.deleted_schedule')}: '#{schedule.name}'"
StatusMessage.display 'success', "#{t('js.admin.order_cycles.schedules.deleted_schedule')}: '#{schedule.name}'"
index: ->
request = ScheduleResource.index (data) => @load(data)
index: (params) ->
request = ScheduleResource.index params, (data) => @load(data)
RequestMonitor.load(request.$promise)
request

View File

@@ -5,6 +5,7 @@ angular.module("admin.subscriptions").controller "OrderUpdateIssuesController",
OrderCycles.byID[id].name
$scope.orderCycleCloses = (id) ->
closes_at = moment(OrderCycles.byID[id].orders_close_at)
text = if closes_at > moment() then t('js.closes') else t('js.closed')
closes_at = moment(OrderCycles.byID[id].orders_close_at, "YYYY-MM-DD HH:mm:SS Z")
key = if closes_at > moment() then "closes" else "closed"
text = t("js.subscriptions." + key)
"#{text} #{closes_at.fromNow()}"

View File

@@ -15,7 +15,7 @@ angular.module("admin.subscriptions").controller "OrdersPanelController", ($scop
$scope.orderCycleCloses = (id) ->
oc = OrderCycles.byID[id]
return t('js.subscriptions.close_date_not_set') unless oc?.orders_close_at?
closes_at = moment(oc.orders_close_at)
closes_at = moment(oc.orders_close_at, "YYYY-MM-DD HH:mm:SS Z")
text = if closes_at > moment() then t('js.subscriptions.closes') else t('js.subscriptions.closed')
"#{text} #{closes_at.fromNow()}"

View File

@@ -10,14 +10,14 @@ angular.module("admin.subscriptions").controller "ProductsPanelController", ($sc
$scope.save = ->
$scope.saving = true
StatusMessage.display 'progress', 'Saving...'
StatusMessage.display 'progress', t('js.saving')
$scope.subscription.update().then (response) ->
$scope.saving = false
StatusMessage.display 'success', 'Saved'
StatusMessage.display 'success', t('js.changes_saved')
, (response) ->
$scope.saving = false
if response.data?.errors?
keys = Object.keys(response.data.errors)
StatusMessage.display 'failure', response.data.errors[keys[0]][0]
else
StatusMessage.display 'success', 'Saved'
StatusMessage.display 'success', t('js.changes_saved')

View File

@@ -4,8 +4,8 @@ angular.module("admin.tagRules").directive "tagRule", ->
link: (scope, element, attrs) ->
scope.opt =
"TagRule::FilterShippingMethods":
textTop: "Shipping methods tagged"
textBottom: "are:"
textTop: t('js.admin.tag_rules.shipping_method_tagged_top')
textBottom: t('js.admin.tag_rules.shipping_method_tagged_bottom')
taggable: "shipping_method"
tagsAttr: "shipping_method_tags"
tagListAttr: "preferred_shipping_method_tags"
@@ -13,8 +13,8 @@ angular.module("admin.tagRules").directive "tagRule", ->
tagListFor: (rule) ->
rule.preferred_shipping_method_tags
"TagRule::FilterPaymentMethods":
textTop: "Payment methods tagged"
textBottom: "are:"
textTop: t('js.admin.tag_rules.payment_method_tagged_top')
textBottom: t('js.admin.tag_rules.payment_method_tagged_bottom')
taggable: "payment_method"
tagsAttr: "payment_method_tags"
tagListAttr: "preferred_payment_method_tags"
@@ -22,8 +22,8 @@ angular.module("admin.tagRules").directive "tagRule", ->
tagListFor: (rule) ->
rule.preferred_payment_method_tags
"TagRule::FilterOrderCycles":
textTop: "Order Cycles tagged"
textBottom: "are:"
textTop: t('js.admin.tag_rules.order_cycle_tagged_top')
textBottom: t('js.admin.tag_rules.order_cycle_tagged_bottom')
taggable: "exchange"
tagsAttr: "exchange_tags"
tagListAttr: "preferred_exchange_tags"
@@ -31,8 +31,8 @@ angular.module("admin.tagRules").directive "tagRule", ->
tagListFor: (rule) ->
rule.preferred_exchange_tags
"TagRule::FilterProducts":
textTop: "Inventory variants tagged"
textBottom: "are:"
textTop: t('js.admin.tag_rules.inventory_tagged_top')
textBottom: t('js.admin.tag_rules.inventory_tagged_bottom')
taggable: "variant"
tagsAttr: "variant_tags"
tagListAttr: "preferred_variant_tags"

View File

@@ -1,12 +0,0 @@
Darkswarm.controller "GroupEnterpriseNodeCtrl", ($scope, CurrentHub) ->
$scope.active = false
$scope.toggle = ->
$scope.active = !$scope.active
$scope.open = ->
$scope.active
$scope.current = ->
$scope.hub.id is CurrentHub.hub.id

View File

@@ -1,22 +1,6 @@
Darkswarm.controller "GroupPageCtrl", ($scope, group_enterprises, Enterprises, MapConfiguration, OfnMap, visibleFilter, Navigation) ->
Darkswarm.controller "GroupPageCtrl", ($scope, enterprises, Enterprises, MapConfiguration, OfnMap) ->
$scope.Enterprises = Enterprises
all_enterprises_by_id = Enterprises.enterprises_by_id
dereferenced_enterprises = group_enterprises.map (enterprise) =>
all_enterprises_by_id[enterprise.id]
visible_enterprises = visibleFilter dereferenced_enterprises
# TODO: this is duplicate code with app/assets/javascripts/darkswarm/services/enterprises.js.coffee
# It would be better to load only the needed enterprises (group + related shops).
$scope.group_producers = visible_enterprises.filter (enterprise) ->
enterprise.category in ["producer_hub", "producer_shop", "producer"]
$scope.group_hubs = visible_enterprises.filter (enterprise) ->
enterprise.category in ["hub", "hub_profile", "producer_hub", "producer_shop"]
$scope.producers_to_filter = $scope.group_producers
$scope.map = angular.copy MapConfiguration.options
$scope.mapMarkers = OfnMap.enterprise_markers visible_enterprises
$scope.embedded_layout = window.location.search.indexOf("embedded_shopfront=true") != -1
$scope.mapMarkers = OfnMap.enterprise_markers enterprises
$scope.embedded_layout = window.location.search.indexOf("embedded_shopfront=true") != -1

View File

@@ -1,9 +1,44 @@
Darkswarm.controller "HubNodeCtrl", ($scope, HashNavigation, Navigation, $location, $templateCache, CurrentHub) ->
$scope.toggle = (e) ->
HashNavigation.toggle $scope.hub.hash if !angular.element(e.target).inheritedData('is-link')
Darkswarm.controller "HubNodeCtrl", ($scope, HashNavigation, CurrentHub, $http, $timeout) ->
$scope.shopfront_loading = false
$scope.enterprise_details = []
$timeout ->
if $scope.open()
$scope.load_shopfront()
# Toggles shopfront tabs open/closed. Fetches enterprise details from the api, diplays them and adds them
# to $scope.enterprise_details, or simply displays the details again if previously fetched
$scope.toggle = (event) ->
if $scope.open()
$scope.toggle_tab(event)
return
if $scope.enterprise_details[$scope.hub.id]
$scope.hub = $scope.enterprise_details[$scope.hub.id]
$scope.toggle_tab(event)
return
$scope.load_shopfront(event)
$scope.load_shopfront = (event=null) ->
$scope.shopfront_loading = true
$scope.toggle_tab(event)
$http.get("/api/enterprises/" + $scope.hub.id + "/shopfront")
.success (data) ->
$scope.shopfront_loading = false
$scope.hub = data
$scope.enterprise_details[$scope.hub.id] = $scope.hub
.error (data) ->
console.error(data)
$scope.toggle_tab = (event) ->
HashNavigation.toggle $scope.hub.hash if event && !angular.element(event.target).inheritedData('is-link')
# Returns boolean: pulldown tab is currently open/closed
$scope.open = ->
HashNavigation.active $scope.hub.hash
# Returns boolean: is this hub the hub that the user is currently "shopping" in?
$scope.current = ->
$scope.hub.id is CurrentHub.hub.id

View File

@@ -0,0 +1,11 @@
Darkswarm.controller "OffcanvasCtrl", ($scope) ->
$scope.menu = $(".left-off-canvas-menu")
$scope.setOffcanvasMenuHeight = ->
$scope.menu.height($(window).height())
$scope.bind = ->
$(window).on("resize", $scope.setOffcanvasMenuHeight)
$scope.setOffcanvasMenuHeight()
$scope.bind()

View File

@@ -1,6 +1,39 @@
Darkswarm.controller "ProducerNodeCtrl", ($scope, HashNavigation, $anchorScroll) ->
$scope.toggle = ->
HashNavigation.toggle $scope.producer.hash
Darkswarm.controller "ProducerNodeCtrl", ($scope, HashNavigation, $anchorScroll, $http, $timeout) ->
$scope.shopfront_loading = false
$scope.enterprise_details = []
$timeout ->
if $scope.open()
$scope.load_shopfront()
# Toggles shopfront tabs open/closed. Fetches enterprise details from the api, diplays them and adds them
# to $scope.enterprise_details, or simply displays the details again if previously fetched
$scope.toggle = (event) ->
if $scope.open()
$scope.toggle_tab(event)
return
if $scope.enterprise_details[$scope.producer.id]
$scope.producer = $scope.enterprise_details[$scope.producer.id]
$scope.toggle_tab(event)
return
$scope.load_shopfront(event)
$scope.load_shopfront = (event=null) ->
$scope.shopfront_loading = true
$scope.toggle_tab(event)
$http.get("/api/enterprises/" + $scope.producer.id + "/shopfront")
.success (data) ->
$scope.shopfront_loading = false
$scope.producer = data
$scope.enterprise_details[$scope.producer.id] = $scope.producer
.error (data) ->
console.error(data)
$scope.toggle_tab = (event) ->
HashNavigation.toggle $scope.producer.hash if event && !angular.element(event.target).inheritedData('is-link')
$scope.open = ->
HashNavigation.active($scope.producer.hash)

View File

@@ -45,12 +45,12 @@ Darkswarm.controller "ProductsCtrl", ($scope, $filter, $rootScope, Products, Ord
$scope.appliedTaxonsList = ->
$scope.activeTaxons.map( (taxon_id) ->
Taxons.taxons_by_id[taxon_id].name
).join(" & ") if $scope.activeTaxons?
).join(" #{t('products_or')} ") if $scope.activeTaxons?
$scope.appliedPropertiesList = ->
$scope.activeProperties.map( (property_id) ->
Properties.properties_by_id[property_id].name
).join(" & ") if $scope.activeProperties?
).join(" #{t('products_or')} ") if $scope.activeProperties?
$scope.clearAll = ->
$scope.query = ""

View File

@@ -1,2 +1,2 @@
Darkswarm.controller "AboutUsCtrl", ($scope, CurrentHub) ->
$scope.CurrentHub = CurrentHub
Darkswarm.controller "AboutUsCtrl", ($scope, Shopfront) ->
$scope.shopfront = Shopfront.shopfront

View File

@@ -1,4 +1,2 @@
Darkswarm.controller "ProducersTabCtrl", ($scope, CurrentHub, Enterprises, EnterpriseModal) ->
# Injecting Enterprises so CurrentHub.producers is dereferenced.
# We should probably dereference here instead and separate out CurrentHub dereferencing from the Enterprise factory.
$scope.CurrentHub = CurrentHub
Darkswarm.controller "ProducersTabCtrl", ($scope, Shopfront, EnterpriseModal) ->
$scope.shopfront = Shopfront.shopfront

View File

@@ -1,15 +1,10 @@
Darkswarm.directive "enterpriseModal", ($modal, Enterprises, EnterpriseResource) ->
Darkswarm.directive "enterpriseModal", (EnterpriseModal) ->
restrict: 'E'
replace: true
template: "<a ng-transclude></a>"
transclude: true
link: (scope, elem, attrs, ctrl) ->
elem.on "click", (ev) =>
ev.stopPropagation()
params =
id: scope.enterprise.id
EnterpriseResource.relatives params, (data) =>
Enterprises.addEnterprises data
scope.enterprise = Enterprises.enterprises_by_id[scope.enterprise.id]
Enterprises.dereferenceEnterprise scope.enterprise
scope.modalInstance = $modal.open(controller: ctrl, templateUrl: 'enterprise_modal.html', scope: scope)
elem.on "click", (event) =>
event.stopPropagation()
scope.modalInstance = EnterpriseModal.open scope.enterprise

View File

@@ -13,11 +13,16 @@ Darkswarm.directive "ofnOnHand", ->
ngModel.$setDirty = setDirty
ngModel.$parsers.push (viewValue) ->
on_hand = parseInt(attr.ofnOnHand)
if parseInt(viewValue) > on_hand
alert t("js.insufficient_stock", {on_hand: on_hand})
viewValue = on_hand
available_quantity = scope.available_quantity()
if parseInt(viewValue) > available_quantity
alert t("js.insufficient_stock", {on_hand: available_quantity})
viewValue = available_quantity
ngModel.$setViewValue viewValue
ngModel.$render()
viewValue
scope.available_quantity = ->
on_hand = parseInt(attr.ofnOnHand)
finalized_quantity = parseInt(attr.finalizedquantity) || 0 # finalizedquantity is optional
on_hand + finalized_quantity

View File

@@ -2,7 +2,14 @@ Darkswarm.directive "ofnPageAlert", ($timeout) ->
restrict: 'A'
scope: true
link: (scope, elem, attrs) ->
container_elems = $(".off-canvas-wrap .inner-wrap, .off-canvas-wrap .inner-wrap .fixed, .page-alert")
moveSelectors = [".off-canvas-wrap .inner-wrap",
".off-canvas-wrap .inner-wrap .fixed",
".off-canvas-fixed .top-bar",
".off-canvas-fixed ofn-flash",
".off-canvas-fixed nav.tab-bar",
".off-canvas-fixed .page-alert"]
container_elems = $(moveSelectors.join(", "))
# Wait a moment after page load before showing the alert. Otherwise we often miss the
# start of the animation.

View File

@@ -1,9 +1,12 @@
Darkswarm.factory "EnterpriseModal", ($modal, $rootScope)->
Darkswarm.factory "EnterpriseModal", ($modal, $rootScope, $http)->
# Build a modal popup for an enterprise.
new class EnterpriseModal
open: (enterprise)->
scope = $rootScope.$new(true) # Spawn an isolate to contain the enterprise
scope.embedded_layout = window.location.search.indexOf("embedded_shopfront=true") != -1
scope.enterprise = enterprise
$modal.open(templateUrl: "enterprise_modal.html", scope: scope)
$http.get("/api/enterprises/" + enterprise.id + "/shopfront").success (data) ->
scope.enterprise = data
$modal.open(templateUrl: "enterprise_modal.html", scope: scope)
.error (data) ->
console.error(data)

View File

@@ -1,18 +1,21 @@
Darkswarm.factory 'Enterprises', (enterprises, CurrentHub, Taxons, Dereferencer, visibleFilter, Matcher, Geo, $rootScope) ->
Darkswarm.factory 'Enterprises', (enterprises, CurrentHub, Taxons, Dereferencer, Matcher, Geo, $rootScope) ->
new class Enterprises
enterprises_by_id: {}
constructor: ->
# Populate Enterprises.enterprises from json in page.
@enterprises = enterprises
# Map enterprises to id/object pairs for lookup.
for enterprise in enterprises
@enterprises_by_id[enterprise.id] = enterprise
# Replace enterprise and taxons ids with actual objects.
@dereferenceEnterprises()
@visible_enterprises = visibleFilter @enterprises
@producers = @visible_enterprises.filter (enterprise)->
@producers = @enterprises.filter (enterprise)->
enterprise.category in ["producer_hub", "producer_shop", "producer"]
@hubs = @visible_enterprises.filter (enterprise)->
@hubs = @enterprises.filter (enterprise)->
enterprise.category in ["hub", "hub_profile", "producer_hub", "producer_shop"]
dereferenceEnterprises: ->
@@ -22,8 +25,6 @@ Darkswarm.factory 'Enterprises', (enterprises, CurrentHub, Taxons, Dereferencer,
@dereferenceEnterprise enterprise
dereferenceEnterprise: (enterprise) ->
@dereferenceProperty(enterprise, 'hubs', @enterprises_by_id)
@dereferenceProperty(enterprise, 'producers', @enterprises_by_id)
@dereferenceProperty(enterprise, 'taxons', Taxons.taxons_by_id)
@dereferenceProperty(enterprise, 'supplied_taxons', Taxons.taxons_by_id)

View File

@@ -1,14 +1,3 @@
Darkswarm.factory 'Groups', (groups, Enterprises, Dereferencer) ->
Darkswarm.factory 'Groups', (groups) ->
new class Groups
groups: groups
groups_by_id: {}
constructor: ->
for group in @groups
@groups_by_id[group.id] = group
@dereference()
dereference: ->
for group in @groups
Dereferencer.dereference group.enterprises, Enterprises.enterprises_by_id
for enterprise in Enterprises.enterprises
Dereferencer.dereference enterprise.groups, @groups_by_id

View File

@@ -1,4 +1,4 @@
Darkswarm.factory "OfnMap", (Enterprises, EnterpriseModal, visibleFilter) ->
Darkswarm.factory "OfnMap", (Enterprises, EnterpriseModal) ->
new class OfnMap
constructor: ->
@enterprises = @enterprise_markers(Enterprises.enterprises)
@@ -6,7 +6,7 @@ Darkswarm.factory "OfnMap", (Enterprises, EnterpriseModal, visibleFilter) ->
enterprise.latitude != null || enterprise.longitude != null # Remove enterprises w/o lat or long
enterprise_markers: (enterprises) ->
@extend(enterprise) for enterprise in visibleFilter(enterprises)
@extend(enterprise) for enterprise in enterprises
# Adding methods to each enterprise
extend: (enterprise) ->

View File

@@ -1,4 +1,4 @@
Darkswarm.factory 'Products', ($resource, Enterprises, Dereferencer, Taxons, Properties, Cart, Variants) ->
Darkswarm.factory 'Products', ($resource, Shopfront, Dereferencer, Taxons, Properties, Cart, Variants) ->
new class Products
constructor: ->
@update()
@@ -31,7 +31,7 @@ Darkswarm.factory 'Products', ($resource, Enterprises, Dereferencer, Taxons, Pro
dereference: ->
for product in @products
product.supplier = Enterprises.enterprises_by_id[product.supplier.id]
product.supplier = Shopfront.producers_by_id[product.supplier.id]
Dereferencer.dereference product.taxons, Taxons.taxons_by_id
product.properties = angular.copy(product.properties_with_values)

View File

@@ -0,0 +1,8 @@
Darkswarm.factory 'Shopfront', (shopfront) ->
new class Shopfront
shopfront: shopfront
producers_by_id: {}
constructor: ->
for producer in shopfront.producers
@producers_by_id[producer.id] = producer

View File

@@ -1,15 +1,15 @@
#new-customer-dialog
.text-normal.margin-bottom-30.text-center
{{ 'admin.customers.index.add_a_new_customer_for' | t:{ shop_name: CurrentShop.shop.name } }}
{{ 'js.admin.customers.index.add_a_new_customer_for' | t:{ shop_name: CurrentShop.shop.name } }}
%form{ name: 'new_customer_form', novalidate: true, ng: { submit: "addCustomer()" }}
.text-center.margin-bottom-30
%input.fullwidth{ type: 'email', name: 'email', required: true, placeholder: t('admin.customers.index.customer_placeholder'), ng: { model: "email" } }
%input.fullwidth{ type: 'email', name: 'email', required: true, placeholder: "{{ 'js.admin.customers.index.customer_placeholder' | t }}", ng: { model: "email" } }
%div{ ng: { show: "submitted && new_customer_form.$pristine" } }
.error{ ng: { show: "(new_customer_form.email.$error.email || new_customer_form.email.$error.required)" } }
{{ 'admin.customers.index.valid_email_error' | t }}
{{ 'js.admin.customers.index.valid_email_error' | t }}
.error{ ng: { repeat: "error in errors", bind: "error" } }
.text-center
%input.button.red.icon-plus{ type: 'submit', value: t('admin.customers.index.add_customer') }
%input.button.red.icon-plus{ type: 'submit', value: "{{ 'js.admin.customers.index.add_customer' | t }}" }

View File

@@ -1,6 +1,6 @@
#new-subscription-dialog
.text-normal.margin-bottom-30.text-center
= t('admin.subscriptions.index.please_select_a_shop')
= t('js.admin.subscriptions.new.please_select_a_shop')
%form{ name: 'new_subscription_form', novalidate: true, ng: { submit: "newSubscription()" }}
@@ -8,7 +8,7 @@
%input.ofn-select2.fullwidth#new_subscription_shop_id{ ng: { model: 'shop_id' }, required: true, name: 'shop_id', data: 'shops' }
%div{ ng: { show: "submitted && new_subscription_form.$pristine" } }
.error{ ng: { show: "new_subscription_form.shop_id.$error.required" } }
= t('admin.subscriptions.index.please_select_a_shop')
= t('js.admin.subscriptions.new.please_select_a_shop')
.text-center
%input.button.red.icon-plus{ type: 'submit', value: t('continue') }

View File

@@ -7,4 +7,4 @@
%input.ofn-select2.fullwidth{ :id => 'rule_type_selector', ng: { model: "ruleType" }, data: "ruleTypes", 'min-search' => "5" }
.text-center
%input.button.red.icon-plus{ type: 'button', value: "Add Rule", ng: { click: 'addRule(tagGroup, ruleType)' } }
%input.button.red.icon-plus{ type: 'button', value: "{{ 'js.admin.new_tag_rule_dialog.add_rule' | t }}", ng: { click: 'addRule(tagGroup, ruleType)' } }

View File

@@ -1,7 +1,7 @@
%table
%tr
%td#available-order-cycles
Available
{{ 'js.admin.order_cycles.schedules.available' | t }}
.order-cycles
.order-cycle{ ng: { repeat: 'orderCycle in orderCycles | available:selectedOrderCycles as availableOrderCycles', click: 'selections.available = orderCycle', dblclick: 'add(orderCycle)', class: '{selected: selections.available == orderCycle}' } }
{{ orderCycle.name }}
@@ -11,7 +11,7 @@
%a.remove.button{ href: 'javascript:void(0)', ng: { click: 'remove()' } }
%i.icon-chevron-left
%td#selected-order-cycles
Selected
{{ 'js.admin.order_cycles.schedules.selected' | t }}
.order-cycles
.order-cycle{ ng: { repeat: 'orderCycle in selectedOrderCycles', click: 'selections.selected = orderCycle', dblclick: 'remove(orderCycle)', class: '{selected: selections.selected == orderCycle}' } }
{{ orderCycle.name }}

View File

@@ -1,23 +1,25 @@
#schedule-dialog
.text-normal.margin-bottom-30.text-center
%span{ ng: { hide: 'schedule.id' } }= t('admin.order_cycles.index.adding_a_new_schedule')
%span{ ng: { show: 'schedule.id' } }= t('admin.order_cycles.index.updating_a_schedule')
%span{ ng: { hide: 'schedule.id' } }
{{ 'js.admin.order_cycles.schedules.adding_a_new_schedule' | t }}
%span{ ng: { show: 'schedule.id' } }
{{ 'js.admin.order_cycles.schedules.updating_a_schedule' | t }}
%form{ name: 'schedule_form', novalidate: true, ng: { submit: "submit()" }}
.text-center.margin-bottom-20
%input.fullwidth{ type: 'text', name: 'name', required: true, placeholder: t('admin.order_cycles.index.schedule_name_placeholder'), ng: { model: "schedule.name" } }
%input.fullwidth{ type: 'text', name: 'name', required: true, placeholder: "{{ 'js.admin.order_cycles.schedules.schedule_name_placeholder' | t }}", ng: { model: "schedule.name" } }
%div{ ng: { show: "submitted && schedule_form.$pristine" } }
.error{ ng: { show: "(schedule_form.name.$error.required)" } }
= t('admin.order_cycles.index.name_required_error')
{{ 'js.admin.order_cycles.schedules.name_required_error' | t }}
.order-cycles-selector.text-center.margin-bottom-30
.text-center
%input.button{ type: 'submit', value: t('admin.order_cycles.index.create_schedule'), ng: { hide: 'schedule.id' } }
%input.button{ type: 'submit', value: t('admin.order_cycles.index.update_schedule'), ng: { show: 'schedule.id' } }
%input.button{ type: 'submit', value: "{{ 'js.admin.order_cycles.schedules.create_schedule' | t }}", ng: { hide: 'schedule.id' } }
%input.button{ type: 'submit', value: "{{ 'js.admin.order_cycles.schedules.update_schedule' | t }}", ng: { show: 'schedule.id' } }
%span{ ng: { show: 'schedule.id' } } or
%input.button.red{ type: 'button', value: t('admin.order_cycles.index.delete_schedule'), ng: { show: 'schedule.id', click: 'delete()'} }
%input.button.red{ type: 'button', value: "{{ 'js.admin.order_cycles.schedules.delete_schedule' | t }}", ng: { show: 'schedule.id', click: 'delete()'} }
or
%input.button{ type: 'button', value: t('actions.cancel'), ng: { click: 'close()' } }
%input.button{ type: 'button', value: "{{ 'actions.cancel' | t }}", ng: { click: 'close()' } }

View File

@@ -2,14 +2,14 @@
-# Do not show this for producer shops selling only their own produce,
-# Since a shopping link will already have been displayed in hub_details.html.haml
.row.active_table_row.pad-top{ "ng-if" => "enterprise.is_primary_producer && enterprise.hubs.length > 0 && !(enterprise.hubs.length == 1 && enterprise.hubs[0] == enterprise)"}
.columns.small-12
.columns.small-12.cta-container
.row
.columns.small-12.fat
%div{"ng-if" => "::enterprise.name"}
%label{"ng-html" => "::'shop_for_products_html' | t:{enterprise: enterprise.name}"}
%label{"ng-bind-html" => "::'shop_for_products_html' | t:{enterprise: enterprise.name}"}
%div.show-for-medium-up{"ng-if" => "::!enterprise.name"}
&nbsp;
.row.cta-container
.row
.columns.small-12
%a.cta-hub{"ng-repeat" => "hub in enterprise.hubs | filter:{id: '!'+enterprise.id} | orderBy:'-active'",
"ng-href" => "{{::hub.path}}", "ofn-empties-cart" => "hub",

View File

@@ -5,12 +5,10 @@
*
*= require admin/spree_backend
*= require admin/spree_auth
*= require jquery-ui-timepicker-addon
*= require shared/textAngular
*= require shared/ng-tags-input.min
*= require admin/custom
*= require_self
*/

View File

@@ -1,2 +1 @@
/* Custom fix */
.ui-timepicker-div.ui-timepicker-oneLine dl dd { width: 25%; }

View File

@@ -154,19 +154,6 @@ form.order_cycle {
.actions {
margin-top: 3em;
}
/* This styling makes it easier to read the debug info at the same time as working with the
* interface, but it breaks the tests. Enable when you need it.
#order-cycles-debug {
position: fixed;
top: 0px;
left: 0px;
height: 100%;
width: 316px;
overflow-y: scroll;
background-color: #fff;
}
*/
}
table#listing_order_cycles {

View File

@@ -10,6 +10,7 @@
@import 'foundation-icons';
@import 'base/*';
@import 'layout/*';
@import '*';
@import 'pages/*';
@import '../web/all';

View File

@@ -0,0 +1,52 @@
// A bit arbitrary, works for it's use at time of implementation
$collapsible-max-height: 350px;
.collapsible-checkbox {
display: none;
}
.collapsible-label > ::before {
border-bottom: 5px solid transparent;
border-left: 5px solid currentColor;
border-top: 5px solid transparent;
content: ' ';
display: inline-block;
margin-right: .7rem;
transform: translateY(-2px);
transition: transform .2s ease-out;
vertical-align: middle;
}
.collapsible-content {
max-height: 0;
overflow: hidden;
transition: max-height .25s ease-in-out;
}
.collapsible-checkbox:checked + .collapsible-label + .collapsible-content {
max-height: $collapsible-max-height;
}
.collapsible-checkbox:checked + .collapsible-label > ::before {
transform: rotate(90deg) translateX(-3px);
}
@media only screen and (min-width: 1025px) {
// This double class is used to so this rule is more specific than the one in
// all.scss
.collapsible-label.collapsible-label-md {
margin-left: 0;
}
.collapsible-label-md > ::before {
display: none;
}
.collapsible-content-md {
max-height: $collapsible-max-height;
}
}

View File

@@ -60,7 +60,6 @@ body.embedded {
vertical-align: top;
&.cart {
div.joyride-tip-guide { // Cart Dropdown
top: 75px;
overflow: visible;

View File

@@ -1,31 +0,0 @@
@import "variables";
nav.top-bar {
margin-bottom: 0px;
a.icon {
&:hover {
text-decoration: none;
}
height: $topbar-height;
color: white;
i {
font-size: 29px;
line-height: $topbar-height;
}
span {
font-size: 13px;
display: inline-block;
line-height: $topbar-height;
height: $topbar-height;
vertical-align: top;
}
}
}
body > section[role='main'] {
padding: 0px;
}

View File

@@ -0,0 +1,17 @@
@import "compass/css3/transition";
.off-canvas-fixed {
@include transition(transform 1000ms ease-in-out);
}
.move-right > .off-canvas-fixed {
height: 100%;
-webkit-transform: translate3d(15.625rem, 0, 0);
transform: translate3d(15.625rem, 0, 0);
}
.left-off-canvas-menu {
-webkit-transform: none;
transform: none;
margin-left: -15.625rem;
}

View File

@@ -1,103 +1,212 @@
@import "compass";
@import "branding";
@import "mixins";
@import "typography";
@import "variables";
@import 'compass';
@import 'branding';
@import 'mixins';
@import 'typography';
@import 'variables';
nav {
nav.top-bar {
@include textpress;
text-shadow: none;
// Create center style for nav ul (foundation provides left and right)
text-align: center;
font-size: 16px;
margin-bottom: 0;
height: $topbar-height;
}
.top-bar-section {
// Avoid menu items blocking logo
li:not(.has-form), li:not(.has-form) a:not(.button), li:not(.has-form) a:not(.button):hover {
background-color: transparent;
}
ul.center {
display: inline-block;
// By default, we center between the left and right uls, but we want to be centered
// relative to the whole page. The difference in width between the other uls is 74px,
// so we offset by that amount here.
margin-left: -74px;
}
}
.joyride-tip-guide .button {
text-shadow: none;
}
// Default overrides - big menu
.top-bar-section .has-dropdown > a {
padding-right: ($topbar-height / 3) !important;
i.ofn-i_022-cog, .ofn-i_071-globe {
font-size: 24px;
line-height: $topbar-height;
}
i.ofn-i_071-globe {
color: #666;
font-size: 27px
}
}
.top-bar-section .has-dropdown > a:after {
@media #{$large-only} {
.top-bar--menu-item-with-icon span {
display: none;
}
.top-bar-section ul li > a {
font-size: 0.75rem;
height: $topbar-height;
opacity: 0.8;
&:hover, &:focus, &:active {
opacity: 1;
}
@include transition(all 0.3s ease-in-out);
}
.top-bar-section ul li.ofn-logo > a {
display: table-cell;
.top-bar--current-hub-prefix,
.top-bar--current-hub-name {
display: inline-block;
vertical-align: middle;
opacity: 1;
}
.nav-branded {
color: $brand-colour;
.top-bar--current-hub-name {
max-width: 10em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
span {
font-size: 13px;
.top-bar-section ul li > a.top-bar--menu-item-with-icon {
display: inline;
}
.top-bar--menu-item-with-icon i,
.top-bar--menu-item-with-icon img {
line-height: $topbar-height;
}
.top-bar-section {
border-bottom: 1px solid $ofn-grey;
a.icon {
&:hover {
text-decoration: none;
}
> span {
display: inline-block;
font-weight: 300;
height: $topbar-height;
line-height: $topbar-height;
vertical-align: top;
}
}
.nav-primary {
@include headingFont;
font-size: 0.875rem;
font-weight: 300;
// Avoid menu items blocking logo
li:not(.has-form), li:not(.has-form) a:not(.button), li:not(.has-form) a:not(.button):hover {
background-color: transparent;
}
ul .nav-primary {
text-transform: uppercase;
li.cart {
background-color: #f4704c;
a span {
color: white;
}
i {
color: white;
}
.count {
position: relative;
img {
width: 32px;
height: 26px;
margin-top: 16px;
margin-right: 5px;
}
span {
background-color: white;
border-radius: 20px;
color: #f4704c;
font-size: 12px;
line-height: 18px;
position: absolute;
right: -8px;
top: 8px;
width: 18px;
}
}
}
ul.center {
display: inline-block;
// By default, we center between the left and right uls, but we want to be centered
// relative to the whole page. The difference in width between the other uls is 74px,
// so we offset by that amount here.
margin-left: -74px;
}
ul.dropdown {
border: 1px solid $smoke;
border-top: none;
}
ul.right {
> li {
border-left: 1px solid #ddd;
padding: 0 14px;
@media screen and (max-width: 1450px) {
padding: 0 6px;
}
}
li > a {
opacity: 0.8;
&:hover, &:focus, &:active {
opacity: 1;
}
i {
color: #f4704c;
display: inline-block;
margin-right: 2px;
margin-top: -3px;
vertical-align: middle;
}
img {
margin-right: 2px;
margin-top: -5px;
}
}
}
ul li > a {
font-size: 16px;
height: $topbar-height;
}
ul li.ofn-logo > a {
display: table-cell;
vertical-align: middle;
}
ul .nav-primary {
@include headingFont;
text-transform: uppercase;
font-weight: 300;
font-size: 16px;
}
.joyride-tip-guide .button {
text-shadow: none;
}
}
// Mobile Menu
.tab-bar {
background-color: white;
position: fixed;
width: 100%;
height: 2.8em;
z-index: 1;
.cart-span {
background-color: #f4704c;
padding: 13px;
a,
span {
color: white;
display: inline-block;
}
.count {
position: relative;
img {
margin-left: 2px;
width: 26px;
}
span {
background-color: white;
border-radius: 20px;
color: #f4704c;
font-size: 12px;
line-height: 16px;
position: absolute;
right: -10px;
text-align: center;
top: -9px;
width: 16px;
}
}
}
}
.off-canvas-list li.language-switcher ul li {
@@ -114,8 +223,6 @@ nav {
}
.off-canvas-wrap.move-right .tab-bar .menu-icon span {
-moz-box-shadow: 0 0px 0 1px #666, 0 7px 0 1px #666, 0 14px 0 1px #666;
-webkit-box-shadow: 0 0px 0 1px #666, 0 7px 0 1px #666, 0 14px 0 1px #666;
box-shadow: 0 0px 0 1px #666, 0 7px 0 1px #666, 0 14px 0 1px #666;
}
@@ -127,10 +234,19 @@ nav {
padding: 9px 0 0 9px;
}
// Leave space for tab bar, in screens smaller than large.
[role="main"] {
margin-top: 2.8em;
@media #{$large-up} {
margin-top: 0;
}
}
.top-bar .ofn-logo img {
height: auto;
width: auto;
max-height: 51px;
max-height: 44px;
max-width: 250px;
}
@@ -138,7 +254,7 @@ nav {
background-color: white;
}
.off-canvas-wrap.move-right ul.off-canvas-list {
.off-canvas-wrap ul.off-canvas-list {
font-size: 0.875rem;
.li-menu {
@@ -158,12 +274,10 @@ nav {
background-color: transparent;
color: $brand-colour;
}
@include transition(all 0.3s ease-in-out);
}
}
.off-canvas-wrap.move-right ul.off-canvas-list i {
.off-canvas-wrap ul.off-canvas-list i {
font-size: 1.5rem;
margin-right: 0.25rem;
}
@@ -172,7 +286,8 @@ nav {
@media screen and (max-width: 1450px) {
nav .top-bar-section {
ul li a, .has-dropdown > a {
ul li a,
.has-dropdown > a {
padding: 0 ($topbar-height / 8) !important;
}
@@ -194,10 +309,4 @@ nav {
// padding required to placehold for fixed menu bar
padding-top: 0;
}
section.right {
.nav-branded {
padding: 0 1em;
}
}
}

View File

@@ -2,10 +2,12 @@
@import "animations";
@import "compass/css3/transition";
$page-alert-height: 55px;
// Basic style \\
.page-alert {
.alert-box {
height: 55px;
height: $page-alert-height;
overflow: hidden;
border: 1px solid rgba($dark-grey, 0.35);
border-left: none;
@@ -45,33 +47,26 @@
}
// Show-hide animation \\
.off-canvas-wrap .inner-wrap, .off-canvas-wrap .inner-wrap .fixed, nav.tab-bar {
@include transition(all, 1000ms, ease-in-out);
.off-canvas-wrap .inner-wrap,
.off-canvas-fixed .top-bar,
.off-canvas-fixed ofn-flash,
.off-canvas-fixed nav.tab-bar,
.off-canvas-fixed .page-alert {
@include transition(all 1000ms ease-in-out);
&.move-down {
margin-top: 55px;
@include transition(all, 1000ms, ease-in-out);
margin-top: $page-alert-height;
}
}
.off-canvas-wrap .inner-wrap .page-alert.fixed {
top: -55px;
z-index: 1;
// TODO: Compass to disable transition
-moz-transition: none;
-webkit-transition: none;
-o-transition: color 0 ease-in;
transition: none;
.off-canvas-wrap .page-alert {
top: -1 * $page-alert-height;
z-index: 100;
}
.off-canvas-wrap.move-right .inner-wrap.move-down {
.page-alert {
top: -55px * 2;
}
.left-off-canvas-menu {
top: -55px;
top: -1 * $page-alert-height;
}
}

View File

@@ -1,4 +1,5 @@
@import '../base/colors';
@import '../collapsible';
// Styling for login modal to style tabs
.reveal-modal.login-modal {
@@ -23,3 +24,10 @@
}
}
}
@media only screen and (min-width: 1025px) {
// make sure styling doesn't get messed up if resizing down and back up
.collapsible-menus-container {
min-height: 250px;
}
}

View File

@@ -13,8 +13,9 @@
$brand-colour: #f27052;
// Topbar
$topbar-height: rem-calc(75);
$topbar-link-padding: $topbar-height / 3;
$topbar-height: rem-calc(64);
$topbar-link-padding: $topbar-height / 4;
$topbar-arrows: false;
$topbar-bg: $white;
$topbar-bg-color: $topbar-bg;

View File

@@ -22,9 +22,9 @@ module Admin
order.with_lock do
if @line_item.update_attributes(params[:line_item])
order.update_distribution_charge!
render nothing: true, status: 204 # No Content, does not trigger ng resource auto-update
render nothing: true, status: :no_content # No Content, does not trigger ng resource auto-update
else
render json: { errors: @line_item.errors }, status: 412
render json: { errors: @line_item.errors }, status: :precondition_failed
end
end
end
@@ -36,7 +36,7 @@ module Admin
authorize! :update, order
@line_item.destroy
render nothing: true, status: 204 # No Content, does not trigger ng resource auto-update
render nothing: true, status: :no_content # No Content, does not trigger ng resource auto-update
end
private

View File

@@ -12,9 +12,9 @@ module Admin
render json: @cp_set.collection, each_serializer: Api::Admin::ColumnPreferenceSerializer
else
if @cp_set.errors.present?
render json: { errors: @cp_set.errors }, status: 400
render json: { errors: @cp_set.errors }, status: :bad_request
else
render nothing: true, status: 500
render nothing: true, status: :internal_server_error
end
end
end
@@ -23,7 +23,7 @@ module Admin
def load_collection
collection_hash = Hash[params[:column_preferences].each_with_index.map { |cp, i| [i, cp] }]
collection_hash.reject!{ |i, cp| cp[:action_name] != params[:action_name] }
collection_hash.select!{ |_i, cp| cp[:action_name] == params[:action_name] }
@cp_set = ColumnPreferenceSet.new @column_preferences, collection_attributes: collection_hash
end

View File

@@ -16,7 +16,7 @@ module Admin
# Save any uploaded images
ContentConfig.save
flash[:success] = t(:successfully_updated, :resource => I18n.t('admin.contents.edit.your_content'))
flash[:success] = t(:successfully_updated, resource: I18n.t('admin.contents.edit.your_content'))
redirect_to main_app.edit_admin_contents_path
end

View File

@@ -34,7 +34,7 @@ module Admin
tag_rule_mapping = TagRule.mapping_for(Enterprise.where(id: @customer.enterprise))
render_as_json @customer, tag_rule_mapping: tag_rule_mapping
else
render json: { errors: @customer.errors.full_messages }, status: 400
render json: { errors: @customer.errors.full_messages }, status: :bad_request
end
else
redirect_to '/unauthorized'

View File

@@ -1,9 +1,8 @@
module Admin
class EnterpriseFeesController < ResourceController
before_filter :load_enterprise_fee_set, :only => :index
before_filter :load_enterprise_fee_set, only: :index
before_filter :load_data
def index
@include_calculators = params[:include_calculators].present?
@enterprise = current_enterprise
@@ -34,18 +33,17 @@ module Admin
if params.key? :enterprise_id
redirect_path = main_app.admin_enterprise_fees_path(enterprise_id: params[:enterprise_id])
end
redirect_to redirect_path, :notice => I18n.t(:enterprise_fees_update_notice)
redirect_to redirect_path, notice: I18n.t(:enterprise_fees_update_notice)
else
render :index
end
end
private
def load_enterprise_fee_set
@enterprise_fee_set = EnterpriseFeeSet.new :collection => collection
@enterprise_fee_set = EnterpriseFeeSet.new collection: collection
end
def load_data
@@ -60,7 +58,7 @@ module Admin
coordinator = Enterprise.find_by_id(params[:coordinator_id]) if params[:coordinator_id]
order_cycle = OrderCycle.new(coordinator: coordinator) if order_cycle.nil? && coordinator.present?
enterprises = OpenFoodNetwork::OrderCyclePermissions.new(spree_current_user, order_cycle).visible_enterprises
return EnterpriseFee.for_enterprises(enterprises).order('enterprise_id', 'fee_type', 'name')
EnterpriseFee.for_enterprises(enterprises).order('enterprise_id', 'fee_type', 'name')
else
collection = EnterpriseFee.managed_by(spree_current_user).order('enterprise_id', 'fee_type', 'name')
collection = collection.for_enterprise(current_enterprise) if current_enterprise
@@ -75,6 +73,5 @@ module Admin
def current_enterprise
Enterprise.find params[:enterprise_id] if params.key? :enterprise_id
end
end
end

View File

@@ -12,7 +12,7 @@ module Admin
if @enterprise_relationship.save
render text: Api::Admin::EnterpriseRelationshipSerializer.new(@enterprise_relationship).to_json
else
render status: 400, json: {errors: @enterprise_relationship.errors.full_messages.join(', ')}
render status: :bad_request, json: { errors: @enterprise_relationship.errors.full_messages.join(', ') }
end
end

View File

@@ -13,7 +13,7 @@ module Admin
render text: Api::Admin::EnterpriseRoleSerializer.new(@enterprise_role).to_json
else
render status: 400, json: {errors: @enterprise_role.errors.full_messages.join(', ')}
render status: :bad_request, json: { errors: @enterprise_role.errors.full_messages.join(', ') }
end
end

View File

@@ -6,11 +6,11 @@ module Admin
prepend_before_filter :override_owner, only: :create
prepend_before_filter :override_sells, only: :create
before_filter :load_enterprise_set, :only => :index
before_filter :load_countries, :except => [:index, :register, :check_permalink]
before_filter :load_methods_and_fees, :only => [:edit, :update]
before_filter :load_groups, :only => [:new, :edit, :update, :create]
before_filter :load_taxons, :only => [:new, :edit, :update, :create]
before_filter :load_enterprise_set, only: :index
before_filter :load_countries, except: [:index, :register, :check_permalink]
before_filter :load_methods_and_fees, only: [:edit, :update]
before_filter :load_groups, only: [:new, :edit, :update, :create]
before_filter :load_taxons, only: [:new, :edit, :update, :create]
before_filter :check_can_change_sells, only: :update
before_filter :check_can_change_bulk_sells, only: :bulk_update
before_filter :check_can_change_owner, only: :update
@@ -45,7 +45,7 @@ module Admin
flash[:success] = flash_message_for(@object, :successfully_updated)
respond_with(@object) do |format|
format.html { redirect_to location_after_save }
format.js { render :layout => false }
format.js { render layout: false }
format.json { render_as_json @object, ams_prefix: 'index', spree_current_user: spree_current_user }
end
else
@@ -142,7 +142,15 @@ module Admin
@order_cycle = OrderCycle.find_by_id(params[:order_cycle_id]) if params[:order_cycle_id]
coordinator = Enterprise.find_by_id(params[:coordinator_id]) if params[:coordinator_id]
@order_cycle = OrderCycle.new(coordinator: coordinator) if @order_cycle.nil? && coordinator.present?
return OpenFoodNetwork::OrderCyclePermissions.new(spree_current_user, @order_cycle).visible_enterprises
enterprises = OpenFoodNetwork::OrderCyclePermissions.new(spree_current_user, @order_cycle)
.visible_enterprises
unless enterprises.empty?
enterprises.includes(
supplied_products: [:supplier, :variants, master: [:images]]
)
end
when :index
if spree_current_user.admin?
OpenFoodNetwork::Permissions.new(spree_current_user).
@@ -154,7 +162,8 @@ module Admin
Enterprise.where("1=0")
end
when :visible
OpenFoodNetwork::Permissions.new(spree_current_user).visible_enterprises.ransack(params[:q]).result
OpenFoodNetwork::Permissions.new(spree_current_user).visible_enterprises
.includes(:shipping_methods, :payment_methods).ransack(params[:q]).result
else
# TODO was ordered with is_distributor DESC as well, not sure why or how we want to sort this now
OpenFoodNetwork::Permissions.new(spree_current_user).
@@ -168,9 +177,20 @@ module Admin
end
def load_methods_and_fees
@payment_methods = Spree::PaymentMethod.managed_by(spree_current_user).sort_by!{ |pm| [(@enterprise.payment_methods.include? pm) ? 0 : 1, pm.name] }
@shipping_methods = Spree::ShippingMethod.managed_by(spree_current_user).sort_by!{ |sm| [(@enterprise.shipping_methods.include? sm) ? 0 : 1, sm.name] }
@enterprise_fees = EnterpriseFee.managed_by(spree_current_user).for_enterprise(@enterprise).order(:fee_type, :name).all
# 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]
end
@shipping_methods = Spree::ShippingMethod.managed_by(spree_current_user).sort_by! do |sm|
[(@enterprise.shipping_methods.include? sm) ? 0 : 1, sm.name]
end
# rubocop:enable Style/TernaryParentheses
@enterprise_fees = EnterpriseFee
.managed_by(spree_current_user)
.for_enterprise(@enterprise)
.order(:fee_type, :name)
.all
end
def load_groups
@@ -187,8 +207,8 @@ module Admin
# methods that are specific to each class do not become available until after the
# record is persisted. This problem is compounded by the use of calculators.
@object.transaction do
tag_rules_attributes.select{ |i, attrs| attrs[:type].present? }.each do |i, attrs|
rule = @object.tag_rules.find_by_id(attrs.delete :id) || attrs[:type].constantize.new(enterprise: @object)
tag_rules_attributes.select{ |_i, attrs| attrs[:type].present? }.each do |_i, attrs|
rule = @object.tag_rules.find_by_id(attrs.delete(:id)) || attrs[:type].constantize.new(enterprise: @object)
create_calculator_for(rule, attrs) if rule.type == "TagRule::DiscountOrder" && rule.calculator.nil?
rule.update_attributes(attrs)
end
@@ -204,13 +224,13 @@ module Admin
def create_calculator_for(rule, attrs)
if attrs[:calculator_type].present? && attrs[:calculator_attributes].present?
rule.update_attributes(calculator_type: attrs[:calculator_type])
attrs[:calculator_attributes].merge!( { id: rule.calculator.id } )
attrs[:calculator_attributes].merge!( id: rule.calculator.id )
end
end
def check_can_change_bulk_sells
unless spree_current_user.admin?
params[:enterprise_set][:collection_attributes].each do |i, enterprise_params|
params[:enterprise_set][:collection_attributes].each do |_i, enterprise_params|
enterprise_params.delete :sells unless spree_current_user == Enterprise.find_by_id(enterprise_params[:id]).owner
end
end
@@ -230,7 +250,7 @@ module Admin
unless spree_current_user.admin?
has_hub = spree_current_user.owned_enterprises.is_hub.any?
new_enterprise_is_producer = Enterprise.new(params[:enterprise]).is_primary_producer
params[:enterprise][:sells] = (has_hub && !new_enterprise_is_producer) ? 'any' : 'none'
params[:enterprise][:sells] = has_hub && !new_enterprise_is_producer ? 'any' : 'none'
end
end
@@ -242,7 +262,7 @@ module Admin
def check_can_change_bulk_owner
unless spree_current_user.admin?
params[:enterprise_set][:collection_attributes].each do |i, enterprise_params|
params[:enterprise_set][:collection_attributes].each do |_i, enterprise_params|
enterprise_params.delete :owner_id
end
end
@@ -273,8 +293,10 @@ module Admin
# Overriding method on Spree's resource controller
def location_after_save
referer_path = OpenFoodNetwork::RefererParser::path(request.referer)
referer_path = OpenFoodNetwork::RefererParser.path(request.referer)
# rubocop:disable Style/RegexpLiteral
refered_from_producer_properties = referer_path =~ /\/producer_properties$/
# rubocop:enable Style/RegexpLiteral
if refered_from_producer_properties
main_app.admin_enterprise_producer_properties_path(@enterprise)

View File

@@ -1,6 +1,5 @@
module Admin
class InventoryItemsController < ResourceController
respond_to :json
respond_override update: { json: {

View File

@@ -20,7 +20,7 @@ module Admin
if new_user
render json: { user: new_user.id }, status: :ok
else
render json: { errors: t('admin.enterprises.invite_manager.error') }, status: 500
render json: { errors: t('admin.enterprises.invite_manager.error') }, status: :internal_server_error
end
end

View File

@@ -53,7 +53,7 @@ module Admin
respond_to do |format|
flash[:notice] = I18n.t(:order_cycles_update_notice) if params[:reloading] == '1'
format.html { redirect_to main_app.edit_admin_order_cycle_path(@order_cycle) }
format.json { render json: { :success => true } }
format.json { render json: { success: true } }
end
else
render json: { errors: @order_cycle.errors.full_messages }, status: :unprocessable_entity
@@ -82,20 +82,19 @@ module Admin
redirect_to main_app.admin_order_cycles_path, notice: I18n.t(:order_cycles_email_to_producers_notice)
end
protected
def collection
return Enterprise.where("1=0") unless json_request?
return order_cycles_from_set if params[:order_cycle_set]
ocs = if params[:as] == "distributor"
OrderCycle.preload(:schedules).ransack(params[:q]).result.
involving_managed_distributors_of(spree_current_user).order('updated_at DESC')
elsif params[:as] == "producer"
OrderCycle.preload(:schedules).ransack(params[:q]).result.
involving_managed_producers_of(spree_current_user).order('updated_at DESC')
else
OrderCycle.preload(:schedules).ransack(params[:q]).result.accessible_by(spree_current_user)
OrderCycle.preload(:schedules).ransack(params[:q]).result.
involving_managed_distributors_of(spree_current_user).order('updated_at DESC')
elsif params[:as] == "producer"
OrderCycle.preload(:schedules).ransack(params[:q]).result.
involving_managed_producers_of(spree_current_user).order('updated_at DESC')
else
OrderCycle.preload(:schedules).ransack(params[:q]).result.accessible_by(spree_current_user)
end
ocs.undated |
@@ -115,7 +114,7 @@ module Admin
# Split ransack params into all those that currently exist and new ones to limit returned ocs to recent or undated
orders_close_at_gt = params[:q].andand.delete(:orders_close_at_gt) || 31.days.ago
params[:q] = {
g: [ params.delete(:q) || {}, { m: 'or', orders_close_at_gt: orders_close_at_gt, orders_close_at_null: true } ]
g: [params.delete(:q) || {}, { m: 'or', orders_close_at_gt: orders_close_at_gt, orders_close_at_null: true }]
}
@collection = collection
end
@@ -158,7 +157,7 @@ module Admin
params[:order_cycle].delete :coordinator_id
unless Enterprise.managed_by(spree_current_user).include?(@order_cycle.coordinator)
params[:order_cycle].delete_if{ |k,v| [:name, :orders_open_at, :orders_close_at].include? k.to_sym }
params[:order_cycle].delete_if{ |k, _v| [:name, :orders_open_at, :orders_close_at].include? k.to_sym }
end
end
@@ -173,7 +172,7 @@ module Admin
def order_cycles_from_set
remove_unauthorized_bulk_attrs
OrderCycle.where(id: params[:order_cycle_set][:collection_attributes].map{ |k,v| v[:id] })
OrderCycle.where(id: params[:order_cycle_set][:collection_attributes].map{ |_k, v| v[:id] })
end
def order_cycle_set

View File

@@ -4,7 +4,6 @@ module Admin
before_filter :load_properties
before_filter :setup_property, only: [:index]
private
def collection_url

View File

@@ -1,7 +1,7 @@
module Admin
class ResourceController < Spree::Admin::ResourceController
def model_class
"#{controller_name.classify}".constantize
controller_name.classify.to_s.constantize
end
# URL helpers
@@ -22,7 +22,7 @@ module Admin
end
def object_url(object = nil, options = {})
target = object ? object : @object
target = object || @object
if parent_data.present?
main_app.public_send "admin_#{model_name}_#{object_name}_url", parent, target, options
else

View File

@@ -31,7 +31,16 @@ module Admin
def collection
return Schedule.where("1=0") unless json_request?
permissions.visible_schedules
if params[:enterprise_id]
filter_schedules_by_enterprise_id(permissions.visible_schedules, params[:enterprise_id])
else
permissions.visible_schedules
end
end
# Filter schedules by OCs with a given coordinator id
def filter_schedules_by_enterprise_id(schedules, enterprise_id)
schedules.joins(:order_cycles).where(order_cycles: { coordinator_id: enterprise_id.to_i })
end
def collection_actions

View File

@@ -18,7 +18,7 @@ module Admin
def update
Spree::Config.set(params[:settings])
resource = t('admin.controllers.stripe_connect_settings.resource')
flash[:success] = t(:successfully_updated, :resource => resource)
flash[:success] = t(:successfully_updated, resource: resource)
redirect_to_edit
end

View File

@@ -1,10 +1,9 @@
module Admin
class TagRulesController < ResourceController
respond_to :json
respond_override destroy: { json: {
success: lambda { render nothing: true, :status => 204 }
success: lambda { render nothing: true, status: :no_content }
} }
def map_by_tag
@@ -16,7 +15,6 @@ module Admin
end
end
private
def collection_actions

View File

@@ -9,9 +9,7 @@ module Admin
before_filter :load_collection, only: [:bulk_update]
before_filter :load_spree_api_key, only: :index
def index
end
def index; end
def bulk_update
# Ensure we're authorised to update all variant overrides
@@ -22,9 +20,9 @@ module Admin
render json: @vo_set.collection, each_serializer: Api::Admin::VariantOverrideSerializer
else
if @vo_set.errors.present?
render json: { errors: @vo_set.errors }, status: 400
render json: { errors: @vo_set.errors }, status: :bad_request
else
render nothing: true, status: 500
render nothing: true, status: :internal_server_error
end
end
end
@@ -35,13 +33,12 @@ module Admin
@collection.each(&:reset_stock!)
if collection_errors.present?
render json: { errors: collection_errors }, status: 400
render json: { errors: collection_errors }, status: :bad_request
else
render json: @collection, each_serializer: Api::Admin::VariantOverrideSerializer
end
end
private
def load_data

View File

@@ -9,6 +9,7 @@ module Api
include ActionController::UrlFor
include Rails.application.routes.url_helpers
use_renderers :json
check_authorization
def respond_with_conflict(json_hash)
render json: json_hash, status: :conflict
@@ -21,5 +22,13 @@ module Api
@current_api_user = try_spree_current_user
super
end
# Allows API access without authentication, but only for OFN controllers which inherit
# from Api::BaseController. @current_api_user will now initialize an empty Spree::User
# unless one is present. We now also apply devise's `check_authorization`. See here for
# details: https://github.com/CanCanCommunity/cancancan/wiki/Ensure-Authorization
def requires_authentication?
false
end
end
end

View File

@@ -1,5 +1,7 @@
module Api
class CustomersController < BaseController
skip_authorization_check only: :index
def index
@customers = current_api_user.customers
render json: @customers, each_serializer: CustomerSerializer
@@ -10,7 +12,7 @@ module Api
authorize! :update, @customer
if @customer.update_attributes(params[:customer])
render json: @customer, serializer: CustomerSerializer, status: 200
render json: @customer, serializer: CustomerSerializer, status: :ok
else
invalid_resource!(@customer)
end

View File

@@ -6,9 +6,9 @@ module Api
authorize! :destroy, enterprise_fee
if enterprise_fee.destroy
render text: I18n.t(:successfully_removed), status: 204
render text: I18n.t(:successfully_removed), status: :no_content
else
render text: enterprise_fee.errors.full_messages.first, status: 403
render text: enterprise_fee.errors.full_messages.first, status: :forbidden
end
end

View File

@@ -1,23 +1,18 @@
module Api
class EnterprisesController < Spree::Api::BaseController
class EnterprisesController < BaseController
before_filter :override_owner, only: [:create, :update]
before_filter :check_type, only: :update
before_filter :override_sells, only: [:create, :update]
before_filter :override_visible, only: [:create, :update]
respond_to :json
def managed
@enterprises = Enterprise.ransack(params[:q]).result.managed_by(current_api_user)
render params[:template] || :bulk_index
end
skip_authorization_check only: [:shopfront]
def create
authorize! :create, Enterprise
@enterprise = Enterprise.new(params[:enterprise])
if @enterprise.save
render text: @enterprise.id, :status => 201
render text: @enterprise.id, status: :created
else
invalid_resource!(@enterprise)
end
@@ -28,7 +23,7 @@ module Api
authorize! :update, @enterprise
if @enterprise.update_attributes(params[:enterprise])
render text: @enterprise.id, :status => 200
render text: @enterprise.id, status: :ok
else
invalid_resource!(@enterprise)
end
@@ -38,15 +33,21 @@ module Api
@enterprise = Enterprise.find_by_permalink(params[:id]) || Enterprise.find(params[:id])
authorize! :update, @enterprise
if params[:logo] && @enterprise.update_attributes( { logo: params[:logo] } )
render text: @enterprise.logo.url(:medium), :status => 200
elsif params[:promo] && @enterprise.update_attributes( { promo_image: params[:promo] } )
render text: @enterprise.promo_image.url(:medium), :status => 200
if params[:logo] && @enterprise.update_attributes( logo: params[:logo] )
render text: @enterprise.logo.url(:medium), status: :ok
elsif params[:promo] && @enterprise.update_attributes( promo_image: params[:promo] )
render text: @enterprise.promo_image.url(:medium), status: :ok
else
invalid_resource!(@enterprise)
end
end
def shopfront
enterprise = Enterprise.find_by_id(params[:id])
render text: Api::EnterpriseShopfrontSerializer.new(enterprise).to_json, status: :ok
end
private
def override_owner

View File

@@ -1,25 +0,0 @@
module Api
class OrderCyclesController < Spree::Api::BaseController
respond_to :json
def managed
authorize! :admin, OrderCycle
authorize! :read, OrderCycle
@order_cycles = OrderCycle.ransack(params[:q]).result.managed_by(current_api_user)
render params[:template] || :bulk_index
end
def accessible
@order_cycles = if params[:as] == "distributor"
OrderCycle.ransack(params[:q]).result.
involving_managed_distributors_of(current_api_user).order('updated_at DESC')
elsif params[:as] == "producer"
OrderCycle.ransack(params[:q]).result.
involving_managed_producers_of(current_api_user).order('updated_at DESC')
else
OrderCycle.ransack(params[:q]).result.accessible_by(current_api_user)
end
render params[:template] || :bulk_index
end
end
end

View File

@@ -3,10 +3,9 @@ module Api
respond_to :json
def job_queue
render json: {alive: job_queue_alive?}
render json: { alive: job_queue_alive? }
end
private
def job_queue_alive?

View File

@@ -1,22 +1,29 @@
require 'open_food_network/referer_parser'
require 'spree/authentication_helpers'
class ApplicationController < ActionController::Base
protect_from_forgery
prepend_before_filter :restrict_iframes
before_filter :set_cache_headers # Issue #1213, prevent cart emptying via cache when using back button
before_filter :set_cache_headers # prevent cart emptying via cache when using back button #1213
include EnterprisesHelper
include Spree::AuthenticationHelpers
def redirect_to(options = {}, response_status = {})
::Rails.logger.error("Redirected by #{caller(1).first rescue "unknown"}")
::Rails.logger.error("Redirected by #{begin
caller(1).first
rescue StandardError
'unknown'
end}")
super(options, response_status)
end
def set_checkout_redirect
referer_path = OpenFoodNetwork::RefererParser::path(request.referer)
referer_path = OpenFoodNetwork::RefererParser.path(request.referer)
if referer_path
session["spree_user_return_to"] = [main_app.checkout_path].include?(referer_path) ? referer_path : root_path
is_checkout_path_the_referer = [main_app.checkout_path].include?(referer_path)
session["spree_user_return_to"] = is_checkout_path_the_referer ? referer_path : root_path
end
end
@@ -27,13 +34,13 @@ class ApplicationController < ActionController::Base
def enable_embedded_styles
session[:embedded_shopfront] = true
render json: {}, status: 200
render json: {}, status: :ok
end
def disable_embedded_styles
session.delete :embedded_shopfront
session.delete :shopfront_redirect
render json: {}, status: 200
render json: {}, status: :ok
end
protected
@@ -44,7 +51,7 @@ class ApplicationController < ActionController::Base
end
def after_sign_out_path_for(_resource_or_scope)
session[:shopfront_redirect] ? session[:shopfront_redirect] : root_path
session[:shopfront_redirect] || root_path
end
private
@@ -81,8 +88,8 @@ class ApplicationController < ActionController::Base
# This condition is more rigourous than required by development to avoid coupling this
# condition to every controller spec
if current_distributor && current_order &&
current_distributor.respond_to?(:ready_for_checkout?) &&
!current_distributor.ready_for_checkout?
current_distributor.respond_to?(:ready_for_checkout?) &&
!current_distributor.ready_for_checkout?
current_order.empty!
current_order.set_distribution! nil, nil
@@ -105,10 +112,10 @@ class ApplicationController < ActionController::Base
# Useful for rendering html within a JSON response, particularly if the specified
# template or partial then goes on to render further partials without specifying
# their format.
def with_format(format, &block)
def with_format(format)
old_formats = formats
self.formats = [format]
block.call
yield
self.formats = old_formats
nil
end
@@ -118,5 +125,4 @@ class ApplicationController < ActionController::Base
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
end
end

View File

@@ -32,7 +32,9 @@ class BaseController < ApplicationController
@order_cycles = OrderCycle.with_distributor(@distributor).active
.order(@distributor.preferred_shopfront_order_cycle_order)
applicator = OpenFoodNetwork::TagRuleApplicator.new(@distributor, "FilterOrderCycles", current_customer.andand.tag_list)
applicator = OpenFoodNetwork::TagRuleApplicator.new(@distributor,
"FilterOrderCycles",
current_customer.andand.tag_list)
applicator.filter!(@order_cycles)
# And default to the only order cycle if there's only the one

View File

@@ -8,7 +8,6 @@ class CheckoutController < Spree::CheckoutController
prepend_before_filter :require_order_cycle
prepend_before_filter :require_distributor_chosen
skip_before_filter :check_registration
before_filter :enable_embedded_shopfront
include OrderCyclesHelper
@@ -40,15 +39,15 @@ class CheckoutController < Spree::CheckoutController
next if advance_order_state(@order)
if @order.errors.present?
flash[:error] = @order.errors.full_messages.to_sentence
else
flash[:error] = t(:payment_processing_failed)
end
flash[:error] = if @order.errors.present?
@order.errors.full_messages.to_sentence
else
t(:payment_processing_failed)
end
update_failed
return
end
return update_failed unless @order.state == "complete" || @order.completed?
return update_failed unless @order.state == "complete" || @order.completed?
set_default_bill_address
set_default_ship_address
@@ -59,10 +58,10 @@ class CheckoutController < Spree::CheckoutController
flash[:notice] = t(:order_processed_successfully)
respond_to do |format|
format.html do
respond_with(@order, :location => order_path(@order))
respond_with(@order, location: order_path(@order))
end
format.json do
render json: {path: order_path(@order)}, status: 200
render json: { path: order_path(@order) }, status: :ok
end
end
end
@@ -82,10 +81,14 @@ class CheckoutController < Spree::CheckoutController
new_bill_address = @order.bill_address.clone.attributes
user_bill_address_id = spree_current_user.bill_address.andand.id
spree_current_user.update_attributes(bill_address_attributes: new_bill_address.merge('id' => user_bill_address_id))
spree_current_user.update_attributes(
bill_address_attributes: new_bill_address.merge('id' => user_bill_address_id)
)
customer_bill_address_id = @order.customer.bill_address.andand.id
@order.customer.update_attributes(bill_address_attributes: new_bill_address.merge('id' => customer_bill_address_id))
@order.customer.update_attributes(
bill_address_attributes: new_bill_address.merge('id' => customer_bill_address_id)
)
end
end
@@ -94,35 +97,43 @@ class CheckoutController < Spree::CheckoutController
new_ship_address = @order.ship_address.clone.attributes
user_ship_address_id = spree_current_user.ship_address.andand.id
spree_current_user.update_attributes(ship_address_attributes: new_ship_address.merge('id' => user_ship_address_id))
spree_current_user.update_attributes(
ship_address_attributes: new_ship_address.merge('id' => user_ship_address_id)
)
customer_ship_address_id = @order.customer.ship_address.andand.id
@order.customer.update_attributes(ship_address_attributes: new_ship_address.merge('id' => customer_ship_address_id))
@order.customer.update_attributes(
ship_address_attributes: new_ship_address.merge('id' => customer_ship_address_id)
)
end
end
def check_order_for_phantom_fees
phantom_fees = @order.adjustments.joins('LEFT OUTER JOIN spree_line_items ON spree_line_items.id = spree_adjustments.source_id').
where("originator_type = 'EnterpriseFee' AND source_type = 'Spree::LineItem' AND spree_line_items.id IS NULL")
phantom_fees = @order.adjustments.
joins("LEFT OUTER JOIN spree_line_items"\
" ON spree_line_items.id = spree_adjustments.source_id").
where("originator_type = 'EnterpriseFee'"\
" AND source_type = 'Spree::LineItem' AND spree_line_items.id IS NULL")
if phantom_fees.any?
Bugsnag.notify(RuntimeError.new("Phantom Fees"), {
phantom_fees: {
phantom_total: phantom_fees.sum(&:amount).to_s,
phantom_fees: phantom_fees.as_json
}
})
Bugsnag.notify(RuntimeError.new("Phantom Fees"),
phantom_fees: {
phantom_total: phantom_fees.sum(&:amount).to_s,
phantom_fees: phantom_fees.as_json
})
end
end
# Copied and modified from spree. Remove check for order state, since the state machine is
# progressed all the way in one go with the one page checkout.
def object_params
# For payment step, filter order parameters to produce the expected nested attributes for a single payment and its source, discarding attributes for payment methods other than the one selected
# For payment step, filter order parameters to produce the expected
# nested attributes for a single payment and its source,
# discarding attributes for payment methods other than the one selected
if params[:payment_source].present? && source_params = params.delete(:payment_source)[params[:order][:payments_attributes].first[:payment_method_id].underscore]
params[:order][:payments_attributes].first[:source_attributes] = source_params
end
if (params[:order][:payments_attributes])
if params[:order][:payments_attributes]
params[:order][:payments_attributes].first[:amount] = @order.total
end
if params[:order][:existing_card_id]
@@ -149,12 +160,13 @@ class CheckoutController < Spree::CheckoutController
render :edit
end
format.json do
render json: {errors: @order.errors, flash: flash.to_hash}.to_json, status: 400
render json: { errors: @order.errors, flash: flash.to_hash }.to_json, status: :bad_request
end
end
end
# When we have a pickup Shipping Method, we clone the distributor address into ship_address before_save
# When we have a pickup Shipping Method,
# we clone the distributor address into ship_address before_save
# We don't want this data in the form, so we clear it out
def clear_ship_address
unless current_order.shipping_method.andand.require_ship_address
@@ -162,15 +174,11 @@ class CheckoutController < Spree::CheckoutController
end
end
def skip_state_validation?
true
end
def load_order
@order = current_order
redirect_to main_app.shop_path and return unless @order and @order.checkout_allowed?
redirect_to_cart_path and return unless valid_order_line_items?
redirect_to main_app.shop_path and return if @order.completed?
redirect_to(main_app.shop_path) && return unless @order && @order.checkout_allowed?
redirect_to_cart_path && return unless valid_order_line_items?
redirect_to(main_app.shop_path) && return if @order.completed?
before_address
setup_for_current_state
end
@@ -185,17 +193,19 @@ class CheckoutController < Spree::CheckoutController
end
def valid_order_line_items?
@order.insufficient_stock_lines.empty? && OrderCycleDistributedVariants.new(@order.order_cycle, @order.distributor).distributes_order_variants?(@order)
@order.insufficient_stock_lines.empty? &&
OrderCycleDistributedVariants.new(@order.order_cycle, @order.distributor).
distributes_order_variants?(@order)
end
def redirect_to_cart_path
respond_to do |format|
format.html do
redirect_to cart_path
redirect_to main_app.cart_path
end
format.json do
render json: {path: cart_path}, status: 400
render json: { path: main_app.cart_path }, status: :bad_request
end
end
end
@@ -203,10 +213,12 @@ class CheckoutController < Spree::CheckoutController
def redirect_to_paypal_express_form_if_needed
return unless params[:order][:payments_attributes]
payment_method = Spree::PaymentMethod.find(params[:order][:payments_attributes].first[:payment_method_id])
return unless payment_method.kind_of?(Spree::Gateway::PayPalExpress)
payment_method_id = params[:order][:payments_attributes].first[:payment_method_id]
payment_method = Spree::PaymentMethod.find(payment_method_id)
return unless payment_method.is_a?(Spree::Gateway::PayPalExpress)
render json: {path: spree.paypal_express_path(payment_method_id: payment_method.id)}, status: 200
render json: { path: spree.paypal_express_path(payment_method_id: payment_method.id) },
status: :ok
true
end
@@ -230,7 +242,7 @@ class CheckoutController < Spree::CheckoutController
flash[:error] = t(:spree_gateway_error_flash_for_checkout, error: error.message)
respond_to do |format|
format.html { render :edit }
format.json { render json: { flash: flash.to_hash }, status: 400 }
format.json { render json: { flash: flash.to_hash }, status: :bad_request }
end
end
end

Some files were not shown because too many files have changed in this diff Show More