This commit is contained in:
Martin Lensment 2015-04-16 18:15:44 +03:00
parent c74ed91377
commit 84ce3371ae
3 changed files with 2 additions and 29 deletions

View file

@ -1,6 +1,6 @@
- content_for :actions do - content_for :actions do
= link_to(t('back'), :back, class: 'btn btn-default') = link_to(t('back'), :back, class: 'btn btn-default')
= render 'admin/shared/title', name: "#{t('bank_transaction')}" = render 'shared/title', name: t(:bank_transaction)
= form_for([:admin, @bank_transaction], html: { class: 'form-horizontal' }) do |f| = form_for([:admin, @bank_transaction], html: { class: 'form-horizontal' }) do |f|
= render 'shared/full_errors', object: @bank_transaction = render 'shared/full_errors', object: @bank_transaction

View file

@ -1,27 +0,0 @@
- content_for :actions do
= link_to(t('back_to_bank_transaction'), [:admin, @bank_transaction], class: 'btn btn-default')
= render 'admin/shared/title', name: "#{t('manual_binding')}"
= form_for([:admin, @bank_transaction], url: {action: :bind}, html: { class: 'form-horizontal' }) do |f|
= render 'shared/full_errors', object: @bank_transaction
.row
.col-md-8
.form-group
= f.label :status, class: 'col-md-2 control-label'
- c = @bank_transaction.binded? ? 'text-success' : 'text-danger'
.col-md-10.form-control-static{class: c}
= @bank_transaction.binded? ? t('binded') : t('not_binded')
.form-group
= f.label :sum, class: 'col-md-2 control-label'
.col-md-10.form-control-static
= "#{@bank_transaction.sum} #{@bank_transaction.currency}"
.form-group
= label_tag :invoice_id, t('invoice'), class: 'col-md-2 control-label'
.col-md-10
= text_field_tag(:invoice_id, params[:invoice_id], class: 'form-control')
%hr
.row
.col-md-8.text-right
= button_tag(t('save'), class: 'btn btn-primary')

View file

@ -1,7 +1,7 @@
- content_for :actions do - content_for :actions do
= link_to(t('edit'), edit_admin_bank_transaction_path(@bank_transaction), class: 'btn btn-primary') = link_to(t('edit'), edit_admin_bank_transaction_path(@bank_transaction), class: 'btn btn-primary')
= link_to(t('back_to_bank_statement'), admin_bank_statement_path(@bank_transaction.bank_statement), class: 'btn btn-default') = link_to(t('back_to_bank_statement'), admin_bank_statement_path(@bank_transaction.bank_statement), class: 'btn btn-default')
= render 'admin/shared/title', name: "#{t('bank_transaction')}" = render 'shared/title', name: t(:bank_transaction)
= render 'shared/full_errors', object: @bank_transaction = render 'shared/full_errors', object: @bank_transaction
%row %row
.col-md-12 .col-md-12