diff --git a/Gemfile b/Gemfile index e0a7ef2a..b39138c8 100644 --- a/Gemfile +++ b/Gemfile @@ -22,7 +22,7 @@ gem 'rails-i18n' gem 'mysql2', '~> 0.4.0' # for compatibility with rails 4 gem 'prawn' 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 'kaminari' gem 'simple_form' diff --git a/Gemfile.lock b/Gemfile.lock index 4819cfb1..c425e4bb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -200,7 +200,8 @@ GEM rails (>= 4.0.0) globalid (0.4.2) activesupport (>= 4.2.0) - haml (4.0.7) + haml (5.1.2) + temple (>= 0.8.0) tilt haml-rails (1.0.0) actionpack (>= 4.0.1) @@ -464,6 +465,7 @@ GEM sqlite3 (1.3.13) sqlite3-ruby (1.3.3) sqlite3 (>= 1.3.3) + temple (0.8.2) term-ansicolor (1.2.2) tins (~> 0.8) therubyracer (0.12.3) @@ -546,7 +548,7 @@ DEPENDENCIES foodsoft_polls! foodsoft_wiki! gaffe - haml (~> 4.0) + haml haml-rails hashie (~> 3.4.6) i18n-js (~> 3.0.0.rc8) diff --git a/app/views/deliveries/_stock_change_fields.html.haml b/app/views/deliveries/_stock_change_fields.html.haml index 6ff19ac9..40ec5922 100644 --- a/app/views/deliveries/_stock_change_fields.html.haml +++ b/app/views/deliveries/_stock_change_fields.html.haml @@ -4,7 +4,7 @@ %td %span.stock_article_name= stock_change.stock_article.name = 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= f.input :quantity, :wrapper => :intable, :input_html => {:class => 'stock-change-quantity', :autocomplete => :off} %td= stock_change_remove_link f diff --git a/app/views/home/reference_calculator.haml b/app/views/home/reference_calculator.haml index 0eea1ec1..1e981818 100644 --- a/app/views/home/reference_calculator.haml +++ b/app/views/home/reference_calculator.haml @@ -33,7 +33,7 @@ if (item) { ele.show(); 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 { ele.hide(); } diff --git a/app/views/stock_takings/_stock_change.html.haml b/app/views/stock_takings/_stock_change.html.haml index 5d3ca9bc..c82bd232 100644 --- a/app/views/stock_takings/_stock_change.html.haml +++ b/app/views/stock_takings/_stock_change.html.haml @@ -4,6 +4,6 @@ = StockArticle.human_attribute_name :amount (#{stock_change.stock_article.quantity_available}) = 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 = "(#{number_to_currency(stock_change.stock_article.price)} / #{stock_change.stock_article.unit})"