migrate to Rails 4.0 (closes foodcoops#214)

Conflicts:
	Gemfile.lock
This commit is contained in:
wvengen 2014-02-20 15:04:53 +01:00
parent 12d1221bfc
commit 7841245795
97 changed files with 659 additions and 557 deletions

View file

@ -14,4 +14,4 @@
%td= link_to t('ui.edit'), edit_supplier_article_path(@supplier, article),
:remote => true, class: 'btn btn-mini'
%td= link_to t('ui.delete'), [@supplier, article],
:method => :delete, :confirm => t('.confirm_delete'), :remote => true, class: 'btn btn-mini btn-danger'
:method => :delete, :data => {:confirm => t('.confirm_delete')}, :remote => true, class: 'btn btn-mini btn-danger'

View file

@ -28,7 +28,7 @@
= check_box_tag :checkall, 1, false, 'data-check-all' => '#articlesInListForm', 'data-ignore-onchange' => true
%select{:name => "selected_action", 'data-submit-onchange' => true}
%option{:value => '', :selected => 'selected'}= t '.option_select'
%option{:value => "destroy", 'data-confirm' => t('.confirm_delete')}= t '.option_delete'
%option{:value => "destroy", :data => {:confirm => t('.confirm_delete')}}= t '.option_delete'
%option{:value => "setNotAvailable"}= t '.option_not_available'
%option{:value => "setAvailable"}= t '.option_available'
= hidden_field_tag 'supplier_id', @supplier.id

View file

@ -1,7 +1,7 @@
- if @articles.empty?
%p= t '.not_found'
- else
= pagination_links_remote @articles, :params => {:search => search_params}
= pagination_links_remote @articles, :params => {:q => search_params}
%table.table.table-striped
%thead
%tr
@ -16,7 +16,7 @@
%tbody
- for article in @articles
%tr
%td= highlight article.name, params[:search][:name_contains_all]
%td= highlight article.name, params[:q][:name_cont_all]
%td= article.origin
%td= article.manufacturer
%td= article.note

View file

@ -28,7 +28,7 @@
= t '.change_supplier'
%span.caret
%ul.dropdown-menu
- Supplier.undeleted.where('id != ?', @supplier.id).order('suppliers.name ASC').each do |supplier|
- Supplier.undeleted.where.not(id: @supplier.id).order('suppliers.name ASC').each do |supplier|
%li= link_to supplier.name, supplier_articles_path(supplier), tabindex: -1
- unless @supplier.shared_supplier.nil?
@ -36,10 +36,10 @@
= form_tag shared_supplier_articles_path(@supplier), method: :get, remote: true, class: 'form-search',
'data-submit-onchange' => true do
%h3= t '.import.title'
= text_field_tag "search[name_contains_all]", "", class: 'input-medium search-query',
= text_field_tag "q[name_cont_all]", "", class: 'input-medium search-query',
placeholder: t('.import.placeholder')
%label.checkbox
= check_box_tag "search[origin_equals]", "REG", false
= check_box_tag "q[origin_eq]", "REG", false
= t '.import.restrict_region'
#search_results.clearfix
= link_to t('ui.close'), "#import", 'data-toggle-this' => '#import'