complete show order i18n
Conflicts: app/helpers/orders_helper.rb
This commit is contained in:
parent
42d622d1b2
commit
5b6d1a66a6
3 changed files with 56 additions and 29 deletions
|
|
@ -1,37 +1,20 @@
|
|||
- title t('.title', name: @order.name)
|
||||
|
||||
- content_for :javascript do
|
||||
:javascript
|
||||
function activate_search(view, placeholder) {
|
||||
new List(document.body, {
|
||||
valueNames: ['name'],
|
||||
engine: 'unlist',
|
||||
plugins: [
|
||||
['reset', {highlightClass: 'btn-primary'}],
|
||||
['delay', {delayedSearchTime: 500}],
|
||||
],
|
||||
// make large pages work too (as we don't have paging)
|
||||
page: 10000,
|
||||
indexAsync: true
|
||||
});
|
||||
$('#query').attr('placeholder', placeholder);
|
||||
}
|
||||
$(function() {
|
||||
activate_search('default', '#{j t('.search_placeholder.default')}');
|
||||
});
|
||||
|
||||
.well
|
||||
%button{type: "button", class: "close", data: {dismiss: 'alert'}}= t('ui.marks.close').html_safe
|
||||
%p
|
||||
#{@order.state.capitalize} order from
|
||||
#{link_to @order.supplier.name, supplier_path(@order.supplier)}
|
||||
created by #{show_user_link @order.created_by},
|
||||
open from #{format_time @order.starts} until #{format_time @order.ends}.
|
||||
= raw t '.description1',
|
||||
state: t("orders.state.#{@order.state}").capitalize,
|
||||
supplier: supplier_link(@order),
|
||||
who: show_user_link(@order.created_by),
|
||||
starts: format_time(@order.starts),
|
||||
ends: format_time(@order.ends)
|
||||
%br
|
||||
%abbr{title: @order.group_orders.includes(:ordergroup).all.map {|g| g.ordergroup.name}.join(', ')}
|
||||
#{@order.group_orders.count} #{Ordergroup.model_name.human count: @order.group_orders.count}
|
||||
ordered #{@order.order_articles.ordered.count} articles with a total value of
|
||||
#{number_to_currency(@order.sum(:net))} / #{number_to_currency(@order.sum(:gross))} (net / gross).
|
||||
= raw t '.description2',
|
||||
ordergroups: ordergroup_count(@order),
|
||||
article_count: @order.order_articles.ordered.count,
|
||||
net_sum: number_to_currency(@order.sum(:net)),
|
||||
gross_sum: number_to_currency(@order.sum(:gross))
|
||||
|
||||
- if @note.present?
|
||||
%p
|
||||
|
|
@ -98,3 +81,24 @@
|
|||
= render partial: 'shared/comments', locals: { comments: @order.comments }
|
||||
#new_comment= render partial: 'order_comments/form', locals: { order_comment: @order.comments.build(user: current_user)}
|
||||
= link_to_top
|
||||
|
||||
|
||||
- content_for :javascript do
|
||||
:javascript
|
||||
function activate_search(view, placeholder) {
|
||||
new List(document.body, {
|
||||
valueNames: ['name'],
|
||||
engine: 'unlist',
|
||||
plugins: [
|
||||
['reset', {highlightClass: 'btn-primary'}],
|
||||
['delay', {delayedSearchTime: 500}],
|
||||
],
|
||||
// make large pages work too (as we don't have paging)
|
||||
page: 10000,
|
||||
indexAsync: true
|
||||
});
|
||||
$('#query').attr('placeholder', placeholder);
|
||||
}
|
||||
$(function() {
|
||||
activate_search('default', '#{j t('.search_placeholder.default')}');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue