make settle directly less dangerous

(closes foodcoops#275)
This commit is contained in:
wvengen 2014-03-21 10:51:22 +01:00
parent ea8e4ee560
commit 852f3484ad
5 changed files with 18 additions and 12 deletions

View file

@ -21,11 +21,9 @@
- unless order.closed?
- if current_user.role_orders?
- unless order.stockit?
= link_to t('orders.index.action_receive'), receive_order_path(order), class: 'btn btn-mini'
= link_to t('orders.index.action_receive'), receive_order_path(order), class: 'btn btn-small'
- else
= link_to t('orders.index.action_receive'), '#', class: 'btn btn-mini disabled'
= link_to t('.clear'), new_finance_order_path(order_id: order.id), class: 'btn btn-mini btn-primary'
= link_to t('.close'), close_direct_finance_order_path(order),
:data => {:confirm => t('.confirm')}, :method => :patch, class: 'btn btn-mini'
= link_to t('orders.index.action_receive'), '#', class: 'btn btn-small disabled'
= link_to t('.clear'), new_finance_order_path(order_id: order.id), class: 'btn btn-small btn-primary'
- else
%i= t('.no_closed_orders')

View file

@ -48,12 +48,18 @@
#comments= render :partial => 'shared/comments', locals: {comments: @order.comments.includes(:user)}
- content_for :actionbar do
- unless @order.invoice or @order.stockit?
= link_to t('.create_invoice'), new_finance_invoice_path(:order_id => @order, :supplier_id => @order.supplier),
class: 'btn'
.btn-group
- unless @order.invoice or @order.stockit?
= link_to t('.create_invoice'), new_finance_invoice_path(:order_id => @order, :supplier_id => @order.supplier),
class: 'btn'
- unless @order.closed?
= link_to t('.confirm_order'), confirm_finance_order_path(@order), class: 'btn btn-primary'
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do
%span.caret
%ul.dropdown-menu
%li= link_to t('.confirm_order'), confirm_finance_order_path(@order)
%li= link_to t('.close_direct'), close_direct_finance_order_path(@order), method: :patch,
data: {confirm: t('.close_direct_confirm')}
#editOrderNav.btn-group.pull-right
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do