Add article price tooltip to StockTaking form
This commit is contained in:
parent
3f822dc396
commit
a3e82f5304
2 changed files with 17 additions and 2 deletions
|
@ -3,5 +3,6 @@
|
||||||
= form.hidden_field :stock_article_id
|
= form.hidden_field :stock_article_id
|
||||||
= "Menge (#{stock_change.stock_article.quantity_available})"
|
= "Menge (#{stock_change.stock_article.quantity_available})"
|
||||||
= form.text_field :quantity, :size => 5, :autocomplete => 'off'
|
= form.text_field :quantity, :size => 5, :autocomplete => 'off'
|
||||||
|
%span{:data => {:toggle => :tooltip, :title => render(:partial => 'shared/article_price_info', :locals => {:article => stock_change.stock_article})}}
|
||||||
%b= stock_change.stock_article.name
|
%b= stock_change.stock_article.name
|
||||||
= "(#{number_to_currency(stock_change.stock_article.price)} / #{stock_change.stock_article.unit})"
|
= "(#{number_to_currency(stock_change.stock_article.price)} / #{stock_change.stock_article.unit})"
|
||||||
|
|
|
@ -1,5 +1,19 @@
|
||||||
- title t('.title')
|
- title t('.title')
|
||||||
|
|
||||||
|
- content_for :javascript do
|
||||||
|
:javascript
|
||||||
|
$(function() {
|
||||||
|
enablePriceTooltips();
|
||||||
|
});
|
||||||
|
|
||||||
|
function enablePriceTooltips(context) {
|
||||||
|
$('[data-toggle~="tooltip"]', context).tooltip({
|
||||||
|
animation: false,
|
||||||
|
html: true,
|
||||||
|
placement: 'left'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
- content_for :sidebar do
|
- content_for :sidebar do
|
||||||
%p
|
%p
|
||||||
%i= t('.text_deviations', inv_link: link_to(t('.temp_inventory'), stock_articles_path)).html_safe
|
%i= t('.text_deviations', inv_link: link_to(t('.temp_inventory'), stock_articles_path)).html_safe
|
||||||
|
|
Loading…
Reference in a new issue