From 58df186a2ad740337cb405caa9d603fe5212aff1 Mon Sep 17 00:00:00 2001 From: wvengen Date: Mon, 20 Jul 2015 22:33:28 +0200 Subject: [PATCH] Make sharedlists optional (and disabled by default) --- app/views/suppliers/index.html.haml | 3 ++- config/app_config.yml.SAMPLE | 21 ++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/views/suppliers/index.html.haml b/app/views/suppliers/index.html.haml index d2d3d346..9e4c3870 100644 --- a/app/views/suppliers/index.html.haml +++ b/app/views/suppliers/index.html.haml @@ -2,7 +2,8 @@ - content_for :actionbar do = link_to t('.action_new'), new_supplier_path, class: 'btn btn-primary' - = link_to t('.action_import'), shared_suppliers_suppliers_path, class: 'btn' + - if FoodsoftConfig[:shared_lists] + = link_to t('.action_import'), shared_suppliers_suppliers_path, class: 'btn' %table.table.table-striped %thead %tr diff --git a/config/app_config.yml.SAMPLE b/config/app_config.yml.SAMPLE index ed7675ac..b9f3b337 100644 --- a/config/app_config.yml.SAMPLE +++ b/config/app_config.yml.SAMPLE @@ -132,15 +132,18 @@ default: &defaults #host: localhost #port: 3000 - # Access to sharedLists, the external article-database - shared_lists: - adapter: mysql2 - host: localhost - database: sharedlists_development - username: root - password: - encoding: utf8 - socket: /opt/lampp/var/mysql/mysql.sock + # Access to sharedlists, the external article-database. + # This allows a foodcoop to subscribe to a selection of a supplier's full assortment, + # and makes it possible to share data with several foodcoops. Using this requires installing + # an additional application with a separate database. + #shared_lists: + # adapter: mysql2 + # host: localhost + # database: sharedlists_development + # username: root + # password: + # encoding: utf8 + # socket: /opt/lampp/var/mysql/mysql.sock development: <<: *defaults