Compare commits

...

190 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
537 changed files with 10787 additions and 10466 deletions

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
@@ -75,18 +70,16 @@ Metrics/LineLength:
- 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
@@ -101,9 +94,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 +106,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,36 +123,34 @@ 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
@@ -170,8 +160,8 @@ Metrics/LineLength:
- 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 +169,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 +203,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 +228,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 +272,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 +280,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 +290,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 +309,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 +337,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 +362,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 +391,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 +406,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
@@ -439,15 +435,14 @@ Metrics/AbcSize:
- 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 +452,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
@@ -478,7 +472,6 @@ Metrics/AbcSize:
- lib/open_food_network/orders_and_fulfillments_report.rb
- lib/open_food_network/packing_report.rb
- lib/open_food_network/payments_report.rb
- lib/open_food_network/permissions.rb
- lib/open_food_network/products_and_inventory_report.rb
- lib/open_food_network/reports/line_items.rb
- lib/open_food_network/sales_tax_report.rb
@@ -489,9 +482,11 @@ 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
@@ -501,10 +496,10 @@ Metrics/AbcSize:
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
@@ -515,7 +510,6 @@ Metrics/CyclomaticComplexity:
- 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,7 +529,7 @@ 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
@@ -545,7 +539,6 @@ Metrics/PerceivedComplexity:
- 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 +555,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 +565,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
@@ -601,24 +592,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 +633,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 +652,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 +678,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 +709,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

@@ -194,8 +194,6 @@ Metrics/BlockNesting:
Metrics/ClassLength:
Max: 100
Exclude:
- engines/order_management/app/services/order_management/reports/enterprise_fee_summary/scope.rb
Metrics/ModuleLength:
Max: 100
@@ -205,8 +203,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

91
Gemfile
View File

@@ -2,10 +2,11 @@ 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.2.2'
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'
# Patched version. See http://rubysec.com/advisories/CVE-2015-5312/.
gem 'nokogiri', '>= 1.6.7.1'
@@ -20,8 +21,8 @@ gem 'pg'
# for details.
gem 'spree', 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'
gem 'spree_i18n', github: 'spree/spree_i18n', branch: '1-3-stable'
# Our branch contains two changes
# - Pass customer email and phone number to PayPal (merged to upstream master)
@@ -33,51 +34,51 @@ gem 'stripe'
# which is needed for Pin Payments (and possibly others).
gem 'activemerchant', '~> 1.78'
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 +94,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.0'
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

@@ -170,7 +170,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 +179,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)
@@ -211,9 +209,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 +255,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)
@@ -460,7 +456,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.0)
rspec-core (~> 3.0)
ruby-progressbar (~> 1.4)
geocoder (1.1.8)
@@ -489,23 +485,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.2.2)
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,7 +509,7 @@ 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)
@@ -543,9 +538,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 +590,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 +612,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)
@@ -690,10 +686,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)
@@ -733,7 +729,7 @@ GEM
tilt (~> 1.1, != 1.3.0)
state_machine (1.2.0)
stringex (1.5.1)
stripe (4.11.0)
stripe (4.18.1)
faraday (~> 0.13)
net-http-persistent (~> 3.0)
therubyracer (0.12.0)
@@ -754,7 +750,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 +763,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)
@@ -797,7 +797,6 @@ DEPENDENCIES
bugsnag
byebug (~> 9.0.0)
capybara (>= 2.15.4)
chromedriver-helper
coffee-rails (~> 3.2.1)
combine_pdf
compass-rails
@@ -807,7 +806,7 @@ DEPENDENCIES
database_cleaner (= 0.7.1)
db2fog
debugger-linecache
deface (= 1.0.0)
deface (= 1.0.2)
delayed_job_active_record
delayed_job_web
diffy
@@ -818,7 +817,7 @@ DEPENDENCIES
foundation-icons-sass-rails
foundation-rails
foundation_rails_helper!
fuubar (~> 2.3.2)
fuubar (~> 2.4.0)
geocoder
gmaps4rails
guard
@@ -827,12 +826,12 @@ DEPENDENCIES
guard-rspec (~> 4.7.3)
haml
i18n (~> 0.6.11)
i18n-js (~> 3.2.1)
i18n-js (~> 3.2.2)
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 +852,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)
@@ -883,6 +883,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.
@@ -29,24 +28,6 @@ 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.
## 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)
## Licence
Copyright (c) 2012 - 2018 Open Food Foundation, released under the AGPL licence.

0
Rakefile Normal file → Executable file
View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

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

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

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

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,7 +38,7 @@ 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)

View File

@@ -6,5 +6,6 @@ angular.module("admin.subscriptions").controller "OrderUpdateIssuesController",
$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')
key = if closes_at > moment() then "closes" else "closed"
text = t("js.subscriptions." + key)
"#{text} #{closes_at.fromNow()}"

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

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

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

@@ -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,11 +1,11 @@
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
skip_authorization_check only: [:shopfront, :managed]
def managed
@enterprises = Enterprise.ransack(params[:q]).result.managed_by(current_api_user)
@@ -17,7 +17,7 @@ module Api
@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 +28,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 +38,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

@@ -10,13 +10,13 @@ module Api
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)
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

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

@@ -4,19 +4,24 @@ 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
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 +32,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 +49,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 +86,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 +110,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 +123,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

@@ -40,15 +40,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 +59,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 +82,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 +98,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 +161,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
@@ -168,9 +181,9 @@ class CheckoutController < Spree::CheckoutController
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,7 +198,9 @@ 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
@@ -195,7 +210,7 @@ class CheckoutController < Spree::CheckoutController
end
format.json do
render json: {path: cart_path}, status: 400
render json: { path: cart_path }, status: :bad_request
end
end
end
@@ -203,10 +218,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 +247,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

View File

@@ -41,7 +41,7 @@ class DiscourseSsoController < ApplicationController
end
def require_config
raise ActionController::RoutingError.new('Not Found') unless discourse_configured?
raise ActionController::RoutingError, 'Not Found' unless discourse_configured?
end
def require_activation?

View File

@@ -42,13 +42,15 @@ class EnterprisesController < BaseController
end
def check_permalink
render text: params[:permalink], status: 409 and return if Enterprise.find_by_permalink params[:permalink]
if Enterprise.find_by_permalink params[:permalink]
render(text: params[:permalink], status: :conflict) && return
end
begin
Rails.application.routes.recognize_path( "/#{ params[:permalink].to_s }" )
render text: params[:permalink], status: 409
Rails.application.routes.recognize_path( "/#{params[:permalink]}" )
render text: params[:permalink], status: :conflict
rescue ActionController::RoutingError
render text: params[:permalink], status: 200
render text: params[:permalink], status: :ok
end
end
@@ -67,7 +69,8 @@ class EnterprisesController < BaseController
end
def reset_order
distributor = Enterprise.is_distributor.find_by_permalink(params[:id]) || Enterprise.is_distributor.find(params[:id])
distributor = Enterprise.is_distributor.find_by_permalink(params[:id]) ||
Enterprise.is_distributor.find(params[:id])
order = current_order(true)
reset_distributor(order, distributor)

View File

@@ -12,7 +12,5 @@ class HomeController < BaseController
end
end
def sell
end
def sell; end
end

View File

@@ -28,11 +28,11 @@ class LineItemsController < BaseController
def unauthorized
status = spree_current_user ? 403 : 401
render nothing: true, status: status and return
render(nothing: true, status: status) && return
end
def not_found
render nothing: true, status: 404 and return
render(nothing: true, status: :not_found) && return
end
def destroy_with_lock(item)

View File

@@ -1,6 +1,5 @@
class MapController < BaseController
layout 'darkswarm'
def index
end
def index; end
end

View File

@@ -3,6 +3,5 @@ class ProducersController < BaseController
before_filter :enable_embedded_shopfront
def index
end
def index; end
end

View File

@@ -10,17 +10,16 @@ class ShopController < BaseController
end
def products
begin
renderer = OpenFoodNetwork::CachedProductsRenderer.new(current_distributor, current_order_cycle)
renderer = OpenFoodNetwork::CachedProductsRenderer.new(current_distributor,
current_order_cycle)
# If we add any more filtering logic, we should probably
# move it all to a lib class like 'CachedProductsFilterer'
products_json = filter(renderer.products_json)
# If we add any more filtering logic, we should probably
# move it all to a lib class like 'CachedProductsFilterer'
products_json = filter(renderer.products_json)
render json: products_json
rescue OpenFoodNetwork::CachedProductsRenderer::NoProducts
render status: 404, json: ''
end
render json: products_json
rescue OpenFoodNetwork::CachedProductsRenderer::NoProducts
render status: :not_found, json: ''
end
def order_cycle
@@ -30,7 +29,7 @@ class ShopController < BaseController
@current_order_cycle = oc
render partial: "json/order_cycle"
else
render status: 404, json: ""
render status: :not_found, json: ""
end
else
render partial: "json/order_cycle"
@@ -59,6 +58,8 @@ class ShopController < BaseController
def applicator
return @applicator unless @applicator.nil?
@applicator = OpenFoodNetwork::TagRuleApplicator.new(current_distributor, "FilterProducts", current_customer.andand.tag_list)
@applicator = OpenFoodNetwork::TagRuleApplicator.new(current_distributor,
"FilterProducts",
current_customer.andand.tag_list)
end
end

View File

@@ -6,7 +6,7 @@ Spree::Admin::BaseController.class_eval do
layout 'spree/layouts/admin'
before_filter :set_locale
before_filter :warn_invalid_order_cycles
before_filter :warn_invalid_order_cycles, if: :html_request?
# Warn the user when they have an active order cycle with hubs that are not ready
# for checkout (ie. does not have valid shipping and payment methods).
@@ -47,7 +47,6 @@ Spree::Admin::BaseController.class_eval do
end
end
private
def active_distributors_not_ready_for_checkout
@@ -74,7 +73,7 @@ Spree::Admin::BaseController.class_eval do
request.format.json?
end
def render_as_json(data, options={})
def render_as_json(data, options = {})
ams_prefix = options.delete :ams_prefix
if [Array, ActiveRecord::Relation].include? data.class
render options.merge(json: data, each_serializer: serializer(ams_prefix))

View File

@@ -3,7 +3,6 @@ module Spree
GeneralSettingsController.class_eval do
end
module GeneralSettingsEditPreferences
def edit
super

View File

@@ -2,5 +2,5 @@ Spree::Admin::ImagesController.class_eval do
# This will make resource controller redirect correctly after deleting product images.
# This can be removed after upgrading to Spree 2.1.
# See here https://github.com/spree/spree/commit/334a011d2b8e16355e4ae77ae07cd93f7cbc8fd1
belongs_to 'spree/product', :find_by => :permalink
belongs_to 'spree/product', find_by: :permalink
end

View File

@@ -13,7 +13,7 @@ Spree::Admin::Orders::CustomerDetailsController.class_eval do
flash[:success] = Spree.t('customer_details_updated')
redirect_to admin_order_customer_path(@order)
else
render :action => :edit
render action: :edit
end
end

View File

@@ -3,7 +3,7 @@ require 'open_food_network/spree_api_key_loader'
Spree::Admin::OrdersController.class_eval do
include OpenFoodNetwork::SpreeApiKeyLoader
helper CheckoutHelper
before_filter :load_spree_api_key, :only => :bulk_management
before_filter :load_spree_api_key, only: :bulk_management
before_filter :load_order, only: %i[show edit update fire resend invoice print print_ticket]
before_filter :load_distribution_choices, only: [:new, :edit, :update]
@@ -16,7 +16,7 @@ Spree::Admin::OrdersController.class_eval do
# fees! This is a quick fix for that.
# TODO: update fees when adding/removing line items
# instead of the update_distribution_charge method.
after_filter :update_distribution_charge, :only => :update
after_filter :update_distribution_charge, only: :update
before_filter :require_distributor_abn, only: :invoice
@@ -43,7 +43,7 @@ Spree::Admin::OrdersController.class_eval do
def update
unless @order.update_attributes(params[:order]) && @order.line_items.present?
@order.errors.add(:line_items, Spree.t('errors.messages.blank')) if @order.line_items.empty?
return redirect_to edit_admin_order_path(@order), :flash => { :error => @order.errors.full_messages.join(', ') }
return redirect_to edit_admin_order_path(@order), flash: { error: @order.errors.full_messages.join(', ') }
end
@order.update!
@@ -88,7 +88,7 @@ Spree::Admin::OrdersController.class_eval do
private
def require_distributor_abn
unless @order.distributor.abn.present?
if @order.distributor.abn.blank?
flash[:error] = t(:must_have_valid_business_number, enterprise_name: @order.distributor.name)
respond_with(@order) { |format| format.html { redirect_to edit_admin_order_path(@order) } }
end

View File

@@ -12,7 +12,7 @@ module Spree
def collection
return parent.public_send(controller_name) if parent_data.present?
collection = if model_class.respond_to?(:accessible_by) &&
!current_ability.has_block?(params[:action], model_class)
!current_ability.has_block?(params[:action], model_class)
model_class.accessible_by(current_ability, action)
@@ -41,7 +41,7 @@ module Spree
@payment_method = PaymentMethod.find(params[:pm_id])
end
else
@payment_method = params[:provider_type].constantize.new()
@payment_method = params[:provider_type].constantize.new
end
render partial: 'provider_settings'
end
@@ -53,17 +53,21 @@ module Spree
end
def load_data
if spree_current_user.admin? || Rails.env.test?
@providers = Gateway.providers.sort{|p1, p2| p1.name <=> p2.name }
else
@providers = Gateway.providers.reject{ |p| p.name.include? "Bogus" }.sort{|p1, p2| p1.name <=> p2.name }
end
@providers = if spree_current_user.admin? || Rails.env.test?
Gateway.providers.sort_by(&:name)
else
Gateway.providers.reject{ |p| p.name.include? "Bogus" }.sort_by(&:name)
end
@providers.reject!{ |p| p.name.ends_with? "StripeConnect" } unless show_stripe?
@calculators = PaymentMethod.calculators.sort_by(&:name)
end
def load_hubs
@hubs = Enterprise.managed_by(spree_current_user).is_distributor.sort_by!{ |d| [(@payment_method.has_distributor? d) ? 0 : 1, d.name] }
# rubocop:disable Style/TernaryParentheses
@hubs = Enterprise.managed_by(spree_current_user).is_distributor.sort_by! do |d|
[(@payment_method.has_distributor? d) ? 0 : 1, d.name]
end
# rubocop:enable Style/TernaryParentheses
end
# Show Stripe as an option if enabled, or if the

View File

@@ -3,7 +3,7 @@ Spree::Admin::PaymentsController.class_eval do
def create
@payment = @order.payments.build(object_params)
if @payment.payment_method.is_a?(Spree::Gateway) && @payment.payment_method.payment_profiles_supported? && params[:card].present? and params[:card] != 'new'
if @payment.payment_method.is_a?(Spree::Gateway) && @payment.payment_method.payment_profiles_supported? && params[:card].present? && (params[:card] != 'new')
@payment.source = CreditCard.find_by_id(params[:card])
end
@@ -17,16 +17,15 @@ Spree::Admin::PaymentsController.class_eval do
@payment.process!
flash[:success] = flash_message_for(@payment, :successfully_created)
redirect_to admin_order_payments_path(@order)
redirect_to admin_order_payments_path(@order)
else
AdvanceOrderService.new(@order).call!
flash[:success] = Spree.t(:new_order_completed)
redirect_to edit_admin_order_url(@order)
end
rescue Spree::Core::GatewayError => e
flash[:error] = "#{e.message}"
flash[:error] = e.message.to_s
redirect_to new_admin_order_payment_path(@order)
end
end
@@ -50,12 +49,11 @@ Spree::Admin::PaymentsController.class_eval do
redirect_to request.referer
end
private
# Only show payments for the order's distributor
def filter_payment_methods
@payment_methods = @payment_methods.select{ |pm| pm.has_distributor? @order.distributor}
@payment_methods = @payment_methods.select{ |pm| pm.has_distributor? @order.distributor }
@payment_method ||= @payment_methods.first
end
end

View File

@@ -7,8 +7,8 @@ Spree::Admin::ProductsController.class_eval do
include EnterprisesHelper
before_filter :load_data
before_filter :load_form_data, :only => [:index, :new, :create, :edit, :update]
before_filter :load_spree_api_key, :only => [:index, :variant_overrides]
before_filter :load_form_data, only: [:index, :new, :create, :edit, :update]
before_filter :load_spree_api_key, only: [:index, :variant_overrides]
before_filter :strip_new_properties, only: [:create, :update]
respond_override create: { html: {
@@ -21,7 +21,8 @@ Spree::Admin::ProductsController.class_eval do
},
failure: lambda {
render :new
} } }
}
} }
def index
@current_user = spree_current_user
@@ -41,8 +42,8 @@ Spree::Admin::ProductsController.class_eval do
end
def bulk_update
collection_hash = Hash[params[:products].each_with_index.map { |p,i| [i,p] }]
product_set = Spree::ProductSet.new({:collection_attributes => collection_hash})
collection_hash = Hash[params[:products].each_with_index.map { |p, i| [i, p] }]
product_set = Spree::ProductSet.new(collection_attributes: collection_hash)
params[:filters] ||= {}
bulk_index_query = params[:filters].reduce("") do |string, filter|
@@ -56,14 +57,13 @@ Spree::Admin::ProductsController.class_eval do
redirect_to "/api/products/bulk_products?page=1;per_page=500;#{bulk_index_query}"
else
if product_set.errors.present?
render json: { errors: product_set.errors }, status: 400
render json: { errors: product_set.errors }, status: :bad_request
else
render :nothing => true, :status => 500
render nothing: true, status: :internal_server_error
end
end
end
protected
def collection
@@ -100,7 +100,6 @@ Spree::Admin::ProductsController.class_eval do
[:index, :bulk_update]
end
private
def load_form_data
@@ -115,11 +114,11 @@ Spree::Admin::ProductsController.class_eval do
joins(:product).
where('spree_products.supplier_id IN (?)', editable_enterprises.collect(&:id)).
where('spree_variants.import_date IS NOT NULL').
where(spree_variants: {is_master: false}).
where(spree_variants: {deleted_at: nil}).
where(spree_variants: { is_master: false }).
where(spree_variants: { deleted_at: nil }).
order('spree_variants.import_date DESC')
options = [{id: '0', name: ''}]
options = [{ id: '0', name: '' }]
import_dates.collect(&:import_date).map { |i| options.push(id: i.to_date, name: i.to_date.to_formatted_s(:long)) }
options
@@ -151,4 +150,8 @@ Spree::Admin::ProductsController.class_eval do
variant.on_demand = on_demand if on_demand.present?
variant.on_hand = on_hand.to_i if on_hand.present?
end
def set_product_master_variant_price_to_zero
@product.price = 0 if @product.price.nil?
end
end

View File

@@ -1,28 +1,28 @@
Spree::Admin::SearchController.class_eval do
def known_users
if exact_match = Spree.user_class.find_by_email(params[:q])
@users = [exact_match]
else
@users = spree_current_user.known_users.ransack({
:m => 'or',
:email_start => params[:q],
:ship_address_firstname_start => params[:q],
:ship_address_lastname_start => params[:q],
:bill_address_firstname_start => params[:q],
:bill_address_lastname_start => params[:q]
}).result.limit(10)
end
@users = if exact_match = Spree.user_class.find_by_email(params[:q])
[exact_match]
else
spree_current_user.known_users.ransack(
m: 'or',
email_start: params[:q],
ship_address_firstname_start: params[:q],
ship_address_lastname_start: params[:q],
bill_address_firstname_start: params[:q],
bill_address_lastname_start: params[:q]
).result.limit(10)
end
render json: @users, each_serializer: Api::Admin::UserSerializer
end
def customers
if spree_current_user.enterprises.pluck(:id).include? params[:distributor_id].to_i
@customers = Customer.ransack({m: 'or', email_start: params[:q], name_start: params[:q]})
.result.where(enterprise_id: params[:distributor_id])
else
@customers = []
end
@customers = if spree_current_user.enterprises.pluck(:id).include? params[:distributor_id].to_i
Customer.ransack(m: 'or', email_start: params[:q], name_start: params[:q])
.result.where(enterprise_id: params[:distributor_id])
else
[]
end
render json: @customers, each_serializer: Api::Admin::CustomerSerializer
end

View File

@@ -1,7 +1,7 @@
module Spree
module Admin
ShippingMethodsController.class_eval do
before_filter :do_not_destroy_referenced_shipping_methods, :only => :destroy
before_filter :do_not_destroy_referenced_shipping_methods, only: :destroy
before_filter :load_hubs, only: [:new, :edit, :create, :update]
# Sort shipping methods by distributor name
@@ -17,20 +17,25 @@ module Spree
collection
end
# Spree allows soft deletes of shipping_methods but our reports are not adapted to that.
# So, this method prevents the deletion (even soft) of shipping_methods that are referenced in orders.
# Spree allows soft deletes of shipping_methods but our reports are not adapted to that
# Here we prevent the deletion (even soft) of shipping_methods that are referenced in orders
def do_not_destroy_referenced_shipping_methods
order = Order.joins(shipments: :shipping_rates).where( spree_shipping_rates: { :shipping_method_id => @object } ).first
if order
flash[:error] = I18n.t(:shipping_method_destroy_error, number: order.number)
redirect_to collection_url and return
end
order = Order.joins(shipments: :shipping_rates)
.where( spree_shipping_rates: { shipping_method_id: @object } )
.first
return unless order
flash[:error] = I18n.t(:shipping_method_destroy_error, number: order.number)
redirect_to(collection_url) && return
end
private
def load_hubs
@hubs = Enterprise.managed_by(spree_current_user).is_distributor.sort_by!{ |d| [(@shipping_method.has_distributor? d) ? 0 : 1, d.name] }
# rubocop:disable Style/TernaryParentheses
@hubs = Enterprise.managed_by(spree_current_user).is_distributor.sort_by! do |d|
[(@shipping_method.has_distributor? d) ? 0 : 1, d.name]
end
# rubocop:enable Style/TernaryParentheses
end
end
end

View File

@@ -22,11 +22,11 @@ Spree::Admin::VariantsController.class_eval do
def destroy
@variant = Spree::Variant.find(params[:id])
if VariantDeleter.new.delete(@variant) # This line changed
flash[:success] = Spree.t('notice_messages.variant_deleted')
else
flash[:success] = Spree.t('notice_messages.variant_not_deleted')
end
flash[:success] = if VariantDeleter.new.delete(@variant) # This line changed
Spree.t('notice_messages.variant_deleted')
else
Spree.t('notice_messages.variant_not_deleted')
end
respond_with(@variant) do |format|
format.html { redirect_to admin_product_variants_url(params[:product_id]) }
@@ -34,12 +34,11 @@ Spree::Admin::VariantsController.class_eval do
end
end
protected
def create_before
option_values = params[:new_variant]
option_values.andand.each_value {|id| @object.option_values << OptionValue.find(id)}
option_values.andand.each_value { |id| @object.option_values << OptionValue.find(id) }
@object.save
end
end

View File

@@ -34,7 +34,7 @@ Spree::Api::ProductsController.class_eval do
@product = find_product(params[:product_id])
authorize! :delete, @product
@product.destroy
respond_with(@product, :status => 204)
respond_with(@product, status: 204)
end
# POST /api/products/:product_id/clone

View File

@@ -1,7 +1,6 @@
require 'open_food_network/address_finder'
Spree::CheckoutController.class_eval do
include CheckoutHelper
before_filter :enable_embedded_shopfront

View File

@@ -39,14 +39,14 @@ Spree::OrdersController.class_eval do
@order = order_to_update
unless @order
flash[:error] = t(:order_not_found)
redirect_to root_path and return
redirect_to(root_path) && return
end
if @order.update_attributes(params[:order])
discard_empty_line_items
with_open_adjustments { update_totals_and_taxes }
render :edit and return unless apply_coupon_code
render(:edit) && return unless apply_coupon_code
if @order == current_order
fire_event('spree.order.contents_changed')
@@ -56,7 +56,7 @@ Spree::OrdersController.class_eval do
respond_with(@order) do |format|
format.html do
if params.has_key?(:checkout)
if params.key?(:checkout)
@order.next_transition.run_callbacks if @order.cart?
redirect_to checkout_state_path(@order.checkout_steps.first)
elsif @order.complete?
@@ -95,13 +95,13 @@ Spree::OrdersController.class_eval do
end
def filter_order_params
if params[:order] and params[:order][:line_items_attributes]
if params[:order] && params[:order][:line_items_attributes]
params[:order][:line_items_attributes] = remove_missing_line_items(params[:order][:line_items_attributes])
end
end
def remove_missing_line_items(attrs)
attrs.select do |i, line_item|
attrs.select do |_i, line_item|
Spree::LineItem.find_by_id(line_item[:id])
end
end
@@ -129,7 +129,6 @@ Spree::OrdersController.class_eval do
redirect_to request.referer || order_path(@order)
end
private
# Updates the various denormalized total attributes of the order and
@@ -185,7 +184,7 @@ Spree::OrdersController.class_eval do
return unless order_to_update.andand.complete?
items = params[:order][:line_items_attributes]
.andand.select{ |k,attrs| attrs["quantity"].to_i > 0 }
.andand.select{ |_k, attrs| attrs["quantity"].to_i > 0 }
if items.empty?
flash[:error] = I18n.t(:orders_cannot_remove_the_final_item)

View File

@@ -4,7 +4,7 @@ Spree::PaypalController.class_eval do
after_filter :reset_order_when_complete, only: :confirm
def cancel
flash[:notice] = Spree.t('flash.cancel', :scope => 'paypal')
flash[:notice] = Spree.t('flash.cancel', scope: 'paypal')
redirect_to main_app.checkout_path
end

View File

@@ -5,6 +5,6 @@ class Spree::StoreController
before_filter :set_locale
def unauthorized
render 'shared/unauthorized', :status => 401
render 'shared/unauthorized', status: :unauthorized
end
end

View File

@@ -15,7 +15,7 @@ module Stripe
end
redirect_to main_app.edit_admin_enterprise_path(connector.enterprise, anchor: 'payment_methods')
rescue Stripe::StripeError => e
render text: e.message, status: 500
render text: e.message, status: :internal_server_error
end
end
end

View File

@@ -20,9 +20,9 @@ module Stripe
signature = request.headers["HTTP_STRIPE_SIGNATURE"]
@event = Webhook.construct_event(payload, signature, Stripe.endpoint_secret)
rescue JSON::ParserError
render nothing: true, status: 400
render nothing: true, status: :bad_request
rescue Stripe::SignatureVerificationError
render nothing: true, status: 401
render nothing: true, status: :unauthorized
end
# Stripe interprets a 4xx or 3xx response as a failure to receive the webhook,

View File

@@ -1,5 +1,6 @@
class UserConfirmationsController < DeviseController
include Spree::Core::ControllerHelpers::Auth # Needed for access to current_ability, so we can authorize! actions
# Needed for access to current_ability, so we can authorize! actions
include Spree::Core::ControllerHelpers::Auth
# GET /resource/confirmation/new
def new
@@ -44,7 +45,9 @@ class UserConfirmationsController < DeviseController
end
if resource.reset_password_token.present?
return spree.edit_spree_user_password_path(reset_password_token: resource.reset_password_token)
return spree.edit_spree_user_password_path(
reset_password_token: resource.reset_password_token
)
end
path = (session[:confirmation_return_url] || login_path).to_s

View File

@@ -10,7 +10,7 @@ class UserPasswordsController < Spree::UserPasswordsController
if resource.errors.empty?
set_flash_message(:success, :send_instructions) if is_navigational_format?
respond_with resource, :location => spree.login_path
respond_with resource, location: spree.login_path
else
respond_to do |format|
format.html do

View File

@@ -21,10 +21,6 @@ class UserRegistrationsController < Spree::UserRegistrationsController
associate_user
respond_to do |format|
format.html do
set_flash_message(:success, :signed_up_but_unconfirmed)
redirect_to after_sign_in_path_for(@user)
end
format.js do
render json: { email: @user.email }
end
@@ -39,9 +35,6 @@ class UserRegistrationsController < Spree::UserRegistrationsController
def render_error(errors = {})
clean_up_passwords(resource)
respond_to do |format|
format.html do
render :new
end
format.js do
render json: errors, status: :unauthorized
end

View File

@@ -33,31 +33,31 @@ module Admin
admin_inject_json_ams "admin.shippingMethods", "shippingMethod", @shipping_method, Api::Admin::ShippingMethodSerializer
end
def admin_inject_shops(opts={})
def admin_inject_shops(opts = {})
opts.reverse_merge!(module: 'admin.customers')
admin_inject_json_ams_array opts[:module], "shops", @shops, Api::Admin::IdNameSerializer
end
def admin_inject_available_countries(opts={})
def admin_inject_available_countries(opts = {})
opts.reverse_merge!(module: 'admin.customers')
admin_inject_json_ams_array opts[:module], 'availableCountries', available_countries, Api::CountrySerializer
end
def admin_inject_hubs(opts={})
def admin_inject_hubs(opts = {})
opts.reverse_merge!(module: 'ofn.admin')
admin_inject_json_ams_array opts[:module], "hubs", @hubs, Api::Admin::IdNameSerializer
end
def admin_inject_producers(opts={})
def admin_inject_producers(opts = {})
opts.reverse_merge!(module: 'ofn.admin')
admin_inject_json_ams_array opts[:module], "producers", @producers, Api::Admin::IdNameSerializer
end
def admin_inject_inventory_items(opts={module: 'ofn.admin'})
def admin_inject_inventory_items(opts = { module: 'ofn.admin' })
admin_inject_json_ams_array opts[:module], "inventoryItems", @inventory_items, Api::Admin::InventoryItemSerializer
end
def admin_inject_column_preferences(opts={})
def admin_inject_column_preferences(opts = {})
opts.reverse_merge!(module: 'ofn.admin', action: "#{controller_name}_#{action_name}")
column_preferences = ColumnPreference.for(spree_current_user, opts[:action])
admin_inject_json_ams_array opts[:module], "columns", column_preferences, Api::Admin::ColumnPreferenceSerializer
@@ -69,22 +69,22 @@ module Admin
def admin_inject_enterprise_permissions
permissions =
{can_manage_shipping_methods: can?(:manage_shipping_methods, @enterprise),
can_manage_payment_methods: can?(:manage_payment_methods, @enterprise),
can_manage_enterprise_fees: can?(:manage_enterprise_fees, @enterprise)}
{ can_manage_shipping_methods: can?(:manage_shipping_methods, @enterprise),
can_manage_payment_methods: can?(:manage_payment_methods, @enterprise),
can_manage_enterprise_fees: can?(:manage_enterprise_fees, @enterprise) }
admin_inject_json "admin.enterprises", "enterprisePermissions", permissions
end
def admin_inject_hub_permissions
render partial: "admin/json/injection_ams", locals: {ngModule: "admin.variantOverrides", name: "hubPermissions", json: @hub_permissions.to_json}
render partial: "admin/json/injection_ams", locals: { ngModule: "admin.variantOverrides", name: "hubPermissions", json: @hub_permissions.to_json }
end
def admin_inject_products
admin_inject_json_ams_array "ofn.admin", "products", @products, Api::Admin::ProductSerializer
end
def admin_inject_tax_categories(opts={module: 'ofn.admin'})
def admin_inject_tax_categories(opts = { module: 'ofn.admin' })
admin_inject_json_ams_array opts[:module], "tax_categories", @tax_categories, Api::Admin::TaxCategorySerializer
end
@@ -101,7 +101,7 @@ module Admin
end
def admin_inject_order_cycle_instance
render partial: "admin/json/injection_ams", locals: {ngModule: 'admin.orderCycles', name: 'ocInstance', json: "{coordinator_id: '#{@order_cycle.coordinator.id}'}"}
render partial: "admin/json/injection_ams", locals: { ngModule: 'admin.orderCycles', name: 'ocInstance', json: "{coordinator_id: '#{@order_cycle.coordinator.id}'}" }
end
def admin_inject_order_cycles
@@ -109,22 +109,22 @@ module Admin
end
def admin_inject_spree_api_key
render partial: "admin/json/injection_ams", locals: {ngModule: 'admin.indexUtils', name: 'SpreeApiKey', json: "'#{@spree_api_key.to_s}'"}
render partial: "admin/json/injection_ams", locals: { ngModule: 'admin.indexUtils', name: 'SpreeApiKey', json: "'#{@spree_api_key}'" }
end
def admin_inject_json(ngModule, name, data)
json = data.to_json
render partial: "admin/json/injection_ams", locals: {ngModule: ngModule, name: name, json: json}
render partial: "admin/json/injection_ams", locals: { ngModule: ngModule, name: name, json: json }
end
def admin_inject_json_ams(ngModule, name, data, serializer, opts = {})
json = serializer.new(data, {scope: spree_current_user}.merge(opts)).to_json
render partial: "admin/json/injection_ams", locals: {ngModule: ngModule, name: name, json: json}
json = serializer.new(data, { scope: spree_current_user }.merge(opts)).to_json
render partial: "admin/json/injection_ams", locals: { ngModule: ngModule, name: name, json: json }
end
def admin_inject_json_ams_array(ngModule, name, data, serializer, opts = {})
json = ActiveModel::ArraySerializer.new(data, {each_serializer: serializer, scope: spree_current_user}.merge(opts)).to_json
render partial: "admin/json/injection_ams", locals: {ngModule: ngModule, name: name, json: json}
json = ActiveModel::ArraySerializer.new(data, { each_serializer: serializer, scope: spree_current_user }.merge(opts)).to_json
render partial: "admin/json/injection_ams", locals: { ngModule: ngModule, name: name, json: json }
end
end
end

