Update HAML

This commit is contained in:
Patrick Gansterer 2020-08-12 02:44:19 +02:00
parent 5f60844a13
commit 271af8f59f
5 changed files with 8 additions and 6 deletions

View file

@ -22,7 +22,7 @@ gem 'rails-i18n'
gem 'mysql2', '~> 0.4.0' # for compatibility with rails 4 gem 'mysql2', '~> 0.4.0' # for compatibility with rails 4
gem 'prawn' gem 'prawn'
gem 'prawn-table' gem 'prawn-table'
gem 'haml', '~> 4.0' # some breaking changes in version 5, remove this line again when fixed gem 'haml'
gem 'haml-rails' gem 'haml-rails'
gem 'kaminari' gem 'kaminari'
gem 'simple_form' gem 'simple_form'

View file

@ -200,7 +200,8 @@ GEM
rails (>= 4.0.0) rails (>= 4.0.0)
globalid (0.4.2) globalid (0.4.2)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
haml (4.0.7) haml (5.1.2)
temple (>= 0.8.0)
tilt tilt
haml-rails (1.0.0) haml-rails (1.0.0)
actionpack (>= 4.0.1) actionpack (>= 4.0.1)
@ -464,6 +465,7 @@ GEM
sqlite3 (1.3.13) sqlite3 (1.3.13)
sqlite3-ruby (1.3.3) sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3) sqlite3 (>= 1.3.3)
temple (0.8.2)
term-ansicolor (1.2.2) term-ansicolor (1.2.2)
tins (~> 0.8) tins (~> 0.8)
therubyracer (0.12.3) therubyracer (0.12.3)
@ -546,7 +548,7 @@ DEPENDENCIES
foodsoft_polls! foodsoft_polls!
foodsoft_wiki! foodsoft_wiki!
gaffe gaffe
haml (~> 4.0) haml
haml-rails haml-rails
hashie (~> 3.4.6) hashie (~> 3.4.6)
i18n-js (~> 3.0.0.rc8) i18n-js (~> 3.0.0.rc8)

View file

@ -4,7 +4,7 @@
%td %td
%span.stock_article_name= stock_change.stock_article.name %span.stock_article_name= stock_change.stock_article.name
= f.association :stock_article, :as => :hidden = f.association :stock_article, :as => :hidden
%td.price{:data => {:toggle => :tooltip, :title => render(:partial => 'shared/article_price_info', :locals => {:article => stock_article})}}= number_to_currency stock_article.price %td.price{:data => {:toggle => :tooltip, :title => "#{render(:partial => 'shared/article_price_info', :locals => {:article => stock_article})}"}}= number_to_currency stock_article.price
%td.unit= stock_change.stock_article.unit %td.unit= stock_change.stock_article.unit
%td= f.input :quantity, :wrapper => :intable, :input_html => {:class => 'stock-change-quantity', :autocomplete => :off} %td= f.input :quantity, :wrapper => :intable, :input_html => {:class => 'stock-change-quantity', :autocomplete => :off}
%td= stock_change_remove_link f %td= stock_change_remove_link f

View file

@ -33,7 +33,7 @@
if (item) { if (item) {
ele.show(); ele.show();
ele.find('.amount').text(item.amount); ele.find('.amount').text(item.amount);
ele.find('.reference').text((#{BankTransactionReference.js_code_for_user(@current_user)})(item.values)); ele.find('.reference').text((#{raw BankTransactionReference.js_code_for_user(@current_user)})(item.values));
} else { } else {
ele.hide(); ele.hide();
} }

View file

@ -4,6 +4,6 @@
= StockArticle.human_attribute_name :amount = StockArticle.human_attribute_name :amount
(#{stock_change.stock_article.quantity_available}) (#{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})}} %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})"