diff --git a/Gemfile b/Gemfile index 345b730a..7f7225f7 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "http://rubygems.org" gem "rails", '3.0.12' -gem 'mysql' +gem 'mysql2' gem "fastercsv" gem "prawn", '<=0.6.3' gem 'haml' diff --git a/Gemfile.lock b/Gemfile.lock index 4f0f2bcb..d3af0f01 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -45,7 +45,7 @@ GEM exception_notification (2.4.0) expression_parser (0.9.0) fastercsv (1.5.4) - haml (3.1.1) + haml (3.1.4) has_scope (0.5.0) hirb (0.3.4) i18n (0.5.0) @@ -71,7 +71,7 @@ GEM activesupport (~> 3.0.0) arel (~> 2.0.7) mime-types (1.18) - mysql (2.8.1) + mysql2 (0.2.6) polyglot (0.3.3) prawn (0.6.3) prawn-core (>= 0.6.3, < 0.7) @@ -136,7 +136,7 @@ DEPENDENCIES localize_input! meta_search meta_where - mysql + mysql2 prawn (<= 0.6.3) rails (= 3.0.12) rails3_acts_as_paranoid (= 0.0.9) diff --git a/app/controllers/admin/workgroups_controller.rb b/app/controllers/admin/workgroups_controller.rb index 3e2256b7..484eb1fa 100644 --- a/app/controllers/admin/workgroups_controller.rb +++ b/app/controllers/admin/workgroups_controller.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 class Admin::WorkgroupsController < Admin::BaseController inherit_resources diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index bdf8ac71..43bbec76 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 class ArticlesController < ApplicationController before_filter :authenticate_article_meta, :find_supplier diff --git a/app/controllers/deliveries_controller.rb b/app/controllers/deliveries_controller.rb index 3c70e001..48890ebd 100644 --- a/app/controllers/deliveries_controller.rb +++ b/app/controllers/deliveries_controller.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 class DeliveriesController < ApplicationController before_filter :find_supplier, :exclude => :fill_new_stock_article_form diff --git a/app/controllers/finance/balancing_controller.rb b/app/controllers/finance/balancing_controller.rb index b66ed869..4d9e72c2 100644 --- a/app/controllers/finance/balancing_controller.rb +++ b/app/controllers/finance/balancing_controller.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 class Finance::BalancingController < ApplicationController before_filter :authenticate_finance verify :method => :post, :only => [:close, :close_direct] diff --git a/app/controllers/orders_controller.rb b/app/controllers/orders_controller.rb index 5d2e52be..aeeb3f8f 100644 --- a/app/controllers/orders_controller.rb +++ b/app/controllers/orders_controller.rb @@ -1,3 +1,5 @@ +# encoding: utf-8 +# # Controller for managing orders, i.e. all actions that require the "orders" role. # Normal ordering actions of members of order groups is handled by the OrderingController. class OrdersController < ApplicationController diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index a1ccbcc8..5ff62e88 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 class PagesController < ApplicationController def index diff --git a/app/controllers/suppliers_controller.rb b/app/controllers/suppliers_controller.rb index 7c74c14f..5851c714 100644 --- a/app/controllers/suppliers_controller.rb +++ b/app/controllers/suppliers_controller.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 class SuppliersController < ApplicationController before_filter :authenticate_suppliers, :except => [:index, :list] helper :deliveries diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 2bf056c0..101bb203 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 class TasksController < ApplicationController #auto_complete_for :user, :nick diff --git a/app/models/article.rb b/app/models/article.rb index 43ad5ac0..3a21b1a1 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -1,29 +1,4 @@ -# == Schema Information -# -# Table name: articles -# -# id :integer not null, primary key -# name :string(255) default(""), not null -# supplier_id :integer default(0), not null -# article_category_id :integer default(0), not null -# unit :string(255) default(""), not null -# note :string(255) -# availability :boolean default(TRUE), not null -# manufacturer :string(255) -# origin :string(255) -# shared_updated_on :datetime -# price :decimal(, ) -# tax :float -# deposit :decimal(, ) default(0.0) -# unit_quantity :integer default(1), not null -# order_number :string(255) -# created_at :datetime -# updated_at :datetime -# quantity :integer default(0) -# deleted_at :datetime -# type :string(255) -# - +# encoding: utf-8 class Article < ActiveRecord::Base acts_as_paranoid # Avoid deleting the article for consistency of order-results extend ActiveSupport::Memoizable # Ability to cache method results. Use memoize :expensive_method diff --git a/app/models/order.rb b/app/models/order.rb index 93b61bee..4cea94b0 100644 --- a/app/models/order.rb +++ b/app/models/order.rb @@ -1,3 +1,5 @@ +# encoding: utf-8 +# class Order < ActiveRecord::Base extend ActiveSupport::Memoizable # Ability to cache method results. Use memoize :expensive_method acts_as_ordered :order => "ends" # easyier find of next or previous model diff --git a/app/models/ordergroup.rb b/app/models/ordergroup.rb index f40387b5..cb296eda 100644 --- a/app/models/ordergroup.rb +++ b/app/models/ordergroup.rb @@ -1,3 +1,5 @@ +# encoding: utf-8 +# # Ordergroups can order, they are "children" of the class Group # # Ordergroup have the following attributes, in addition to Group diff --git a/app/models/stock_article.rb b/app/models/stock_article.rb index eca476fb..97ca9a55 100644 --- a/app/models/stock_article.rb +++ b/app/models/stock_article.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 class StockArticle < Article acts_as_paranoid diff --git a/app/views/articles/_articles.html.haml b/app/views/articles/_articles.html.haml index 2a79e1f3..7b5aa10c 100644 --- a/app/views/articles/_articles.html.haml +++ b/app/views/articles/_articles.html.haml @@ -15,14 +15,14 @@ %thead %tr %th - %th[sort_td_class_helper "name"] + %th[sort_td_class_helper("name")] = sort_link_helper "Name", "name" %th - %th[sort_td_class_helper "category"] + %th[sort_td_class_helper("category")] = sort_link_helper "Kategorie", "category" - %th[sort_td_class_helper "unit"] + %th[sort_td_class_helper("unit")] = sort_link_helper "Einheit", "unit" - %th[sort_td_class_helper "note"] + %th[sort_td_class_helper("note")] = sort_link_helper "Notiz", "note" %th{:style => "width: 4em;"} Gebgr. %th{:style => "width: 5em;"} Preis diff --git a/app/views/finance/balancing/_edit_results_by_articles.html.haml b/app/views/finance/balancing/_edit_results_by_articles.html.haml index c33de047..561fadd3 100644 --- a/app/views/finance/balancing/_edit_results_by_articles.html.haml +++ b/app/views/finance/balancing/_edit_results_by_articles.html.haml @@ -6,7 +6,7 @@ %table{:class => "ordered_articles", :style => "clear:both"} %thead %tr - %th[sort_td_class_helper "name"]{:colspan => "1"} + %th[sort_td_class_helper("name")]{:colspan => "1"} = sort_link_helper "Artikel", "name", :action => "new", :remote => false %th[sort_td_class_helper "order_number"] = sort_link_helper "Nr.", "order_number", :action => "new", :remote => false diff --git a/app/views/finance/financial_transactions/_transactions.html.haml b/app/views/finance/financial_transactions/_transactions.html.haml index 5b45ea71..4a0fd184 100644 --- a/app/views/finance/financial_transactions/_transactions.html.haml +++ b/app/views/finance/financial_transactions/_transactions.html.haml @@ -10,12 +10,12 @@ %table %thead %tr - + \#{sort_link_helper "Datum", "date"} %td Wer - + \#{sort_link_helper "Notiz", "note"} - + \#{sort_link_helper "Betrag", "amount"} %tbody - @financial_transactions.each do |t| diff --git a/app/views/orders/_orders.html.haml b/app/views/orders/_orders.html.haml index fae435e2..8cd1611a 100644 --- a/app/views/orders/_orders.html.haml +++ b/app/views/orders/_orders.html.haml @@ -2,10 +2,10 @@ %table.list{:style => "width: 100%"} %thead %tr - %th[sort_td_class_helper "supplier"] + %th[sort_td_class_helper("supplier")] = sort_link_helper "Lieferantin", "supplier" %th Start - %th[sort_td_class_helper "ends"] + %th[sort_td_class_helper("ends")] = sort_link_helper "Ende", "ends" %th Status %th{:colspan => "2"}