foodsoft/app/helpers/group_order_articles_helper.rb
wvengen 60826ceedc allow to edit GroupOrderArticle result from orders screen
Conflicts:
	app/assets/javascripts/application.js
2014-02-10 16:03:08 +01:00

14 lines
473 B
Ruby

module GroupOrderArticlesHelper
# return an edit field for a GroupOrderArticle result
def group_order_article_edit_result(goa)
unless goa.group_order.order.finished? and current_user.role_finance?
goa.result
else
simple_form_for goa, remote: true, html: {'data-submit-onchange' => 'changed', class: 'delta-input'} do |f|
f.input_field :result, as: :delta, class: 'input-nano', data: {min: 0}, id: "r_#{goa.id}"
end
end
end
end