small invoice i18n cleanup/refactoring

This commit is contained in:
wvengen 2013-06-21 14:24:05 +02:00
parent c5c4b1f93f
commit cab6ada8b8
5 changed files with 19 additions and 22 deletions

View file

@ -3,9 +3,9 @@
= f.hidden_field :order_id
- if @invoice.delivery
%p= t('.linked', what_link: link_to(t('.delivery'), [@invoice.supplier,@invoice.delivery])).html_safe
%p= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_delivery'), [@invoice.supplier,@invoice.delivery])).html_safe
- if @invoice.order
%p= t('.linked', what_link: link_to(t('.order'), @invoice.order)).html_safe
%p= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_order'), @invoice.order)).html_safe
= f.association :supplier, hint: false
= f.input :number

View file

@ -1,12 +1,18 @@
- title t('.title', number: @invoice.number)
%p
%b= t 'simple_form.labels.invoice.supplier'
%b= t('simple_form.labels.invoice.supplier') + ':'
= @invoice.supplier.name
- if @invoice.delivery
%p
%b= t('simple_form.labels.invoice.delivery') + ':'
= t('.linked', what_link: link_to(t('.delivery'), [@invoice.supplier,@invoice.delivery])).html_safe
= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_delivery'), [@invoice.supplier,@invoice.delivery])).html_safe
- if @invoice.order
%p
%b= t('simple_form.labels.invoice.order') + ':'
= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_order'), @invoice.order)).html_safe
%p
%b= t('simple_form.labels.invoice.number') + ':'
= @invoice.number