From e4c394d88177af746648a6cff7d6b87ed7257a81 Mon Sep 17 00:00:00 2001 From: Benjamin Meichsner Date: Tue, 17 Mar 2009 18:13:00 +0100 Subject: [PATCH] New foodcoop configuration option. Use own mailinglist instead of messaging system. --- app/views/messages/new.haml | 15 +++++++++++++-- config/app_config.yml.SAMPLE | 8 ++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/app/views/messages/new.haml b/app/views/messages/new.haml index 26400a0e..fc15aec9 100644 --- a/app/views/messages/new.haml +++ b/app/views/messages/new.haml @@ -5,8 +5,19 @@ %p %fieldset - = f.check_box :sent_to_all, :onchange => "Element.toggle('recipients')" - gesamte Foodcoop + - if APP_CONFIG[:mailing_list].blank? + = f.check_box :sent_to_all, :onchange => "Element.toggle('recipients')" + gesamte Foodcoop + - else + %b Nachrichten an alle + verschickst Du bitte über den Verteiler: + = mail_to APP_CONFIG[:mailing_list] + %br/ + %small{:style => "color:grey"} + Eventuell musst Du Dich dem Verteiler erst bekannt machen. + %br/ + z.b. mit einer Mail an + = mail_to APP_CONFIG[:mailing_list_subscribe] %table#recipients %tr %td diff --git a/config/app_config.yml.SAMPLE b/config/app_config.yml.SAMPLE index ca5663c5..02941b9b 100644 --- a/config/app_config.yml.SAMPLE +++ b/config/app_config.yml.SAMPLE @@ -21,14 +21,15 @@ development: &defaults price_markup: 2.0 # email address to be used as sender email_sender: foodsoft@myfoodcoop.org - -# Config for the exception_notification plugin + # If your foodcoop uses a mailing list instead of internal messaging system + #mailing_list: list@myfoodcoop.org + #mailing_list_subscribe: list-subscribe@myfoodcoop.org + # Config for the exception_notification plugin notification: error_recipients: - admin@myfoodcoop.org sender_address: "\"FoodSoft Error\" " email_prefix: "[FoodSoft]" - # Access to sharedLists, the external article-database shared_lists: adapter: mysql @@ -38,7 +39,6 @@ development: &defaults password: encoding: utf8 socket: /opt/lampp/var/mysql/mysql.sock - # auto-units-conversion # this is used for automatic article-synchronization to handle different units # e.g. when foodcoop-unit should be 500g and supplier-unit is 1kg