View File

@@ -5,8 +5,8 @@ module Admin
# We exclude shipping method adjustments because they are displayed in a
# separate table together with the order line items.
def order_adjustments_for_display(order)
order.adjustments.eligible.select do |adjustment|
adjustment.originator_type != "Spree::ShippingMethod"
order.adjustments.eligible.reject do |adjustment|
adjustment.originator_type == "Spree::ShippingMethod"
end
end
end

View File

@@ -1,32 +1,32 @@
class AngularFormBuilder < ActionView::Helpers::FormBuilder
def ng_fields_for(record_name, *args, &block)
def ng_fields_for(record_name, *_args)
raise "Nested ng_fields_for is not yet supported" if @fields_for_record_name.present?
@fields_for_record_name = record_name
block.call self
yield self
@fields_for_record_name = nil
end
def ng_text_field(method, options = {})
value = "{{ #{angular_model(method)} }}"
options.reverse_merge!({'id' => angular_id(method)})
options.reverse_merge!('id' => angular_id(method))
@template.text_field_tag angular_name(method), value, options
end
def ng_hidden_field(method, options = {})
def ng_hidden_field(method, _options = {})
value = "{{ #{angular_model(method)} }}"
@template.hidden_field_tag angular_name(method), value, :id => angular_id(method)
@template.hidden_field_tag angular_name(method), value, id: angular_id(method)
end
def ng_select(method, choices, angular_field, options = {})
options.reverse_merge!({'id' => angular_id(method), 'ng-model' => "#{angular_model(method)}"})
options.reverse_merge!('id' => angular_id(method), 'ng-model' => angular_model(method).to_s)
@template.select_tag angular_name(method), @template.ng_options_for_select(choices, angular_field), options
end
def ng_collection_select(method, collection, value_method, text_method, angular_field, options = {})
options.reverse_merge!({'id' => angular_id(method), 'ng-model' => "#{angular_model(method)}"})
options.reverse_merge!('id' => angular_id(method), 'ng-model' => angular_model(method).to_s)
@template.select_tag angular_name(method), @template.ng_options_from_collection_for_select(collection, value_method, text_method, angular_field), options
end

View File

@@ -1,10 +1,10 @@
module AngularFormHelper
def ng_options_for_select(container, angular_field=nil)
def ng_options_for_select(container, _angular_field = nil)
return container if String === container
container.map do |element|
html_attributes = option_html_attributes(element)
text, value = option_text_and_value(element).map { |item| item.to_s }
text, value = option_text_and_value(element).map(&:to_s)
%(<option value="#{ERB::Util.html_escape(value)}"#{html_attributes}>#{ERB::Util.html_escape(text)}</option>)
end.join("\n").html_safe
end
@@ -18,7 +18,6 @@ module AngularFormHelper
end
end
class ActionView::Helpers::InstanceTag
include AngularFormHelper
end

View File

@@ -8,13 +8,13 @@ module ApplicationHelper
def ng_form_for(name, *args, &block)
options = args.extract_options!
form_for(name, *(args << options.merge(:builder => AngularFormBuilder)), &block)
form_for(name, *(args << options.merge(builder: AngularFormBuilder)), &block)
end
# Pass URL helper calls on to spree where applicable so that we don't need to use
# spree.foo_path in any view rendered from non-spree-namespaced controllers.
def method_missing(method, *args, &block)
if (method.to_s.end_with?('_path') || method.to_s.end_with?('_url')) && spree.respond_to?(method)
if method.to_s.end_with?('_path', '_url') && spree.respond_to?(method)
spree.public_send(method, *args)
else
super

View File

@@ -3,7 +3,7 @@ module CheckoutHelper
current_order.distributor.allow_guest_orders?
end
def checkout_adjustments_for(order, opts={})
def checkout_adjustments_for(order, opts = {})
adjustments = order.adjustments.eligible
exclude = opts[:exclude] || {}
@@ -24,7 +24,7 @@ module CheckoutHelper
def display_checkout_admin_and_handling_adjustments_total_for(order)
adjustments = order.adjustments.eligible.where('originator_type = ? AND source_type != ? ', 'EnterpriseFee', 'Spree::LineItem')
Spree::Money.new adjustments.sum(&:amount) , currency: order.currency
Spree::Money.new adjustments.sum(&:amount), currency: order.currency
end
def checkout_line_item_adjustments(order)
@@ -36,7 +36,7 @@ module CheckoutHelper
end
def display_checkout_subtotal(order)
Spree::Money.new checkout_subtotal(order) , currency: order.currency
Spree::Money.new checkout_subtotal(order), currency: order.currency
end
def display_checkout_tax_total(order)
@@ -44,22 +44,22 @@ module CheckoutHelper
end
def display_checkout_taxes_hash(order)
order.tax_adjustment_totals.each_with_object(Hash.new) do |(tax_rate, tax_amount), hash|
hash[number_to_percentage(tax_rate.amount * 100, :precision => 1)] = Spree::Money.new tax_amount, currency: order.currency
order.tax_adjustment_totals.each_with_object({}) do |(tax_rate, tax_amount), hash|
hash[number_to_percentage(tax_rate.amount * 100, precision: 1)] = Spree::Money.new tax_amount, currency: order.currency
end
end
def display_line_item_tax_rates(line_item)
line_item.tax_rates.map { |tr| number_to_percentage(tr.amount * 100, :precision => 1) }.join(", ")
line_item.tax_rates.map { |tr| number_to_percentage(tr.amount * 100, precision: 1) }.join(", ")
end
def display_adjustment_tax_rates(adjustment)
tax_rates = TaxRateFinder.tax_rates_of(adjustment)
tax_rates.map { |tr| number_to_percentage(tr.amount * 100, :precision => 1) }.join(", ")
tax_rates.map { |tr| number_to_percentage(tr.amount * 100, precision: 1) }.join(", ")
end
def display_adjustment_amount(adjustment)
Spree::Money.new(adjustment.amount, { :currency => adjustment.currency })
Spree::Money.new(adjustment.amount, currency: adjustment.currency)
end
def display_checkout_total_less_tax(order)
@@ -68,10 +68,10 @@ module CheckoutHelper
def validated_input(name, path, args = {})
attributes = {
required: true,
type: :text,
name: path,
id: path,
:required => true,
:type => :text,
:name => path,
:id => path,
"ng-model" => path,
"ng-class" => "{error: !fieldValid('#{path}')}"
}.merge args
@@ -81,8 +81,8 @@ module CheckoutHelper
def validated_select(name, path, options, args = {})
attributes = {
required: true,
id: path,
:required => true,
:id => path,
"ng-model" => path,
"ng-class" => "{error: !fieldValid('#{path}')}"
}.merge args

View File

@@ -16,10 +16,10 @@ module DiscourseHelper
end
def discourse_url!
discourse_url or raise 'Missing Discourse URL'
discourse_url || raise('Missing Discourse URL')
end
def discourse_sso_secret!
ENV['DISCOURSE_SSO_SECRET'] or raise 'Missing SSO secret'
ENV['DISCOURSE_SSO_SECRET'] || raise('Missing SSO secret')
end
end

View File

@@ -11,7 +11,7 @@ module EnterprisesHelper
end
def available_shipping_methods
return [] unless current_distributor.present?
return [] if current_distributor.blank?
shipping_methods = current_distributor.shipping_methods
applicator = OpenFoodNetwork::TagRuleApplicator.new(current_distributor, "FilterShippingMethods", current_customer.andand.tag_list)
@@ -21,7 +21,7 @@ module EnterprisesHelper
end
def available_payment_methods
return [] unless current_distributor.present?
return [] if current_distributor.blank?
payment_methods = current_distributor.payment_methods.available(:front_end).all
filter = OpenFoodNetwork::AvailablePaymentMethodFilter.new
@@ -43,7 +43,7 @@ module EnterprisesHelper
order('is_primary_producer ASC, name')
end
def enterprises_options enterprises
def enterprises_options(enterprises)
enterprises.map { |enterprise| [enterprise.name + ": " + enterprise.address.address1 + ", " + enterprise.address.city, enterprise.id.to_i] }
end
@@ -74,7 +74,7 @@ module EnterprisesHelper
name = t(:delete)
options = {}
options[:class] = "delete-resource"
options[:data] = { :action => 'remove', :confirm => enterprise_confirm_delete_message(enterprise) }
options[:data] = { action: 'remove', confirm: enterprise_confirm_delete_message(enterprise) }
link_to_with_icon 'icon-trash', name, url, options
end

View File

@@ -10,6 +10,14 @@ module InjectionHelper
)
end
def inject_enterprise_shopfront_list
inject_json_ams(
'enterprises',
Enterprise.activated.includes(address: :state).all,
Api::EnterpriseShopfrontListSerializer
)
end
def inject_enterprise_and_relatives
inject_json_ams "enterprises", current_distributor.relatives_including_self.activated.includes(address: :state).all, Api::EnterpriseSerializer, enterprise_injection_data
end
@@ -28,12 +36,12 @@ module InjectionHelper
def inject_available_shipping_methods
inject_json_ams "shippingMethods", available_shipping_methods,
Api::ShippingMethodSerializer, current_order: current_order
Api::ShippingMethodSerializer, current_order: current_order
end
def inject_available_payment_methods
inject_json_ams "paymentMethods", available_payment_methods,
Api::PaymentMethodSerializer, current_order: current_order
Api::PaymentMethodSerializer, current_order: current_order
end
def inject_taxons
@@ -49,7 +57,7 @@ module InjectionHelper
end
def inject_spree_api_key
render partial: "json/injection_ams", locals: {name: 'spreeApiKey', json: "'#{@spree_api_key.to_s}'"}
render partial: "json/injection_ams", locals: { name: 'spreeApiKey', json: "'#{@spree_api_key}'" }
end
def inject_available_countries
@@ -57,7 +65,7 @@ module InjectionHelper
end
def inject_enterprise_attributes
render partial: "json/injection_ams", locals: {name: 'enterpriseAttributes', json: "#{@enterprise_attributes.to_json}"}
render partial: "json/injection_ams", locals: { name: 'enterpriseAttributes', json: @enterprise_attributes.to_json.to_s }
end
def inject_orders
@@ -81,7 +89,7 @@ module InjectionHelper
end
def inject_json(name, partial, opts = {})
render partial: "json/injection", locals: {name: name, partial: partial}.merge(opts)
render partial: "json/injection", locals: { name: name, partial: partial }.merge(opts)
end
def inject_json_ams(name, data, serializer, opts = {})
@@ -92,14 +100,13 @@ module InjectionHelper
serializer_instance = serializer.new(data, opts)
json = serializer_instance.to_json
render partial: "json/injection_ams", locals: {name: name, json: json}
render partial: "json/injection_ams", locals: { name: name, json: json }
end
private
def enterprise_injection_data
@enterprise_injection_data ||= OpenFoodNetwork::EnterpriseInjectionData.new
{data: @enterprise_injection_data}
{ data: @enterprise_injection_data }
end
end

View File

@@ -15,7 +15,7 @@ module OrderCyclesHelper
validated_enterprise_options permitted_producer_enterprises_for(order_cycle)
end
def permitted_coordinating_enterprises_for(order_cycle)
def permitted_coordinating_enterprises_for(_order_cycle)
Enterprise.managed_by(spree_current_user).is_distributor.by_name
end
@@ -54,7 +54,7 @@ module OrderCyclesHelper
distance_of_time_in_words_to_now(orders_close_at)]
end
def active_order_cycle_for_distributor?(distributor)
def active_order_cycle_for_distributor?(_distributor)
OrderCycle.active.with_distributor(@distributor).present?
end
@@ -80,7 +80,7 @@ module OrderCyclesHelper
private
def validated_enterprise_options(enterprises, options={})
def validated_enterprise_options(enterprises, options = {})
enterprises.map do |e|
disabled_message = nil
if options[:shipping_and_payment_methods] && (e.shipping_methods.empty? || e.payment_methods.available.empty?)
@@ -94,7 +94,7 @@ module OrderCyclesHelper
end
if disabled_message
["#{e.name} (#{disabled_message})", e.id, {disabled: true}]
["#{e.name} (#{disabled_message})", e.id, { disabled: true }]
else
[e.name, e.id]
end

View File

@@ -1,6 +1,6 @@
module SerializerHelper
def ids_to_objs(ids)
return [] if ids.blank?
ids.map { |id| {id: id} }
ids.map { |id| { id: id } }
end
end

View File

@@ -10,14 +10,13 @@ module Spree
end
alias_method_chain :preference_field_tag, :files
# Add support for options[:html], allowing additional HTML attributes
def link_to_remove_fields(name, f, options = {})
name = '' if options[:no_text]
options[:class] = '' unless options[:class]
options[:class] += 'no-text with-tip' if options[:no_text]
html_options = {class: "remove_fields #{options[:class]}", data: {action: 'remove'}, title: t(:remove)}
html_options = { class: "remove_fields #{options[:class]}", data: { action: 'remove' }, title: t(:remove) }
html_options.merge!(options[:html]) if options.key? :html
link_to_with_icon('icon-trash', name, '#', html_options) + f.hidden_field(:_destroy)

View File

@@ -5,9 +5,7 @@ module Spree
def klass_for(name)
model_name = name.to_s
["Spree::#{model_name.classify}", model_name.classify, model_name.gsub('_', '/').classify].find do |t|
t.safe_constantize
end.try(:safe_constantize)
["Spree::#{model_name.classify}", model_name.classify, model_name.tr('_', '/').classify].find(&:safe_constantize).try(:safe_constantize)
end
# Make it so that the Reports admin tab can be enabled/disabled through the cancan
@@ -27,11 +25,11 @@ module Spree
# TEMP: override method until it is fixed in Spree.
def tab_with_cancan_check(*args)
options = {:label => args.first.to_s}
options = { label: args.first.to_s }
if args.last.is_a?(Hash)
options = options.merge(args.last)
end
return '' if klass = klass_for(options[:label]) and cannot?(:admin, klass)
return '' if (klass = klass_for(options[:label])) && cannot?(:admin, klass)
tab_without_cancan_check(*args)
end
alias_method_chain :tab, :cancan_check

View File

@@ -18,9 +18,9 @@ module Spree
end
end
if @order.ready_to_ship?
links << { name: t(:ship_order), url: fire_admin_order_path(@order, :e => 'ship'), method: 'put', icon: 'icon-truck', confirm: t(:are_you_sure) }
links << { name: t(:ship_order), url: fire_admin_order_path(@order, e: 'ship'), method: 'put', icon: 'icon-truck', confirm: t(:are_you_sure) }
end
links << { name: t(:cancel_order), url: fire_admin_order_path(@order.number, { :e => 'cancel' }), icon: 'icon-trash', confirm: t(:are_you_sure) } if order.can_cancel?
links << { name: t(:cancel_order), url: fire_admin_order_path(@order.number, e: 'cancel'), icon: 'icon-trash', confirm: t(:are_you_sure) } if order.can_cancel?
links
end
end

View File

@@ -2,7 +2,7 @@ module Spree
module BaseHelper
# human readable list of variant options
# Override: Do not show out of stock text
def variant_options(v, options={})
def variant_options(v, _options = {})
v.options_text
end
end

View File

@@ -22,7 +22,8 @@ module Spree
state: 'complete',
user_id: spree_current_user.id,
distributor_id: current_distributor.id,
order_cycle_id: current_order_cycle.id)
order_cycle_id: current_order_cycle.id
)
end
def changeable_orders_link_path

View File

@@ -3,7 +3,7 @@ module Spree
# Return the price of the variant, overriding sprees price diff capability.
# This will allways return the variant price as if the show_variant_full_price is set.
def variant_price_diff(variant)
"(#{Spree::Money.new(variant.price).to_s})"
"(#{Spree::Money.new(variant.price)})"
end
def product_has_variant_unit_option_type?(product)

View File

@@ -6,7 +6,7 @@ module Spree
order_cycles.map do |oc|
orders_open_at = oc.orders_open_at.andand.to_s(:short) || 'NA'
orders_close_at = oc.orders_close_at.andand.to_s(:short) || 'NA'
[ "#{oc.name} &nbsp; (#{orders_open_at} - #{orders_close_at})".html_safe, oc.id ]
["#{oc.name} &nbsp; (#{orders_open_at} - #{orders_close_at})".html_safe, oc.id]
end
end

View File

@@ -3,11 +3,17 @@ require 'open_food_network/products_cache_integrity_checker'
ProductsCacheIntegrityCheckerJob = Struct.new(:distributor_id, :order_cycle_id) do
def perform
unless checker.ok?
Bugsnag.notify RuntimeError.new("Products JSON differs from cached version for distributor: #{distributor_id}, order cycle: #{order_cycle_id}"), diff: checker.diff.to_s(:text)
exception = RuntimeError.new(
"Products JSON differs from cached version for distributor: #{distributor_id}, " \
"order cycle: #{order_cycle_id}"
)
Bugsnag.notify(exception) do |report|
report.add_tab(:products_cache, diff: checker.diff.to_s(:text))
end
end
end
private
def checker

View File

@@ -9,9 +9,9 @@ class EnterpriseMailer < Spree::BaseMailer
subject = t('enterprise_mailer.welcome.subject',
enterprise: @enterprise.name,
sitename: Spree::Config[:site_name])
mail(:to => enterprise.contact.email,
:from => from_address,
:subject => subject)
mail(to: enterprise.contact.email,
from: from_address,
subject: subject)
end
end

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