Add option to send mails when an order has been received
This commit is contained in:
parent
d45256145d
commit
9a7d4bf07d
9 changed files with 89 additions and 2 deletions
13
app/views/mailer/order_received.text.haml
Normal file
13
app/views/mailer/order_received.text.haml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
= raw t '.text0', ordergroup: @group_order.ordergroup_name, order: @order.name
|
||||
|
||||
- unless @abundant_articles.empty?
|
||||
= raw "===\n" + t('.abundant_articles') + ":"
|
||||
- @abundant_articles.each do |order_article|
|
||||
- article = order_article.article
|
||||
= raw t('.article_details', name: article.name, ordered: order_article.units_to_order, received: order_article.units_received, unit: article.unit)
|
||||
|
||||
- unless @scarce_articles.empty?
|
||||
= raw "===\n" + t('.scarce_articles') + ":"
|
||||
- @scarce_articles.each do |order_article|
|
||||
- article = order_article.article
|
||||
= raw t('.article_details', name: article.name, ordered: order_article.units_to_order, received: order_article.units_received, unit: article.unit)
|
||||
|
|
@ -35,14 +35,15 @@
|
|||
= profile.input 'email_is_public', as: :boolean, label: false, input_html: { checked: f.object.settings.profile['email_is_public'] }
|
||||
- if FoodsoftConfig[:use_nick]
|
||||
= profile.input 'name_is_public', as: :boolean, label: false, input_html: { checked: f.object.settings.profile['name_is_public'] }
|
||||
|
||||
|
||||
.settings-group
|
||||
%div{class: 'control-group'}
|
||||
%h5{class: 'controls'}
|
||||
= t 'simple_form.labels.settings.settings_group.messages'
|
||||
|
||||
|
||||
= s.simple_fields_for :notify, defaults: { inline_label: true, label: false } do |notify|
|
||||
= notify.input 'order_finished', as: :boolean, input_html: { checked: f.object.settings.notify['order_finished'] }
|
||||
= notify.input 'order_received', as: :boolean, input_html: { checked: f.object.settings.notify['order_received'] }
|
||||
= notify.input 'negative_balance', as: :boolean, input_html: { checked: f.object.settings.notify['negative_balance'] }
|
||||
= notify.input 'upcoming_tasks', as: :boolean, input_html: { checked: f.object.settings.notify['upcoming_tasks'] }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue