Merge branch 'master' into fresh-flow

Conflicts:
	app/assets/stylesheets/bootstrap_and_overrides.css.less
This commit is contained in:
wvengen 2013-12-18 17:03:26 +01:00
commit 2b511ee559
96 changed files with 1389 additions and 1556 deletions

View File

@ -3,6 +3,7 @@ rvm:
- 1.9.3 - 1.9.3
services: services:
- redis-server - redis-server
env: COVERALLS=1
before_install: before_install:
- "export DISPLAY=:99.0" - "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start" - "sh -e /etc/init.d/xvfb start"

17
CHANGELOG.md Normal file
View File

@ -0,0 +1,17 @@
# Foodsoft 3.2.0
(16 December 2013)
It's been a year since the previous release. Much has changed. Big changes have been:
* Translations to English, Dutch and French.
* Improved usability of delivery creation.
* The possibility to extend foodsoft with plugins (the wiki is now optional).
* Article search in the ordering screen.
* Foodcoops can choose to use full names and emails instead of nicknames.
* Foodcoops that don't use prepaid can set their minimum ordergroup balance below zero.
* Group and article PDFs now show articles ordered but not received in grey.
* Upgrade to Rails 3.
When you upgrade, be sure to review `config/app_config.yml.SAMPLE`. When you're running multiple foodcoops from a single installation, check your rake invocations as the syntax is now: `rake multicoops:run TASK=db:migrate`.
# Foodsoft 3.1.1
(20 July 2012)

10
Gemfile
View File

@ -65,15 +65,15 @@ group :development do
gem 'quiet_assets' gem 'quiet_assets'
# Deploy with Capistrano # Deploy with Capistrano
gem 'capistrano', '2.13.5' gem 'capistrano', '2.13.5', require: false
gem 'capistrano-ext' gem 'capistrano-ext', require: false
#gem 'common_deploy', require: false, path: '../../common_deploy' # pending foodcoops/foodsoft#34, git: 'git://github.com/fsmanuel/common_deploy.git' #gem 'common_deploy', require: false, path: '../../common_deploy' # pending foodcoops/foodsoft#34, git: 'git://github.com/fsmanuel/common_deploy.git'
# Avoid having content-length warnings # Avoid having content-length warnings
gem 'thin' gem 'thin'
end end
group :development, :test do group :development, :test do
gem 'ruby-prof' gem 'ruby-prof', require: false
end end
group :test do group :test do
@ -84,10 +84,12 @@ group :test do
# webkit and poltergeist don't seem to work yet # webkit and poltergeist don't seem to work yet
gem 'selenium-webdriver' gem 'selenium-webdriver'
gem 'database_cleaner' gem 'database_cleaner'
gem 'simplecov', require: false
# need to include rspec components before i18n-spec or rake fails in test environment # need to include rspec components before i18n-spec or rake fails in test environment
gem 'rspec-core' gem 'rspec-core'
gem 'rspec-expectations' gem 'rspec-expectations'
gem 'rspec-rerun' gem 'rspec-rerun'
gem 'i18n-spec' gem 'i18n-spec'
# code coverage
gem 'simplecov', require: false
gem 'coveralls', require: false
end end

View File

@ -30,12 +30,12 @@ GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
Ascii85 (1.0.2) Ascii85 (1.0.2)
actionmailer (3.2.15) actionmailer (3.2.16)
actionpack (= 3.2.15) actionpack (= 3.2.16)
mail (~> 2.5.4) mail (~> 2.5.4)
actionpack (3.2.15) actionpack (3.2.16)
activemodel (= 3.2.15) activemodel (= 3.2.16)
activesupport (= 3.2.15) activesupport (= 3.2.16)
builder (~> 3.0.0) builder (~> 3.0.0)
erubis (~> 2.7.0) erubis (~> 2.7.0)
journey (~> 1.0.4) journey (~> 1.0.4)
@ -43,21 +43,21 @@ GEM
rack-cache (~> 1.2) rack-cache (~> 1.2)
rack-test (~> 0.6.1) rack-test (~> 0.6.1)
sprockets (~> 2.2.1) sprockets (~> 2.2.1)
activemodel (3.2.15) activemodel (3.2.16)
activesupport (= 3.2.15) activesupport (= 3.2.16)
builder (~> 3.0.0) builder (~> 3.0.0)
activerecord (3.2.15) activerecord (3.2.16)
activemodel (= 3.2.15) activemodel (= 3.2.16)
activesupport (= 3.2.15) activesupport (= 3.2.16)
arel (~> 3.0.2) arel (~> 3.0.2)
tzinfo (~> 0.3.29) tzinfo (~> 0.3.29)
activeresource (3.2.15) activeresource (3.2.16)
activemodel (= 3.2.15) activemodel (= 3.2.16)
activesupport (= 3.2.15) activesupport (= 3.2.16)
activesupport (3.2.15) activesupport (3.2.16)
i18n (~> 0.6, >= 0.6.4) i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0) multi_json (~> 1.0)
acts_as_tree (1.4.0) acts_as_tree (1.5.0)
activerecord (>= 3.0.0) activerecord (>= 3.0.0)
afm (0.2.0) afm (0.2.0)
arel (3.0.3) arel (3.0.3)
@ -66,7 +66,7 @@ GEM
erubis (>= 2.6.6) erubis (>= 2.6.6)
binding_of_caller (0.7.2) binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
bootstrap-datepicker-rails (1.1.1.9) bootstrap-datepicker-rails (1.1.1.10)
railties (>= 3.0) railties (>= 3.0)
builder (3.0.4) builder (3.0.4)
bullet (4.7.1) bullet (4.7.1)
@ -80,7 +80,7 @@ GEM
net-ssh-gateway (>= 1.1.0) net-ssh-gateway (>= 1.1.0)
capistrano-ext (1.2.1) capistrano-ext (1.2.1)
capistrano (>= 1.0.0) capistrano (>= 1.0.0)
capybara (2.1.0) capybara (2.2.0)
mime-types (>= 1.16) mime-types (>= 1.16)
nokogiri (>= 1.3.3) nokogiri (>= 1.3.3)
rack (>= 1.0.0) rack (>= 1.0.0)
@ -102,11 +102,17 @@ GEM
execjs execjs
coffee-script-source (1.6.3) coffee-script-source (1.6.3)
commonjs (0.2.7) commonjs (0.2.7)
coveralls (0.7.0)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
term-ansicolor
thor
daemons (1.1.9) daemons (1.1.9)
database_cleaner (1.2.0) database_cleaner (1.2.0)
debug_inspector (0.0.2) debug_inspector (0.0.2)
diff-lcs (1.2.5) diff-lcs (1.2.5)
docile (1.1.0) docile (1.1.1)
erubis (2.7.0) erubis (2.7.0)
eventmachine (1.0.3) eventmachine (1.0.3)
exception_notification (4.0.1) exception_notification (4.0.1)
@ -135,7 +141,7 @@ GEM
hashery (2.1.1) hashery (2.1.1)
highline (1.6.20) highline (1.6.20)
hike (1.2.3) hike (1.2.3)
i18n (0.6.5) i18n (0.6.9)
i18n-spec (0.4.0) i18n-spec (0.4.0)
iso iso
inherited_resources (1.4.1) inherited_resources (1.4.1)
@ -148,7 +154,7 @@ GEM
railties (>= 3.0, < 5.0) railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
json (1.8.1) json (1.8.1)
kaminari (0.14.1) kaminari (0.15.0)
actionpack (>= 3.0.0) actionpack (>= 3.0.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
less (2.4.0) less (2.4.0)
@ -157,7 +163,6 @@ GEM
actionpack (>= 3.1) actionpack (>= 3.1)
less (~> 2.4.0) less (~> 2.4.0)
libv8 (3.16.14.3) libv8 (3.16.14.3)
lockfile (2.1.0)
mail (2.5.4) mail (2.5.4)
mime-types (~> 1.16) mime-types (~> 1.16)
treetop (~> 1.4.8) treetop (~> 1.4.8)
@ -175,7 +180,7 @@ GEM
activerecord (~> 3.1) activerecord (~> 3.1)
activesupport (~> 3.1) activesupport (~> 3.1)
polyamorous (~> 0.5.0) polyamorous (~> 0.5.0)
mime-types (1.25) mime-types (1.25.1)
mini_portile (0.5.2) mini_portile (0.5.2)
mono_logger (1.1.0) mono_logger (1.1.0)
multi_json (1.8.2) multi_json (1.8.2)
@ -187,7 +192,7 @@ GEM
net-ssh (2.7.0) net-ssh (2.7.0)
net-ssh-gateway (1.2.0) net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
nokogiri (1.6.0) nokogiri (1.6.1)
mini_portile (~> 0.5.0) mini_portile (~> 0.5.0)
pdf-reader (1.3.3) pdf-reader (1.3.3)
Ascii85 (~> 1.0.0) Ascii85 (~> 1.0.0)
@ -198,9 +203,11 @@ GEM
polyamorous (0.5.0) polyamorous (0.5.0)
activerecord (~> 3.0) activerecord (~> 3.0)
polyglot (0.3.3) polyglot (0.3.3)
prawn (0.12.0) prawn (0.13.0)
pdf-reader (>= 0.9.0) afm
ttfunk (~> 1.0.2) pdf-reader (~> 1.2)
ruby-rc4
ttfunk (~> 1.0.3)
quiet_assets (1.0.2) quiet_assets (1.0.2)
railties (>= 3.1, < 5.0) railties (>= 3.1, < 5.0)
rack (1.4.5) rack (1.4.5)
@ -212,14 +219,14 @@ GEM
rack rack
rack-test (0.6.2) rack-test (0.6.2)
rack (>= 1.0) rack (>= 1.0)
rails (3.2.15) rails (3.2.16)
actionmailer (= 3.2.15) actionmailer (= 3.2.16)
actionpack (= 3.2.15) actionpack (= 3.2.16)
activerecord (= 3.2.15) activerecord (= 3.2.16)
activeresource (= 3.2.15) activeresource (= 3.2.16)
activesupport (= 3.2.15) activesupport (= 3.2.16)
bundler (~> 1.0) bundler (~> 1.0)
railties (= 3.2.15) railties (= 3.2.16)
rails-assets-listjs (0.2.0.beta.4) rails-assets-listjs (0.2.0.beta.4)
railties (>= 3.1) railties (>= 3.1)
rails-i18n (3.0.0) rails-i18n (3.0.0)
@ -227,9 +234,9 @@ GEM
rails (>= 3.0.0, < 4.0.0) rails (>= 3.0.0, < 4.0.0)
rails-settings-cached (0.2.4) rails-settings-cached (0.2.4)
rails (>= 3.0.0) rails (>= 3.0.0)
railties (3.2.15) railties (3.2.16)
actionpack (= 3.2.15) actionpack (= 3.2.16)
activesupport (= 3.2.15) activesupport (= 3.2.16)
rack-ssl (~> 1.3.2) rack-ssl (~> 1.3.2)
rake (>= 0.8.7) rake (>= 0.8.7)
rdoc (~> 3.4) rdoc (~> 3.4)
@ -238,7 +245,7 @@ GEM
rdoc (3.12.2) rdoc (3.12.2)
json (~> 1.4) json (~> 1.4)
redis (3.0.6) redis (3.0.6)
redis-namespace (1.3.2) redis-namespace (1.4.1)
redis (~> 3.0.4) redis (~> 3.0.4)
ref (1.0.5) ref (1.0.5)
responders (1.0.0) responders (1.0.0)
@ -249,6 +256,8 @@ GEM
redis-namespace (~> 1.2) redis-namespace (~> 1.2)
sinatra (>= 0.9.2) sinatra (>= 0.9.2)
vegas (~> 0.1.2) vegas (~> 0.1.2)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.14.1) rspec (2.14.1)
rspec-core (~> 2.14.0) rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0) rspec-expectations (~> 2.14.0)
@ -266,32 +275,31 @@ GEM
rspec-mocks (~> 2.14.0) rspec-mocks (~> 2.14.0)
rspec-rerun (0.1.3) rspec-rerun (0.1.3)
rspec (>= 2.11.0) rspec (>= 2.11.0)
ruby-prof (0.13.0) ruby-prof (0.13.1)
ruby-rc4 (0.1.5) ruby-rc4 (0.1.5)
rubyzip (1.0.0) rubyzip (1.1.0)
sass (3.2.12) sass (3.2.12)
sass-rails (3.2.6) sass-rails (3.2.6)
railties (~> 3.2.0) railties (~> 3.2.0)
sass (>= 3.1.10) sass (>= 3.1.10)
tilt (~> 1.3) tilt (~> 1.3)
select2-rails (3.5.1) select2-rails (3.5.2)
thor (~> 0.14) thor (~> 0.14)
selenium-webdriver (2.37.0) selenium-webdriver (2.39.0)
childprocess (>= 0.2.5) childprocess (>= 0.2.5)
multi_json (~> 1.0) multi_json (~> 1.0)
rubyzip (~> 1.0.0) rubyzip (~> 1.0)
websocket (~> 1.0.4) websocket (~> 1.0.4)
simple-navigation (3.11.0) simple-navigation (3.11.0)
activesupport (>= 2.3.2) activesupport (>= 2.3.2)
simple-navigation-bootstrap (1.0.0) simple-navigation-bootstrap (1.0.0)
railties (>= 3.1) railties (>= 3.1)
simple-navigation (>= 3.7.0) simple-navigation (>= 3.7.0)
simple_form (2.1.0) simple_form (2.1.1)
actionpack (~> 3.0) actionpack (~> 3.0)
activemodel (~> 3.0) activemodel (~> 3.0)
simplecov (0.8.1) simplecov (0.8.2)
docile (~> 1.1.0) docile (~> 1.1.0)
lockfile (>= 2.1.0)
multi_json multi_json
simplecov-html (~> 0.8.0) simplecov-html (~> 0.8.0)
simplecov-html (0.8.0) simplecov-html (0.8.0)
@ -308,6 +316,8 @@ GEM
rack (~> 1.0) rack (~> 1.0)
tilt (~> 1.1, != 1.3.0) tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.8) sqlite3 (1.3.8)
term-ansicolor (1.2.2)
tins (~> 0.8)
therubyracer (0.12.0) therubyracer (0.12.0)
libv8 (~> 3.16.14.0) libv8 (~> 3.16.14.0)
ref ref
@ -317,6 +327,7 @@ GEM
rack (>= 1.0.0) rack (>= 1.0.0)
thor (0.18.1) thor (0.18.1)
tilt (1.4.1) tilt (1.4.1)
tins (0.13.1)
treetop (1.4.15) treetop (1.4.15)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
@ -327,14 +338,14 @@ GEM
rails (>= 3.1) rails (>= 3.1)
railties (>= 3.1) railties (>= 3.1)
tzinfo (0.3.38) tzinfo (0.3.38)
uglifier (2.3.1) uglifier (2.3.3)
execjs (>= 0.3.0) execjs (>= 0.3.0)
json (>= 1.8.0) json (>= 1.8.0)
uniform_notifier (1.4.0) uniform_notifier (1.4.0)
vegas (0.1.11) vegas (0.1.11)
rack (>= 1.0.0) rack (>= 1.0.0)
websocket (1.0.7) websocket (1.0.7)
whenever (0.8.4) whenever (0.9.0)
activesupport (>= 2.3.4) activesupport (>= 2.3.4)
chronic (>= 0.6.3) chronic (>= 0.6.3)
wikicloth (0.8.0) wikicloth (0.8.0)
@ -359,6 +370,7 @@ DEPENDENCIES
client_side_validations client_side_validations
client_side_validations-simple_form client_side_validations-simple_form
coffee-rails (~> 3.2.1) coffee-rails (~> 3.2.1)
coveralls
daemons daemons
database_cleaner database_cleaner
exception_notification exception_notification

View File

@ -1 +1 @@
3.1.1 3.2.0

View File

@ -104,6 +104,10 @@ table {
td.odd { td.odd {
background-color: @tableBackgroundAccent; background-color: @tableBackgroundAccent;
} }
td.main_info {
font-weight: bold;
}
tr.selected td { tr.selected td {
background-color: @successBackground; background-color: @successBackground;
@ -269,3 +273,44 @@ i.package {
.input-nano { .input-nano {
width: 30px; width: 30px;
} }
// get rid of extra space on bottom of dialog with form
.modal form {
margin: 0;
}
// multiple-column layout in forms (landscape tablet and wider only)
@media (min-width: 768px) {
.form-horizontal .fold-line {
.control-group {
float: left;
}
.control-group + .control-group {
.control-label {
width: auto;
margin: 0 10px;
}
.controls {
float: left;
margin-left: 0;
}
// fix margin somehow off
// XXX there must be a better way
margin-bottom: 0;
.help-block {
margin-top: 0;
margin-bottom: 20px;
}
}
.control-group:last-child {
float: none;
.controls {
float: none;
}
}
}
}
// allow to have indicator text instead of input with same markup
.control-text {
margin-top: 5px;
}

View File

@ -50,57 +50,22 @@ class DeliveriesController < ApplicationController
redirect_to supplier_deliveries_url(@supplier) redirect_to supplier_deliveries_url(@supplier)
end end
# three possibilites to fill a new_stock_article form
# (1) start from blank or use params
def new_stock_article
@stock_article = @supplier.stock_articles.build(params[:stock_article])
render :layout => false
end
# (2) StockArticle as template
def copy_stock_article
@stock_article = StockArticle.find(params[:old_stock_article_id]).dup
render :layout => false
end
# (3) non-stock Article as template
def derive_stock_article
@stock_article = Article.find(params[:old_article_id]).becomes(StockArticle).dup
render :layout => false
end
def create_stock_article
@stock_article = StockArticle.new(params[:stock_article])
if @stock_article.valid? and @stock_article.save
render :layout => false
else
render :action => 'new_stock_article', :layout => false
end
end
def edit_stock_article
@stock_article = StockArticle.find(params[:stock_article_id])
render :layout => false
end
def update_stock_article
@stock_article = StockArticle.find(params[:stock_article][:id])
if @stock_article.update_attributes(params[:stock_article])
render :layout => false
else
render :action => 'edit_stock_article', :layout => false
end
end
def add_stock_change def add_stock_change
@stock_change = StockChange.new @stock_change = StockChange.new
@stock_change.stock_article = StockArticle.find(params[:stock_article_id]) @stock_change.stock_article = StockArticle.find(params[:stock_article_id])
render :layout => false render :layout => false
end end
def form_on_stock_article_create # See publish/subscribe design pattern in /doc.
@stock_article = StockArticle.find(params[:id])
render :layout => false
end
def form_on_stock_article_update # See publish/subscribe design pattern in /doc.
@stock_article = StockArticle.find(params[:id])
render :layout => false
end
end end

View File

@ -4,30 +4,62 @@ class StockitController < ApplicationController
@stock_articles = StockArticle.undeleted.includes(:supplier, :article_category). @stock_articles = StockArticle.undeleted.includes(:supplier, :article_category).
order('suppliers.name, article_categories.name, articles.name') order('suppliers.name, article_categories.name, articles.name')
end end
def index_on_stock_article_create # See publish/subscribe design pattern in /doc.
@stock_article = StockArticle.find(params[:id])
render :layout => false
end
def index_on_stock_article_update # See publish/subscribe design pattern in /doc.
@stock_article = StockArticle.find(params[:id])
render :layout => false
end
# three possibilites to fill a new_stock_article form
# (1) start from blank or use params
def new def new
@stock_article = StockArticle.new @stock_article = StockArticle.new(params[:stock_article])
render :layout => false
end
# (2) StockArticle as template
def copy
@stock_article = StockArticle.find(params[:stock_article_id]).dup
render :layout => false
end
# (3) non-stock Article as template
def derive
@stock_article = Article.find(params[:old_article_id]).becomes(StockArticle).dup
render :layout => false
end end
def create def create
@stock_article = StockArticle.new(params[:stock_article]) @stock_article = StockArticle.new(params[:stock_article])
if @stock_article.save if @stock_article.valid? and @stock_article.save
redirect_to stock_articles_path, :notice => I18n.t('stockit.stock_create.notice') render :layout => false
else else
render :action => 'new' render :action => 'new', :layout => false
end end
end end
def edit def edit
@stock_article = StockArticle.find(params[:id]) @stock_article = StockArticle.find(params[:id])
render :layout => false
end end
def update def update
@stock_article = StockArticle.find(params[:id]) @stock_article = StockArticle.find(params[:id])
if @stock_article.update_attributes(params[:stock_article]) if @stock_article.update_attributes(params[:stock_article])
redirect_to stock_articles_path, :notice => I18n.t('stockit.stock_update.notice') render :layout => false
else else
render :action => 'edit' render :action => 'edit', :layout => false
end end
end end
@ -36,9 +68,15 @@ class StockitController < ApplicationController
@stock_changes = @stock_article.stock_changes.order('stock_changes.created_at DESC') @stock_changes = @stock_article.stock_changes.order('stock_changes.created_at DESC')
end end
def show_on_stock_article_update # See publish/subscribe design pattern in /doc.
@stock_article = StockArticle.find(params[:id])
render :layout => false
end
def destroy def destroy
@article = StockArticle.find(params[:id]) @stock_article = StockArticle.find(params[:id])
@article.mark_as_deleted @stock_article.mark_as_deleted
render :layout => false render :layout => false
rescue => error rescue => error
render :partial => "destroy_fail", :layout => false, render :partial => "destroy_fail", :layout => false,

View File

@ -84,8 +84,8 @@ module ApplicationHelper
i18nopts = options.select {|a| !['short'].include?(a) } i18nopts = options.select {|a| !['short'].include?(a) }
s = model.human_attribute_name(attribute, i18nopts) s = model.human_attribute_name(attribute, i18nopts)
if options[:short] if options[:short]
sshort = model.human_attribute_name("#{attribute}_short".to_sym, options.merge({defaults: ''})) sshort = model.human_attribute_name("#{attribute}_short".to_sym, options.merge({fallback: true, default: ''}))
s = raw "<abbr title='#{s}'>#{sshort}</abbr>" unless sshort.empty? s = raw "<abbr title='#{s}'>#{sshort}</abbr>" unless sshort.blank?
end end
s s
end end

View File

@ -25,13 +25,4 @@ module DeliveriesHelper
return output.html_safe return output.html_safe
end end
def stock_article_price_hint(stock_article)
t('simple_form.hints.stock_article.edit_stock_article.price',
:stock_article_copy_link => link_to(t('.copy_stock_article'),
copy_stock_article_supplier_deliveries_path(@supplier, :old_stock_article_id => stock_article.id),
:remote => true
)
)
end
end end

View File

@ -7,13 +7,20 @@ module GroupOrdersHelper
}.join("\n") }.join("\n")
end end
def link_to_ordering(order, options = {}) # Returns a link to the page where a group_order can be edited.
path = if group_order = order.group_order(current_user.ordergroup) # If the option :show is true, the link is for showing the group_order.
edit_group_order_path(group_order, :order_id => order.id) def link_to_ordering(order, options = {}, &block)
else group_order = order.group_order(current_user.ordergroup)
new_group_order_path(:order_id => order.id) path = if options[:show] and group_order
end group_order_path(group_order)
link_to order.name, path, options elsif group_order
edit_group_order_path(group_order, :order_id => order.id)
else
new_group_order_path(:order_id => order.id)
end
options.delete(:show)
name = block_given? ? capture(&block) : order.name
path ? link_to(name, path, options) : name
end end
# Return css class names for order result table # Return css class names for order result table
@ -36,4 +43,4 @@ module GroupOrdersHelper
{group_order_article: goa, quantity: quantity, tolerance: tolerance, result: result, sub_total: sub_total} {group_order_article: goa, quantity: quantity, tolerance: tolerance, result: result, sub_total: sub_total}
end end
end end

View File

@ -7,11 +7,20 @@ module StockitHelper
def link_to_stock_change_reason(stock_change) def link_to_stock_change_reason(stock_change)
if stock_change.delivery_id if stock_change.delivery_id
link_to t('.delivery'), supplier_delivery_path(stock_change.delivery.supplier, stock_change.delivery) link_to Delivery.model_name.human, supplier_delivery_path(stock_change.delivery.supplier, stock_change.delivery)
elsif stock_change.order_id elsif stock_change.order_id
link_to t('.order'), order_path(stock_change.order) link_to Order.model_name.human, order_path(stock_change.order)
elsif stock_change.stock_taking_id elsif stock_change.stock_taking_id
link_to t('.stock_taking'), stock_taking_path(stock_change.stock_taking) link_to StockTaking.model_name.human, stock_taking_path(stock_change.stock_taking)
end end
end end
def stock_article_price_hint(stock_article)
t('simple_form.hints.stock_article.edit_stock_article.price',
:stock_article_copy_link => link_to(t('.copy_stock_article'),
stock_article_copy_path(stock_article),
:remote => true
)
)
end
end end

View File

@ -13,4 +13,8 @@ module TasksHelper
title: I18n.t('helpers.tasks.required_users', :count => task.still_required_users) title: I18n.t('helpers.tasks.required_users', :count => task.still_required_users)
end end
end end
def task_title(task)
I18n.t('helpers.tasks.task_title', name: task.name, duration: task.duration)
end
end end

View File

@ -26,6 +26,11 @@ class Ordergroup < Group
User.natural_order.all.reject { |u| (users.include?(u) || u.ordergroup) } User.natural_order.all.reject { |u| (users.include?(u) || u.ordergroup) }
end end
# the most recent order this ordergroup was participating in
def last_order
orders.order('orders.starts DESC').first
end
def value_of_open_orders(exclude = nil) def value_of_open_orders(exclude = nil)
group_orders.in_open_orders.reject{|go| go == exclude}.collect(&:price).sum group_orders.in_open_orders.reject{|go| go == exclude}.collect(&:price).sum
end end

View File

@ -14,10 +14,14 @@ class StockArticle < Article
# Check for unclosed orders and substract its ordered quantity # Check for unclosed orders and substract its ordered quantity
def quantity_available def quantity_available
quantity - OrderArticle.where(article_id: id). quantity - quantity_ordered
end
def quantity_ordered
OrderArticle.where(article_id: id).
joins(:order).where("orders.state = 'open' OR orders.state = 'finished'").sum(:units_to_order) joins(:order).where("orders.state = 'open' OR orders.state = 'finished'").sum(:units_to_order)
end end
def quantity_history def quantity_history
stock_changes.reorder('stock_changes.created_at ASC').map{|s| s.quantity}.cumulative_sum stock_changes.reorder('stock_changes.created_at ASC').map{|s| s.quantity}.cumulative_sum
end end

View File

@ -28,6 +28,7 @@ class User < ActiveRecord::Base
validates_presence_of :password, :on => :create validates_presence_of :password, :on => :create
validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
validates_uniqueness_of :email, :case_sensitive => false validates_uniqueness_of :email, :case_sensitive => false
validates_presence_of :first_name # for simple_form validations
validates_length_of :first_name, :in => 2..50 validates_length_of :first_name, :in => 2..50
validates_confirmation_of :password validates_confirmation_of :password
validates_length_of :password, :in => 5..25, :allow_blank => true validates_length_of :password, :in => 5..25, :allow_blank => true

View File

@ -4,11 +4,11 @@
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th= t '.name' %th= heading_helper Ordergroup, :name
%th= t '.contact' %th= heading_helper Ordergroup, :contact
%th= t '.address' %th= heading_helper Ordergroup, :contact_address
%th= t '.members' %th= heading_helper Ordergroup, :user_tokens
%th= t 'admin.actions' %th= t 'ui.actions'
%tbody %tbody
- for ordergroup in @ordergroups - for ordergroup in @ordergroups
%tr{:class => cycle('even','odd', :name => 'groups')} %tr{:class => cycle('even','odd', :name => 'groups')}

View File

@ -5,12 +5,12 @@
%thead %thead
%tr %tr
- if FoodsoftConfig[:use_nick] - if FoodsoftConfig[:use_nick]
%th= t '.login' %th= heading_helper User, :nick
%th= t '.name' %th= heading_helper User, :name
%th= t '.email' %th= heading_helper User, :email
%th= t 'admin.access_to' %th= t 'admin.access_to'
%th= t '.last_login' %th= heading_helper User, :last_login
%th(colspan="2")= t 'admin.actions' %th(colspan="2")= t 'ui.actions'
%tbody %tbody
- for user in @users - for user in @users
%tr %tr

View File

@ -7,13 +7,13 @@
%p= t '.member_since', time: distance_of_time_in_words(Time.now, @user.created_on) %p= t '.member_since', time: distance_of_time_in_words(Time.now, @user.created_on)
%dl %dl
- if FoodsoftConfig[:use_nick] - if FoodsoftConfig[:use_nick]
%dt= t '.nick' %dt= heading_helper User, :nick
%dd= @user.nick %dd= @user.nick
%dt= t '.name' %dt= heading_helper User, :name
%dd= h @user.name %dd= h @user.name
%dt= t '.email' %dt= heading_helper User, :email
%dd= @user.email %dd= @user.email
%dt= t '.phone' %dt= heading_helper User, :phone
%dd= @user.phone %dd= @user.phone
%dt= t 'admin.access_to' %dt= t 'admin.access_to'
%dd= format_roles(@user) %dd= format_roles(@user)

View File

@ -7,7 +7,7 @@
%th= t '.name' %th= t '.name'
%th= t '.members' %th= t '.members'
%th= t 'admin.access_to' %th= t 'admin.access_to'
%th= t 'admin.actions' %th= t 'ui.actions'
%tbody %tbody
- for workgroup in @workgroups - for workgroup in @workgroups
%tr %tr

View File

@ -3,24 +3,55 @@
= f.hidden_field :supplier_id = f.hidden_field :supplier_id
.modal-header .modal-header
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'} = link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
%h3= t '.title' %h3= @article.new_record? ? t('.title_new') : t('.title_edit')
.modal-body .modal-body
= f.input :availability = f.input :availability
= f.input :name = f.input :name
= f.input :origin .fold-line
= f.input :manufacturer = f.input :unit_quantity, label: Article.human_attribute_name(:unit),
= f.input :unit input_html: {class: 'input-mini', title: Article.human_attribute_name(:unit_quantity)}
= f.input :unit, label: '&times;'.html_safe,
input_html: {class: 'input-mini', title: Article.human_attribute_name(:unit)}
= f.input :note = f.input :note
= f.association :article_category = f.association :article_category
/ TODO labels
= f.input :price .fold-line
= f.input :unit_quantity = f.input :price do
.input-prepend
%span.add-on= t 'number.currency.format.unit'
= f.input_field :price, class: 'input-mini'
= f.input :tax do
.input-append
= f.input_field :tax, class: 'input-mini'
%span.add-on %
.fold-line
= f.input :deposit do
.input-prepend
%span.add-on= t 'number.currency.format.unit'
= f.input_field :deposit, class: 'input-mini'
.control-group
%label.control-label{for: 'article_fc_price'}
= Article.human_attribute_name(:fc_price)
.controls.control-text#article_fc_price
= number_to_currency(@article.fc_price) rescue nil
= f.input :origin
= f.input :manufacturer
= f.input :order_number = f.input :order_number
= f.input :tax, :wrapper => :append do
= f.input_field :tax
%span.add-on %
= f.input :deposit
.modal-footer .modal-footer
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'} = link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
= f.submit class: 'btn btn-primary' = f.submit class: 'btn btn-primary'
:javascript
var form = $('form.edit_article, form.new_article');
$('#article_price, #article_tax, #article_deposit', form).on('change keyup', function() {
var price = parseFloat($('#article_price', form).val());
var tax = parseFloat($('#article_tax', form).val());
var deposit = parseFloat($('#article_deposit', form).val());
// Article#gross_price and Article#fc_price
var gross_price = (price + deposit) * (tax / 100 + 1);
var fc_price = gross_price * (#{FoodsoftConfig[:price_markup].to_f} / 100 + 1);
$('#article_fc_price').html($.isNumeric(fc_price) ? I18n.l("currency", fc_price) : '&#133;');
});

View File

@ -42,9 +42,9 @@
} }
if('new' == selectedArticle.id) { if('new' == selectedArticle.id) {
$.ajax({ $.ajax({
url: '#{new_stock_article_supplier_deliveries_path(@supplier)}', url: '#{new_stock_article_path}',
type: 'get', type: 'get',
data: {stock_article: {name: selectedArticle.text}}, data: {stock_article: {name: selectedArticle.text, supplier_id: #{@supplier.id}}},
contentType: 'application/json; charset=UTF-8' contentType: 'application/json; charset=UTF-8'
}); });
$('#new_stock_article').select2('data', null); $('#new_stock_article').select2('data', null);
@ -52,7 +52,7 @@
} }
if('' != selectedArticle.id) { if('' != selectedArticle.id) {
$.ajax({ $.ajax({
url: '#{derive_stock_article_supplier_deliveries_path(@supplier)}', url: '#{derive_stock_articles_path}',
type: 'get', type: 'get',
data: {old_article_id: selectedArticle.id}, data: {old_article_id: selectedArticle.id},
contentType: 'application/json; charset=UTF-8' contentType: 'application/json; charset=UTF-8'
@ -61,6 +61,26 @@
return true; return true;
} }
}); });
// Subscribe to database changes.
// See publish/subscribe design pattern in /doc.
$(document).on('StockArticle#create', function(e) {
$.ajax({
url: '#{form_on_stock_article_create_supplier_deliveries_path(@supplier)}',
type: 'get',
data: {id: e.stock_article_id},
contentType: 'application/json; charset=UTF-8'
});
});
$(document).on('StockArticle#update', function(e) {
$.ajax({
url: '#{form_on_stock_article_update_supplier_deliveries_path(@supplier)}',
type: 'get',
data: {id: e.stock_article_id},
contentType: 'application/json; charset=UTF-8'
});
});
}); });
function mark_article_for_delivery(stock_article_id) { function mark_article_for_delivery(stock_article_id) {
@ -87,16 +107,16 @@
%table#stock_articles_for_adding.table.table-hover.stupidtable %table#stock_articles_for_adding.table.table-hover.stupidtable
%thead %thead
%tr %tr
%th.default-sort{:data => {:sort => 'string'}}= t '.article' %th.default-sort{:data => {:sort => 'string'}}= Article.model_name.human
%th= t '.price' %th= heading_helper StockArticle, :price
%th= t '.unit' %th= heading_helper StockArticle, :unit
%th= t '.category' %th= heading_helper StockArticle, :article_category
%th= t '.actions' %th= t 'ui.actions'
%tfoot %tfoot
%tr %tr
%th{:colspan => 5} %th{:colspan => 5}
- if articles_for_select2(@supplier).empty? - if articles_for_select2(@supplier).empty?
= link_to t('.create_stock_article'), new_stock_article_supplier_deliveries_path(@supplier), :remote => true, :class => 'btn' = link_to t('.create_stock_article'), new_stock_article_path, :remote => true, :class => 'btn'
- else - else
%input#new_stock_article{:style => 'width: 500px;'} %input#new_stock_article{:style => 'width: 500px;'}
%tbody %tbody
@ -107,11 +127,11 @@
%table.table#stock_changes.stupidtable %table.table#stock_changes.stupidtable
%thead %thead
%tr %tr
%th.default-sort{:data => {:sort => 'string'}}= t '.article' %th.default-sort{:data => {:sort => 'string'}}= Article.model_name.human
%th= t '.price' %th= heading_helper StockArticle, :price
%th= t '.unit' %th= heading_helper StockArticle, :unit
%th= t '.quantity' %th= heading_helper GroupOrderArticle, :quantity # quantity to order, although technically this will be a StockChange
%th= t '.actions' %th= t 'ui.actions'
%tbody %tbody
= f.simple_fields_for :stock_changes do |stock_change_form| = f.simple_fields_for :stock_changes do |stock_change_form|
= render :partial => 'stock_change_fields', :locals => {:f => stock_change_form} = render :partial => 'stock_change_fields', :locals => {:f => stock_change_form}

View File

@ -1,11 +1,13 @@
- css_class = ( @delivery and @delivery.includes_article? article ) ? ( 'unavailable' ) : ( false ) - disable_delivery_action = ( @delivery and @delivery.includes_article? article )
- css_class = ( disable_delivery_action ) ? ( 'unavailable' ) : ( false )
- deliver_button_disabled = ( disable_delivery_action ) ? ( 'disabled' ) : ( false )
%tr{:id => "stock_article_#{article.id}", :class => css_class} %tr{:id => "stock_article_#{article.id}", :class => css_class}
%td= article.name %td= article.name
%td{:data => {:toggle => :tooltip, :title => render(:partial => 'shared/article_price_info', :locals => {:article => article})}}= number_to_currency article.price %td{:data => {:toggle => :tooltip, :title => render(:partial => 'shared/article_price_info', :locals => {:article => article})}}= number_to_currency article.price
%td= article.unit %td= article.unit
%td= article.article_category.name %td= article.article_category.name
%td %td
= link_to t('.action_edit'), edit_stock_article_supplier_deliveries_path(@supplier, :stock_article_id => article.id), remote: true, class: 'btn btn-mini' = link_to t('.action_edit'), edit_stock_article_path(article), remote: true, class: 'btn btn-mini'
= link_to t('.action_other_price'), copy_stock_article_supplier_deliveries_path(@supplier, :old_stock_article_id => article.id), remote: true, class: 'btn btn-mini' = link_to t('.action_other_price'), stock_article_copy_path(article), remote: true, class: 'btn btn-mini'
- deliver_button_disabled = ( @delivery and @delivery.includes_article? article ) ? ( 'disabled' ) : ( false )
= link_to t('.action_add_to_delivery'), add_stock_change_supplier_deliveries_path(@supplier, :stock_article_id => article.id), :method => :post, remote: true, class: 'button-add-stock-change btn btn-mini btn-primary', disabled: deliver_button_disabled = link_to t('.action_add_to_delivery'), add_stock_change_supplier_deliveries_path(@supplier, :stock_article_id => article.id), :method => :post, remote: true, class: 'button-add-stock-change btn btn-mini btn-primary', disabled: deliver_button_disabled

View File

@ -1,23 +0,0 @@
- url = ( stock_article.new_record? ) ? ( create_stock_article_supplier_deliveries_path(@supplier) ) : ( update_stock_article_supplier_deliveries_path(@supplier) )
= simple_form_for stock_article, url: url, remote: true, validate: true do |f|
= f.association :supplier, :as => :hidden
= f.hidden_field :id unless stock_article.new_record?
.modal-header
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
%h3= t 'activerecord.models.stock_article'
.modal-body
= f.input :name
= f.input :unit
= f.input :note
- if stock_article.new_record?
= f.input :price
= f.input :tax, :wrapper => :append do
= f.input_field :tax
%span.add-on %
= f.input :deposit
- else
= f.input :price, :input_html => {:disabled => 'disabled'}, :hint => stock_article_price_hint(stock_article)
= f.association :article_category
.modal-footer
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
= f.submit :class => 'btn btn-primary', 'data-disable-with' => t('ui.please_wait')

View File

@ -1,5 +0,0 @@
$('#modalContainer').html(
'<%= j(render(:partial => "stock_article_form", :locals => {:stock_article => @stock_article})) %>'
);
$('#modalContainer').modal();

View File

@ -1,16 +0,0 @@
$('div.container-fluid').prepend(
'<%= j(render(:partial => 'shared/alert_success', :locals => {:alert_message => t('.notice', :name => @stock_article.name)})) %>'
);
(function() {
$('#stock_articles_for_adding tr').removeClass('success');
var stock_article_for_adding = $(
'<%= j(render(:partial => 'stock_article_for_adding', :locals => {:article => @stock_article})) %>'
).addClass('success');
$('#stock_articles_for_adding tbody').append(stock_article_for_adding);
updateSort('#stock_articles_for_adding');
})();
$('#modalContainer').modal('hide');

View File

@ -1,5 +0,0 @@
$('#modalContainer').html(
'<%= j(render(:partial => "stock_article_form", :locals => {:stock_article => @stock_article})) %>'
);
$('#modalContainer').modal();

View File

@ -1,5 +0,0 @@
$('#modalContainer').html(
'<%= j(render(:partial => "stock_article_form", :locals => {:stock_article => @stock_article})) %>'
);
$('#modalContainer').modal();

View File

@ -0,0 +1,31 @@
// Handle more advanced DOM update after AJAX database manipulation.
// See publish/subscribe design pattern in /doc.
(function(w) {
$('#stock_articles_for_adding tr').removeClass('success');
if(<%= @supplier.id != @stock_article.supplier.id %>) {
// the stock_article does _NOT_ belong to the current supplier
var try_again = w.confirm('<%= j(
t('deliveries.form.confirm_foreign_supplier_reedit', :name => @stock_article.name)
) %>');
if(try_again) {
$.ajax({
url: '<%= j edit_stock_article_path(@stock_article) %>',
type: 'get',
contentType: 'application/json; charset=UTF-8'
});
}
return false;
}
// the stock_article _DOES_ belong to the current supplier
var stock_article_for_adding = $(
'<%= j(render(:partial => 'stock_article_for_adding', :locals => {:article => @stock_article})) %>'
).addClass('success');
$('#stock_articles_for_adding tbody').append(stock_article_for_adding);
updateSort('#stock_articles_for_adding');
})(window);

View File

@ -0,0 +1,47 @@
// Handle more advanced DOM update after AJAX database manipulation.
// See publish/subscribe design pattern in /doc.
(function(w) {
// update entry in stock_article table
$('#stock_articles_for_adding tr').removeClass('success');
$('#stock_article_<%= @stock_article.id %>').remove();
if(<%= @supplier.id != @stock_article.supplier.id %>) {
// the stock_article does _NOT_ belong to the current supplier
var try_again = w.confirm('<%= j(
t('deliveries.form.confirm_foreign_supplier_reedit', :name => @stock_article.name)
) %>');
if(try_again) {
$.ajax({
url: '<%= j edit_stock_article_path(@stock_article) %>',
type: 'get',
contentType: 'application/json; charset=UTF-8'
});
}
}
else {
// the stock_article _DOES_ belong to the current supplier
var stock_article_for_adding = $(
'<%= j(render(:partial => 'stock_article_for_adding', :locals => {:article => @stock_article})) %>'
).addClass('success');
$('#stock_articles_for_adding tbody').append(stock_article_for_adding);
updateSort('#stock_articles_for_adding');
}
mark_article_for_delivery(<%= @stock_article.id %>);
// update entry in stock_changes table
$('#stock_changes tr').removeClass('success');
var stock_change_entry = $('#stock_change_stock_article_<%= @stock_article.id %>');
$('.stock_article_name', stock_change_entry).text('<%= j(@stock_article.name) %>');
$('.unit', stock_change_entry).text('<%= j(@stock_article.unit) %>');
stock_change_entry.addClass('success');
updateSort('#stock_changes');
})(window);

View File

@ -1,5 +0,0 @@
$('#modalContainer').html(
'<%= j(render(:partial => "stock_article_form", :locals => {:stock_article => @stock_article})) %>'
);
$('#modalContainer').modal();

View File

@ -17,10 +17,10 @@
%table.table.table-striped(style="width:500px") %table.table.table-striped(style="width:500px")
%thead %thead
%tr %tr
%th= t '.article' %th= Article.model_name.human
%th= t '.unit' %th= heading_helper StockArticle, :unit
%th.numeric= t '.amount' %th.numeric= heading_helper GroupOrderArticle, :quantity # quantity to order, although technically this will be a StockChange
%th.numeric= t '.price' %th.numeric= heading_helper Article, :price
%th.numeric= t '.sum' %th.numeric= t '.sum'
%tbody %tbody
- total_net, total_gross = 0,0 - total_net, total_gross = 0,0

View File

@ -1,32 +0,0 @@
$('div.container-fluid').prepend(
'<%= j(render(:partial => 'shared/alert_success', :locals => {:alert_message => t('.notice', :name => @stock_article.name)})) %>'
);
(function() {
// update entry in stock_article table
$('#stock_articles_for_adding tr').removeClass('success');
var stock_article_for_adding = $(
'<%= j(render(:partial => 'stock_article_for_adding', :locals => {:article => @stock_article, :delivery => @delivery})) %>'
).addClass('success');
$('#stock_article_<%= @stock_article.id %>').replaceWith(stock_article_for_adding);
updateSort('#stock_articles_for_adding');
mark_article_for_delivery(<%= @stock_article.id %>);
// update entry in stock_changes table
$('#stock_changes tr').removeClass('success');
var stock_change_entry = $('#stock_change_stock_article_<%= @stock_article.id %>');
$('.stock_article_name', stock_change_entry).text('<%= j(@stock_article.name) %>');
$('.unit', stock_change_entry).text('<%= j(@stock_article.unit) %>');
stock_change_entry.addClass('success');
updateSort('#stock_changes');
})();
$('#modalContainer').modal('hide');

View File

@ -1,14 +1,14 @@
%table.ordered-articles.table.table-striped %table.ordered-articles.table.table-striped
%thead %thead
%tr %tr
%th= sort_link_helper t('.article'), "name" %th= sort_link_helper Article.model_name.human, "name"
%th= sort_link_helper t('.number'), "order_number" %th= sort_link_helper Article.human_attribute_name(:order_number_short), "order_number"
%th= t('.amount') %th= t('.amount')
%th= t('.amount_per_unit') %th= heading_helper Article, :units
%th= t('.net') %th= t('.net')
%th= t('.gross') %th= t('.gross')
%th= t('.tax') %th= heading_helper Article, :tax
%th= t('.refund') %th= heading_helper Article, :deposit
%th{:colspan => "2"} %th{:colspan => "2"}
= link_to t('.add_article'), new_finance_order_order_article_path(@order), remote: true, = link_to t('.add_article'), new_finance_order_order_article_path(@order), remote: true,
class: 'btn btn-small' class: 'btn btn-small'

View File

@ -3,7 +3,7 @@
%thead %thead
%tr %tr
%td %td
%td{:style => "width:8em"}= t('.group') %td{:style => "width:8em"}= Ordergroup.model_name.human
%td= t('.units') %td= t('.units')
%td= t('.total') %td= t('.total')
%td{:colspan => "3",:style => "width:14em"} %td{:colspan => "3",:style => "width:14em"}

View File

@ -5,7 +5,7 @@
= order_article.units_to_order = order_article.units_to_order
- unless order_article.ordered_quantities_equal_to_group_orders? - unless order_article.ordered_quantities_equal_to_group_orders?
%span{:style => "color:red;font-weight: bold"} ! %span{:style => "color:red;font-weight: bold"} !
%td= order_article.price.unit_quantity.to_s + ' * ' + order_article.article.unit.to_s %td #{order_article.price.unit_quantity} &times; #{order_article.article.unit}
%td %td
= number_to_currency(order_article.price.price, :unit => "") = number_to_currency(order_article.price.price, :unit => "")
:plain :plain
@ -16,7 +16,7 @@
:plain :plain
/ /
= number_to_currency(order_article.total_gross_price, :unit => "") = number_to_currency(order_article.total_gross_price, :unit => "")
%td= order_article.price.tax %td #{order_article.price.tax}%
%td= order_article.price.deposit %td= order_article.price.deposit
%td %td
= link_to t('ui.edit'), edit_finance_order_order_article_path(order_article.order, order_article), remote: true, = link_to t('ui.edit'), edit_finance_order_order_article_path(order_article.order, order_article), remote: true,

View File

@ -4,10 +4,10 @@
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%td= sort_link_helper t('.date'), "date" %th= sort_link_helper heading_helper(FinancialTransaction, :created_on), "date"
%td= t('.who') %th= heading_helper FinancialTransaction, :user
%td= sort_link_helper t('.note'), "note" %th= sort_link_helper heading_helper(FinancialTransaction, :note), "note"
%td= sort_link_helper t('.amount'), "amount" %th= sort_link_helper heading_helper(FinancialTransaction, :amount), "amount"
%tbody %tbody
- @financial_transactions.each do |t| - @financial_transactions.each do |t|
%tr %tr

View File

@ -21,13 +21,13 @@
= form_tag finance_create_transaction_collection_path do = form_tag finance_create_transaction_collection_path do
%p %p
%b= t('.note') %b= heading_helper FinancialTransaction, :note
= text_field_tag :note, params[:note], class: 'input-xlarge', required: 'required' = text_field_tag :note, params[:note], class: 'input-xlarge', required: 'required'
%p %p
%table#ordergroups{:style => "width:20em"} %table#ordergroups{:style => "width:20em"}
%tr %tr
%th= t('.ordergroup') %th= heading_helper FinancialTransaction, :ordergroup
%th= t('.amount') %th= heading_helper FinancialTransaction, :amount
= render :partial => 'ordergroup', :collection => [1, 2, 3] = render :partial => 'ordergroup', :collection => [1, 2, 3]
%p %p
= link_to t('.new_ordergroup'), '#', 'data-add-transaction' => true, class: 'btn' = link_to t('.new_ordergroup'), '#', 'data-add-transaction' => true, class: 'btn'

View File

@ -5,7 +5,7 @@
%h3= t('.amount_change_for', article: @order_article.article.name) %h3= t('.amount_change_for', article: @order_article.article.name)
.modal-body .modal-body
= form.input :ordergroup_id, as: :select, collection: Ordergroup.all.map { |g| [g.name, g.id] } = form.input :ordergroup_id, as: :select, collection: Ordergroup.all.map { |g| [g.name, g.id] }
= form.input :result, hint: I18n.t('.result_hint', unit: @order_article.article.unit) = form.input :result, hint: I18n.t('finance.group_order_articles.form.result_hint', unit: @order_article.article.unit) # Why do we need the full prefix?
.modal-footer .modal-footer
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'} = link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
= form.submit t('ui.save'), class: 'btn btn-primary' = form.submit t('ui.save'), class: 'btn btn-primary'

View File

@ -8,9 +8,9 @@
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th= t('.date') %th= heading_helper Invoice, :date
%th.numeric= t('.amount') %th.numeric= heading_helper Invoice, :amount
%th= t('.supplier') %th= heading_helper Invoice, :supplier
%th %th
%tbody %tbody
- for invoice in @unpaid_invoices - for invoice in @unpaid_invoices
@ -26,10 +26,10 @@
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th= t('.date') %th= heading_helper FinancialTransaction, :created_on
%th= t('.group') %th= heading_helper FinancialTransaction, :ordergroup
%th= t('.note') %th= heading_helper FinancialTransaction, :note
%th.numeric= t('.amount') %th.numeric= heading_helper FinancialTransaction, :amount
%tbody %tbody
- @financial_transactions.each do |ft| - @financial_transactions.each do |ft|
%tr %tr
@ -45,8 +45,8 @@
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th= t('.supplier') %th= heading_helper Order, :name
%th= t('.end') %th= t '.end'
%th.numeric= t('.amount_fc') %th.numeric= t('.amount_fc')
%th %th
%tbody %tbody
@ -55,6 +55,6 @@
%td= order.name %td= order.name
%td= format_date(order.ends) %td= format_date(order.ends)
%td.numeric= number_to_currency(order.sum(:fc)) %td.numeric= number_to_currency(order.sum(:fc))
%td= link_to t('.clear'), new_finance_order_path(order_id: order.id), class: 'btn btn-mini' %td= link_to t('finance.balancing.orders.clear'), new_finance_order_path(order_id: order.id), class: 'btn btn-mini'
- else - else
= t('.everything_cleared') = t('.everything_cleared')

View File

@ -23,7 +23,7 @@
%td= format_date invoice.date %td= format_date invoice.date
%td= format_date invoice.paid_on %td= format_date invoice.paid_on
%td= number_to_currency invoice.amount %td= number_to_currency invoice.amount
%td= link_to t('.delivery'), [invoice.supplier,invoice.delivery] if invoice.delivery %td= link_to Delivery.model_name.human, [invoice.supplier,invoice.delivery] if invoice.delivery
%td= link_to format_date(invoice.order.ends), new_finance_order_path(order_id: invoice.order_id) if invoice.order %td= link_to format_date(invoice.order.ends), new_finance_order_path(order_id: invoice.order_id) if invoice.order
%td= truncate(invoice.note) %td= truncate(invoice.note)
%td= link_to t('ui.edit'), edit_finance_invoice_path(invoice), class: 'btn btn-mini' %td= link_to t('ui.edit'), edit_finance_invoice_path(invoice), class: 'btn btn-mini'

View File

@ -3,7 +3,7 @@
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'} = link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
%h3= t '.title' %h3= t '.title'
.modal-body .modal-body
= form.input :article_id, as: :select, collection: new_order_articles_collection = form.input :article_id, as: :select, collection: new_order_articles_collection, :label => Article.model_name.human # Why do we need the label?
.modal-footer .modal-footer
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'} = link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
= form.submit class: 'btn btn-primary' = form.submit class: 'btn btn-primary'

View File

@ -4,9 +4,9 @@
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th= sort_link_helper t('.name'), "name", :per_page => @per_page %th= sort_link_helper heading_helper(Ordergroup, :name), "name", :per_page => @per_page
%th= t '.contact' %th= heading_helper Ordergroup, :contact
%th.numeric= sort_link_helper t('.account_balance'), "account_balance", :per_page => @per_page %th.numeric= sort_link_helper heading_helper(Ordergroup, :account_balance), "account_balance", :per_page => @per_page
%th %th
%tbody %tbody
- for ordergroup in @ordergroups - for ordergroup in @ordergroups

View File

@ -5,15 +5,15 @@
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th= t '.name' %th= heading_helper Ordergroup, :name
%th= t '.user' %th= heading_helper Ordergroup, :user_tokens
%th= t '.last_ordered' %th= heading_helper Ordergroup, :last_order
%tbody %tbody
- for ordergroup in @ordergroups - for ordergroup in @ordergroups
%tr %tr
%td= ordergroup.name %td= ordergroup.name
%td=h ordergroup.users.collect { |u| show_user(u) }.join(", ") %td=h ordergroup.users.collect { |u| show_user(u) }.join(", ")
%td= format_date ordergroup.orders.order('orders.starts DESC').first.try(:starts) %td= format_date ordergroup.last_order.try(:starts)
%td= link_to_new_message(message_params: {group_id: ordergroup.id}) %td= link_to_new_message(message_params: {group_id: ordergroup.id})

View File

@ -27,22 +27,23 @@
%h2= @order.name %h2= @order.name
%dl.dl-horizontal %dl.dl-horizontal
- unless @order.note.blank? - unless @order.note.blank?
%dt= t '.note' %dt= heading_helper Order, :note
%dd= @order.note %dd= @order.note
%dt= t '.created_by' %dt= heading_helper Order, :created_by
%dd= show_user_link(@order.created_by) %dd= show_user_link(@order.created_by)
%dt= t '.ending' %dt= heading_helper Order, :ends
%dd= format_time(@order.ends) %dd= format_time(@order.ends)
- unless @order.stockit? or @order.supplier.min_order_quantity.blank? - unless @order.stockit? or @order.supplier.min_order_quantity.blank?
%dt= t '.min_quantity' %dt= heading_helper Supplier, :min_order_quantity, short: true
%dd= @order.supplier.min_order_quantity %dd= @order.supplier.min_order_quantity
%dt= t '.sum_amount' %dt= t '.sum_amount'
%dd= number_to_currency @order.sum %dd= number_to_currency @order.sum
%dt= t '.last_update' - unless @group_order.new_record?
%dd %dt= heading_helper GroupOrder, :updated_by
= show_user(@group_order.updated_by) if @group_order.updated_by %dd
(#{format_time(@group_order.updated_on)}) = show_user(@group_order.updated_by)
%dt= t '.funds' (#{format_time(@group_order.updated_on)})
%dt= heading_helper Ordergroup, :available_funds
%dd= number_to_currency(@ordering_data[:available_funds]) %dd= number_to_currency(@ordering_data[:available_funds])
.well.pull-right .well.pull-right
@ -65,20 +66,20 @@
%table.table.table-hover %table.table.table-hover
%thead %thead
%tr %tr
%th= t '.name' %th= heading_helper Article, :name
- if @order.stockit? - if @order.stockit?
%th{style: 'width:120px'}= t '.supplier' %th{style: 'width:120px'}= heading_helper StockArticle, :supplier
%th{style: "width:13px;"} %th{style: "width:13px;"}
%th{style: "width:4.5em;"}= t '.price' %th{style: "width:4.5em;"}= t '.price'
%th{style: "width:4.5em;"}= t '.unit' %th{style: "width:4.5em;"}= heading_helper Article, :unit
- unless @order.stockit? - unless @order.stockit?
%th{style: "width:70px;"}= t '.unit_missing' %th{style: "width:70px;"}= heading_helper OrderArticle, :missing_units, short: true
%th#col_required= t '.amount' %th#col_required= heading_helper GroupOrderArticle, :quantity
%th#col_tolerance= t '.tolerance' %th#col_tolerance= heading_helper GroupOrderArticle, :tolerance
- else - else
%th(style="width:20px")= t '.available' %th(style="width:20px")= heading_helper StockArticle, :available
%th#col_required= t '.amount' %th#col_required= heading_helper GroupOrderArticle, :quantity
%th{style: "width:15px;"}= t '.sum' %th{style: "width:15px;"}= heading_helper GroupOrderArticle, :total_price
%tbody.list %tbody.list
- @order.articles_grouped_by_category.each do |category, order_articles| - @order.articles_grouped_by_category.each do |category, order_articles|
%tr.list-heading.article-category %tr.list-heading.article-category
@ -132,11 +133,11 @@
%span{id: "t_total_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:tolerance] + @ordering_data[:order_articles][order_article.id][:others_tolerance] %span{id: "t_total_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:tolerance] + @ordering_data[:order_articles][order_article.id][:others_tolerance]
%br/ %br/
.pull-left .pull-left
#{t '.manufacturer'}: #{order_article.article.manufacturer} #{heading_helper Article, :manufacturer}: #{order_article.article.manufacturer}
%br/ %br/
#{t '.units'}: #{@order.stockit? ? order_article.article.quantity_available : @ordering_data[:order_articles][order_article.id][:unit]} * #{h order_article.article.unit} #{heading_helper Article, :units}: #{@order.stockit? ? order_article.article.quantity_available : @ordering_data[:order_articles][order_article.id][:unit]} * #{h order_article.article.unit}
%br/ %br/
#{t '.note'}: #{order_article.article.note} #{heading_helper Article, :note}: #{order_article.article.note}
%br/ %br/
#order-footer #order-footer
#info-box #info-box
@ -147,7 +148,7 @@
%td.currency %td.currency
%span#total_price= number_to_currency(@group_order.price) %span#total_price= number_to_currency(@group_order.price)
%tr %tr
%td= t('.available_funds') + ':' %td= heading_helper(Ordergroup, :available_funds) + ':'
%td.currency= number_to_currency(@ordering_data[:available_funds]) %td.currency= number_to_currency(@ordering_data[:available_funds])
%tr %tr
%td= t('.new_funds') + ':' %td= t('.new_funds') + ':'

View File

@ -1,9 +1,9 @@
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th= t '.supplier' %th= heading_helper Order, :name
%th= t '.ending' %th= heading_helper Order, :ends
%th= t '.sum' %th= heading_helper GroupOrder, :price
%tbody %tbody
- for order in orders - for order in orders
- group_order = order.group_order(@ordergroup) # Get GroupOrder if possible - group_order = order.group_order(@ordergroup) # Get GroupOrder if possible

View File

@ -6,22 +6,22 @@
%h2= t '.funds.title' %h2= t '.funds.title'
%table.table.table-striped %table.table.table-striped
%tr %tr
%td= t('.funds.account_balance') + ':' %td= heading_helper Ordergroup, :account_balance
%td.numeric{:style => "width:5em"}= number_to_currency(@ordergroup.account_balance) %td.numeric{:style => "width:5em"}= number_to_currency(@ordergroup.account_balance)
%tr %tr
%td= '- ' + t('.funds.open_orders') + ':' %td= '- ' + t('.funds.open_orders')
%td.numeric= number_to_currency(@ordergroup.value_of_open_orders) %td.numeric= number_to_currency(@ordergroup.value_of_open_orders)
%tr %tr
%td= '- ' + t('.funds.finished_orders') + ':' %td= '- ' + t('.funds.finished_orders')
%td.numeric= number_to_currency(@ordergroup.value_of_finished_orders) %td.numeric= number_to_currency(@ordergroup.value_of_finished_orders)
%tr %tr
%th= t('.funds.available_funds') + ':' %th= heading_helper Ordergroup, :available_funds
%th.numeric= number_to_currency(@ordergroup.get_available_funds) %th.numeric= number_to_currency(@ordergroup.get_available_funds)
= render :partial => "shared/open_orders", :locals => {:ordergroup => @ordergroup} = render :partial => "shared/open_orders", :locals => {:ordergroup => @ordergroup}
// finished orders // finished orders
- unless Order.finished.empty? - unless Order.finished_not_closed.empty?
%section %section
%h2= t '.finished_orders.title' %h2= t '.finished_orders.title'
= render :partial => "orders", :locals => {:orders => Order.finished_not_closed, :pagination => false} = render :partial => "orders", :locals => {:orders => Order.finished_not_closed, :pagination => false}

View File

@ -1,88 +0,0 @@
- content_for :head do
= render 'data'
= render :partial => 'order_head'
- form_tag(:action => 'saveOrder', :id => @order) do
.single_column{:style => "clear:both;margin-bottom:7em;"}
.box_title
%h2= t '.title'
.column_content
%table#order.list
%thead
%tr
%th= t 'group_orders.form.name'
%th{:style => "width:13px;"}
%th{:style => "width:4.5em;"}= t 'group_orders.form.price'
%th{:style => "width:4.5em;"}= t 'group_orders.form.unit'
%th{:style => "width:70px;"}= t 'group_orders.form.unit_missing'
%th#col_required= t 'group_orders.form.amount'
- if not @order.stockit?
%th#col_tolerance= t 'group_orders.form.tolerance'
%th{:style => "width:15px;"}= t 'group_orders.form.sum'
%tbody
- total = 0
- i = 0
- @articles_grouped_by_category.each do |category, order_articles|
%tr{:style => "background-color:#EFEFEF"}
%td{:style => "text-align:left"}
%b= h category
%td{:colspan => "9"}
- order_articles.each do |order_article|
- if FoodsoftConfig[:tolerance_is_costly]
- article_total = @price[i] * (@tolerance[i] + @quantity[i])
- else
- article_total = @price[i] * @quantity[i]
- total += article_total
%tr{:class => "#{cycle('even', 'odd', :name => 'articles')} order-article", :valign => "top"}
%td.name= order_article.article.name
%td= h order_article.article.origin
%td= number_to_currency(@price[i])
%td= order_article.article.unit
%td
%span{:id => "missing_units_#{i}"}
- if @order.stockit?
- order_article.article.quantity_available
- else
- missing_units = @unit[i] - (((@quantity[i] + @others_quantity[i]) % @unit[i]) + @tolerance[i] + @others_tolerance[i])
- missing_units < 0 ? 0 : missing_units
%td.quantity
%input{:id => "q_#{i}", :name => "ordered[#{order_article.id}][quantity]", :size => "2", :type => "hidden", :value => @quantity[i]}/
%span.used{:id => "q_used_#{i}"}= @used_quantity[i]
+
%span.unused{:id => "q_unused_#{i}"}= @quantity[i] - @used_quantity[i]
= button_to_function('+', "increaseQuantity(#{i})")
= button_to_function('-', "decreaseQuantity(#{i})")
- unless @order.stockit?
%td.tolerance
%input{:id => "t_#{i}", :name => "ordered[#{order_article.id}][tolerance]", :size => "2", :type => "hidden", :value => @tolerance[i]}/
- if (@unit[i] > 1)
%span.used{:id => "t_used_#{i}"}= @used_tolerance[i]
+
%span.unused{:id => "t_unused_#{i}"}= @tolerance[i] - @used_tolerance[i]
= button_to_function('+', "increaseTolerance(#{i})")
= button_to_function('-', "decreaseTolerance(#{i})")
%td{:id => "td_price_#{i}", :style => "text-align:right; padding-right:10px; width:4em"}
%span{:id => "price_#{i}_display"}= number_to_currency(article_total, :unit => "")
.article-info
%h3= order_article.article.name
.right
= t('group_orders.form.units_full') + ':'
%span{:id => "units_#{i}"}= order_article.units_to_order
%br/
= t('group_orders.form.total_units') + ':'
%span{:id => "q_total_#{i}"}= @quantity[i] + @others_quantity[i]
%br/
= t('group_orders.form.total_tolerance') + ':'
%span{:id => "t_total_#{i}"}= @tolerance[i] + @others_tolerance[i]
%br/
.left
#{t 'group_orders.form.manufacturer'}: #{order_article.article.manufacturer}
%br/
#{t 'group_orders.form.units'}: #{@order.stockit? ? order_article.article.quantity_available : @unit[i]} * #{h order_article.article.unit}
%br/
#{t 'group_orders.form.note'}: #{order_article.article.note}
%br/
- i = i + 1
= render "order_footer", :total => total

View File

@ -9,21 +9,22 @@
.well .well
// Order summary // Order summary
%dl.dl-horizontal %dl.dl-horizontal
%dt= t '.supplier' %dt= heading_helper Order, :name
%dd= @order.name %dd= @order.name
%dt= t '.note' %dt= heading_helper Order, :note
%dd= @order.note %dd= @order.note
%dt= t '.ending' %dt= heading_helper Order, :ends
%dd= format_time(@order.ends) %dd= format_time(@order.ends)
%dt= t '.order_sum' %dt= heading_helper GroupOrder, :price
%dd %dd
- if @group_order - if @group_order
= number_to_currency(@group_order.price) = number_to_currency(@group_order.price)
- else - else
= t '.not_ordered' = t '.not_ordered'
- if @order.closed? - if @order.closed?
%p= t '.closed_by', user: show_user(@order.updated_by) %dt= heading_helper Order, :closed_by
= link_to t('.comment'), "#comments" %dd= show_user_link @order.updated_by
%p= link_to t('.comment'), "#comments"
// Article box // Article box
%section %section
@ -35,8 +36,8 @@
%table.table.table-hover %table.table.table-hover
%thead %thead
%tr %tr
%th{style: "width:40%"}= t '.articles.name' %th{style: "width:40%"}= heading_helper Article, :name
%th= t '.articles.units' %th= heading_helper Article, :units
%th= t '.articles.unit_price' %th= t '.articles.unit_price'
%th %th
%abbr{title: t('.articles.ordered_title')}= t '.articles.ordered' %abbr{title: t('.articles.ordered_title')}= t '.articles.ordered'
@ -46,7 +47,7 @@
= t '.articles.order_open' = t '.articles.order_open'
- else - else
= t '.articles.order_not_open' = t '.articles.order_not_open'
%th= t '.articles.total_price' %th= heading_helper GroupOrderArticle, :total_price
%tbody %tbody
- for category_name, order_articles in @order.articles_grouped_by_category - for category_name, order_articles in @order.articles_grouped_by_category
%tr.article-category %tr.article-category
@ -61,7 +62,7 @@
%td{style: "width:40%"} %td{style: "width:40%"}
= oa.article.name = oa.article.name
- unless oa.article.note.blank? - unless oa.article.note.blank?
= image_tag("lamp_grey.png", {alt: "Notiz anzeigen", size: "15x16", border: "0", onmouseover: "$('note_#{oa.id}').show();", onmouseout: "$('note_#{oa.id}').hide();"}) = image_tag("lamp_grey.png", {alt: t('.articles.show_note'), size: "15x16", border: "0", onmouseover: "$('#note_#{oa.id}').show();", onmouseout: "$('#note_#{oa.id}').hide();"})
%td= "#{oa.price.unit_quantity} x #{oa.article.unit}" %td= "#{oa.price.unit_quantity} x #{oa.article.unit}"
%td= number_to_currency(oa.price.fc_price) %td= number_to_currency(oa.price.fc_price)
%td %td
@ -73,7 +74,7 @@
%tr{id: "note_#{oa.id}", class: "note even", style: "display:none"} %tr{id: "note_#{oa.id}", class: "note even", style: "display:none"}
%td{colspan: "6"}=h oa.article.note %td{colspan: "6"}=h oa.article.note
%tr{class: cycle('even', 'odd', name: 'articles')} %tr{class: cycle('even', 'odd', name: 'articles')}
%th{colspan: "5"}= t '.articles.sum' %th{colspan: "5"}= heading_helper GroupOrder, :price
%th= number_to_currency(@group_order.price) %th= number_to_currency(@group_order.price)
%br/ %br/
= link_to_top = link_to_top

View File

@ -50,10 +50,10 @@
%h3= t '.my_ordergroup.transactions.title' %h3= t '.my_ordergroup.transactions.title'
%table.table.table-striped %table.table.table-striped
%tr %tr
%th= t '.my_ordergroup.transactions.when' %th= heading_helper FinancialTransaction, :created_on
%th= t '.my_ordergroup.transactions.where' %th= heading_helper FinancialTransaction, :user
%th= t '.my_ordergroup.transactions.note' %th= heading_helper FinancialTransaction, :note
%th= t '.my_ordergroup.transactions.amount' %th= heading_helper FinancialTransaction, :amount
- for ft in current_user.ordergroup.financial_transactions.limit(5).order('created_on DESC') - for ft in current_user.ordergroup.financial_transactions.limit(5).order('created_on DESC')
%tr %tr
%td= format_time(ft.created_on) %td= format_time(ft.created_on)

View File

@ -7,10 +7,10 @@
- unless @ordergroup.description.blank? - unless @ordergroup.description.blank?
%p= @ordergroup.description %p= @ordergroup.description
%p %p
%b= Ordergroup.human_attribute_name(:available_funds) + ':' %b= heading_helper(Ordergroup, :available_funds) + ':'
= number_to_currency(@ordergroup.get_available_funds()) = number_to_currency(@ordergroup.get_available_funds())
%p %p
%b= Ordergroup.human_attribute_name(:user_tokens) + ':' %b= heading_helper(Ordergroup, :user_tokens) + ':'
= @ordergroup.memberships.map{|m| show_user m.user}.join(', ') = @ordergroup.memberships.map{|m| show_user m.user}.join(', ')
= link_to t('.invite'), new_invite_path(:id => @ordergroup), :remote => true, class: 'btn btn-primary' = link_to t('.invite'), new_invite_path(:id => @ordergroup), :remote => true, class: 'btn btn-primary'
.span8 .span8

View File

@ -7,10 +7,6 @@
%title= [t('layouts.foodsoft'), yield(:title)].join(" - ") %title= [t('layouts.foodsoft'), yield(:title)].join(" - ")
= csrf_meta_tags = csrf_meta_tags
= stylesheet_link_tag "application", :media => "all" = stylesheet_link_tag "application", :media => "all"
%link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144")
%link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon-precomposed" sizes="114x114")
%link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon-precomposed" sizes="72x72")
%link(href="images/apple-touch-icon.png" rel="apple-touch-icon-precomposed")
//%link(href="images/favicon.ico" rel="shortcut icon") //%link(href="images/favicon.ico" rel="shortcut icon")
= yield(:head) = yield(:head)

View File

@ -1,8 +1,8 @@
%table.table.table-hover %table.table.table-hover
%thead %thead
%tr %tr
%th= t '.name' %th= heading_helper Article, :name
%th= t '.unit_quantity' %th= heading_helper Article, :unit_quantity
%th= t '.prices' %th= t '.prices'
%th= t '.units_ordered' %th= t '.units_ordered'
- unless order.stockit? - unless order.stockit?

View File

@ -11,14 +11,14 @@
%table.table.table-hover#articleList %table.table.table-hover#articleList
%tr %tr
%th= check_box_tag 'checkall', "1", false, { 'data-check-all' => '#articleList' } %th= check_box_tag 'checkall', "1", false, { 'data-check-all' => '#articleList' }
%th= t '.name' %th= heading_helper Article, :name
%th= t '.note' %th= heading_helper Article, :note
- if @order.stockit? - if @order.stockit?
%th= t '.stockit' %th= t '.stockit'
- else - else
%th= t '.origin' %th= heading_helper Article, :origin
%th= t '.supplier' %th= heading_helper Article, :manufacturer
%th= t '.unit_quantity' %th= heading_helper Article, :unit_quantity
%th= t '.prices' %th= t '.prices'
- for category_name, articles in @order.articles_for_ordering - for category_name, articles in @order.articles_for_ordering
%tr.article-category %tr.article-category

View File

@ -2,10 +2,10 @@
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th= sort_link_helper t('.supplier'), "supplier" %th= sort_link_helper heading_helper(Order, :supplier), "supplier"
%th= t '.start' %th= heading_helper Order, :starts
%th= sort_link_helper t('.ending'), "ends" %th= sort_link_helper heading_helper(Order, :ends), "ends"
%th= t '.status' %th= heading_helper Order, :status
%th{:colspan => "2"} %th{:colspan => "2"}
%tbody %tbody
- @orders.each do |order| - @orders.each do |order|

View File

@ -15,9 +15,9 @@
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th= t '.supplier' %th= heading_helper Order, :name
%th= t '.ending' %th= heading_helper Order, :ends
%th= t '.note' %th= heading_helper Order, :note
%th{colspan: "2"} %th{colspan: "2"}
%tbody %tbody
- for order in @open_orders - for order in @open_orders

View File

@ -2,21 +2,21 @@
- if @order.finished? and !@order.closed? - if @order.finished? and !@order.closed?
.alert.alert-warning .alert.alert-warning
= t '.warn_not_closed' = t '.warn_not_closed'
// Order summary // Order summary
.well .well
%dl.dl-horizontal %dl.dl-horizontal
%dt= t '.supplier' %dt= heading_helper(Order, :name) + ':'
%dd= @order.name %dd= @order.name
- if @note.present? - if @note.present?
%dt= t '.note' %dt= heading_helper(Order, :note) + ':'
%dd= @order.note %dd= @order.note
%dt= t '.created_by' %dt= heading_helper(Order, :created_by) + ':'
%dd= show_user_link(@order.created_by) %dd= show_user_link(@order.created_by)
%dt= t '.begin' %dt= heading_helper(Order, :starts) + ':'
%dd= format_time(@order.starts) %dd= format_time(@order.starts)
%dt= t '.ending' %dt= heading_helper(Order, :ends) + ':'
%dd= format_time(@order.ends) %dd= format_time(@order.ends)
%dt= t '.group_orders' %dt= t '.group_orders'
%dd #{@order.group_orders.count} (#{@order.group_orders.includes(:ordergroup).all.map {|g| g.ordergroup.name}.join(', ')}) %dd #{@order.group_orders.count} (#{@order.group_orders.includes(:ordergroup).all.map {|g| g.ordergroup.name}.join(', ')})

View File

@ -1,7 +1,7 @@
%table.table.table-hover %table.table.table-hover
%thead %thead
%tr %tr
%th{:style => "width:40%"}= t '.name' %th{:style => "width:40%"}= heading_helper Article, :name
%th %th
%acronym{:title => t('shared.articles.ordered_desc')}= t 'shared.articles.ordered' %acronym{:title => t('shared.articles.ordered_desc')}= t 'shared.articles.ordered'
%th %th
@ -10,7 +10,7 @@
%acronym{:title => t('.fc_price_desc')}= t '.fc_price' %acronym{:title => t('.fc_price_desc')}= t '.fc_price'
%th %th
%acronym{:title => t('.unit_quantity_desc')}= t '.unit_quantity' %acronym{:title => t('.unit_quantity_desc')}= t '.unit_quantity'
%th= t '.unit' %th= heading_helper Article, :unit
%th= t '.price' %th= t '.price'
- for group_order in order.group_orders.ordered - for group_order in order.group_orders.ordered

View File

@ -1,14 +1,14 @@
%dl %dl
%dt= t('.description') + ':' %dt= heading_helper(Ordergroup, :description) + ':'
%dd=h group.description %dd=h group.description
- if group.is_a?(Ordergroup) and (@current_user.role_admin? or @current_user.role_finance?) - if group.is_a?(Ordergroup) and (@current_user.role_admin? or @current_user.role_finance?)
%dt= t('.contact') + ':' %dt= heading_helper(Ordergroup, :contact) + ':'
%dd=h group.contact %dd=h group.contact
%dt= t('.address') + ':' %dt= heading_helper(Ordergroup, :contact_address) + ':'
%dd= link_to_gmaps group.contact_address %dd= link_to_gmaps group.contact_address
%dt= t('.access') + ':' %dt= t('.access') + ':'
%dd= format_roles(group) %dd= format_roles(group)
%dt= t('.members') + ':' %dt= heading_helper(Ordergroup, :user_tokens) + ':'
%dd %dd
- members = group.users - members = group.users
= "(#{members.size})" = "(#{members.size})"

View File

@ -7,10 +7,10 @@
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th= t '.supplier' %th= heading_helper Order, :name
%th= t '.ending' %th= heading_helper Order, :ends
%th= t '.who_ordered' %th= t '.who_ordered'
%th= t '.total' %th.numeric= heading_helper GroupOrder, :price
%tbody %tbody
- total = 0 - total = 0
- Order.open.each do |order| - Order.open.each do |order|
@ -20,7 +20,9 @@
- if group_order = order.group_order(ordergroup) - if group_order = order.group_order(ordergroup)
- total += group_order.price - total += group_order.price
%td= "#{show_user group_order.updated_by} (#{format_time(group_order.updated_on)})" %td= "#{show_user group_order.updated_by} (#{format_time(group_order.updated_on)})"
%td.numeric= number_to_currency(group_order.price) %td.numeric
= link_to_ordering(order, show: true) do
= number_to_currency(group_order.price)
- else - else
%td{:colspan => 2} %td{:colspan => 2}
- if total > 0 - if total > 0

View File

@ -1,7 +1,8 @@
%p %p
= simple_fields_for "stock_taking[stock_change_attributes][]", stock_change do |form| = simple_fields_for "stock_taking[stock_change_attributes][]", stock_change do |form|
= form.hidden_field :stock_article_id = form.hidden_field :stock_article_id
= "Menge (#{stock_change.stock_article.quantity_available})" = t '.amount'
(#{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

View File

@ -1,18 +1,21 @@
= simple_form_for stock_article, :validate => true do |f| = simple_form_for stock_article, remote: true, :validate => true do |f|
= f.association :supplier .modal-header
= f.input :name = link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
= f.input :unit %h3= title
= f.input :note .modal-body
= f.association :supplier
- if stock_article.new_record? = f.input :name
= f.input :price = f.input :unit
= f.input :tax, :wrapper => :append do = f.input :note
= f.input_field :tax - if stock_article.new_record?
%span.add-on % = f.input :price
= f.input :deposit = f.input :tax, :wrapper => :append do
- else = f.input_field :tax
= f.input :price, :input_html => {:disabled => 'disabled'}, :hint => t('.price_hint') %span.add-on %
= f.association :article_category = f.input :deposit
.form-actions - else
= f.submit class: 'btn' = f.input :price, :input_html => {:disabled => 'disabled'}, :hint => stock_article_price_hint(stock_article).html_safe
= link_to t('ui.or_cancel'), stock_articles_path = f.association :article_category
.modal-footer
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
= f.submit :class => 'btn btn-primary', 'data-disable-with' => t('ui.please_wait')

View File

@ -0,0 +1,14 @@
%tr{:class => stock_article_classes(stock_article), :id => "stockArticle-#{stock_article.id}"}
%td= link_to stock_article.name, stock_article
%td= stock_article.quantity
%td= stock_article.quantity_ordered
%td.main_info= stock_article.quantity_available
%td= stock_article.unit
%td= stock_article.price
%td= number_to_percentage stock_article.tax
%td= link_to stock_article.supplier.name, stock_article.supplier
%td= stock_article.article_category.name
%td
= link_to t('ui.edit'), edit_stock_article_path(stock_article), remote: true, class: 'btn btn-mini'
= link_to t('ui.delete'), stock_article, :method => :delete, :confirm => t('.confirm_delete', :name => stock_article.name),
class: 'btn btn-mini btn-danger', :remote => true

View File

@ -0,0 +1,26 @@
#stockArticleDetails
%dl.dl-horizontal
%dt= heading_helper(StockArticle, :supplier)
%dd= link_to stock_article.supplier.name, stock_article.supplier
%dt= heading_helper(StockArticle, :name)
%dd= stock_article.name
%dt= heading_helper(StockArticle, :unit)
%dd= stock_article.unit
%dt= heading_helper(StockArticle, :price)
%dd= number_to_currency stock_article.price
%dt= heading_helper(StockArticle, :tax)
%dd= number_to_percentage stock_article.tax
%dt= heading_helper(StockArticle, :deposit)
%dd= number_to_currency stock_article.deposit
%dt= heading_helper(StockArticle, :fc_price)
%dd= number_to_currency stock_article.fc_price
%dt= heading_helper(StockArticle, :article_category)
%dd= stock_article.article_category.name
%dt= heading_helper(StockArticle, :note)
%dd= stock_article.note
%dt= heading_helper(StockArticle, :quantity)
%dd= stock_article.quantity
%dt= heading_helper(StockArticle, :quantity_available)
%dd= stock_article.quantity_available
.form-actions
= link_to t('ui.edit'), edit_stock_article_path(stock_article), remote: true, class: 'btn'

View File

@ -0,0 +1,9 @@
$('#modalContainer').html('<%= j(render(
:partial => "form",
:locals => {
:title => t('.title'),
:stock_article => @stock_article
}
)) %>');
$('#modalContainer').modal();

View File

@ -0,0 +1,15 @@
$('div.container-fluid').prepend('<%= j(render(
:partial => 'shared/alert_success',
:locals => {
:alert_message => t('.notice', :name => @stock_article.name)
}
)) %>');
// Publish database changes.
// See publish/subscribe design pattern in /doc.
$(document).trigger({
type: 'StockArticle#create',
stock_article_id: <%= @stock_article.id %>
});
$('#modalContainer').modal('hide');

View File

@ -0,0 +1,9 @@
$('#modalContainer').html('<%= j(render(
:partial => "form",
:locals => {
:title => t('.title'),
:stock_article => @stock_article
}
)) %>');
$('#modalContainer').modal();

View File

@ -0,0 +1,13 @@
$('div.container-fluid').prepend('<%= j(render(
:partial => 'shared/alert_success',
:locals => {
:alert_message => t('.notice', :name => @stock_article.name)
}
)) %>');
// Publish database changes.
// See publish/subscribe design pattern in /doc.
$(document).trigger({
type: 'StockArticle#destroy',
stock_article_id: <%= @stock_article.id %>
});

View File

@ -1,8 +0,0 @@
-# please polish the following line if you know how, same in partial _destroy_fail
var successDiv = $('<div class="alert fade in alert-success"><a class="close" data-dismiss="alert" href="#">#{escape_javascript(t('ui.marks.close').html_safe)}</a></div>');
successDiv.append(document.createTextNode('#{escape_javascript(t('.notice', name: @article.name))}'));
$('div.container-fluid').prepend(successDiv);
$('#stockArticle-#{@article.id}').remove();
-# WARNING: Do not use a simple .fadeOut() above, because it conflicts with the show/hide function of unavailable articles.

View File

@ -1,3 +0,0 @@
- title t('.title')
= render :partial => 'form', :locals => {:stock_article => @stock_article}

View File

@ -0,0 +1,9 @@
$('#modalContainer').html('<%= j(render(
:partial => "form",
:locals => {
:title => t('.title'),
:stock_article => @stock_article
}
)) %>');
$('#modalContainer').modal();

View File

@ -3,6 +3,30 @@
:javascript :javascript
$(function() { $(function() {
$('tr.unavailable').hide(); $('tr.unavailable').hide();
// Subscribe to database changes.
// See publish/subscribe design pattern in /doc.
$(document).on('StockArticle#create', function(e) {
$.ajax({
url: '#{index_on_stock_article_create_stock_articles_path}',
type: 'get',
data: {id: e.stock_article_id},
contentType: 'application/json; charset=UTF-8'
});
});
$(document).on('StockArticle#destroy', function(e) {
$('#stockArticle-' + e.stock_article_id).remove();
});
$(document).on('StockArticle#update', function(e) {
$.ajax({
url: '#{index_on_stock_article_update_stock_articles_path}',
type: 'get',
data: {id: e.stock_article_id},
contentType: 'application/json; charset=UTF-8'
});
});
}) })
.well.well-small .well.well-small
@ -17,7 +41,7 @@
.btn-group .btn-group
= link_to_if @current_user.role_orders?, t('.order_online'), new_order_path(supplier_id: 0), = link_to_if @current_user.role_orders?, t('.order_online'), new_order_path(supplier_id: 0),
class: 'btn', class: 'btn btn-primary' class: 'btn', class: 'btn btn-primary'
= link_to t('.new_stock_article'), new_stock_article_path, class: 'btn' = link_to t('.new_stock_article'), new_stock_article_path, remote: true, class: 'btn'
= link_to t('.new_stock_taking'), new_stock_taking_path, class: 'btn' = link_to t('.new_stock_taking'), new_stock_taking_path, class: 'btn'
= link_to t('.show_stock_takings'), stock_takings_path, class: 'btn' = link_to t('.show_stock_takings'), stock_takings_path, class: 'btn'
@ -32,32 +56,19 @@
%table.table.table-hover#articles %table.table.table-hover#articles
%thead %thead
%tr %tr
%th= t '.article.article' %th= Article.model_name.human
%th= t '.article.stock' %th= heading_helper StockArticle, :quantity
%th= t '.article.ordered' %th= heading_helper StockArticle, :quantity_ordered
%th= t '.article.available' %th= heading_helper StockArticle, :available
%th= t '.article.unit' %th= heading_helper StockArticle, :unit
%th= t '.article.price' %th= heading_helper StockArticle, :price
%th= t '.article.vat' %th= heading_helper StockArticle, :tax
%th= t '.article.supplier' %th= heading_helper StockArticle, :supplier
%th= t '.article.category' %th= heading_helper StockArticle, :article_category
%th %th
%tbody %tbody#articles-tbody
- for article in @stock_articles - for stock_article in @stock_articles
%tr{:class => stock_article_classes(article), :id => "stockArticle-#{article.id}"} = render :partial => 'stock_article', :locals => {:stock_article => stock_article}
%td= link_to article.name, article
%td= article.quantity
%td= article.quantity - article.quantity_available
%th= article.quantity_available
%td= article.unit
%td= article.price
%td= number_to_percentage article.tax
%td= link_to article.supplier.name, article.supplier
%td= article.article_category.name
%td
= link_to t('ui.edit'), edit_stock_article_path(article), class: 'btn btn-mini'
= link_to t('ui.delete'), article, :method => :delete, :confirm => t('.confirm_delete'),
class: 'btn btn-mini btn-danger', :remote => true
%p %p
= t '.stock_worth' = t '.stock_worth'
= number_to_currency StockArticle.stock_value = number_to_currency StockArticle.stock_value

View File

@ -0,0 +1,14 @@
// Handle more advanced DOM update after AJAX database manipulation.
// See publish/subscribe design pattern in /doc.
(function() {
$('#articles-tbody tr').removeClass('success');
var stock_article_row = $('<%= j(render(
:partial => 'stock_article',
:locals => {
:stock_article => @stock_article
}
)) %>').addClass('success');
$('#articles-tbody').prepend(stock_article_row);
})();

View File

@ -0,0 +1,14 @@
// Handle more advanced DOM update after AJAX database manipulation.
// See publish/subscribe design pattern in /doc.
(function() {
$('#articles-tbody tr').removeClass('success');
var stock_article_row = $('<%= j(render(
:partial => 'stock_article',
:locals => {
:stock_article => @stock_article
}
)) %>').addClass('success');
$('#stockArticle-<%= @stock_article.id %>').replaceWith(stock_article_row);
})();

View File

@ -1,22 +0,0 @@
- title t('.title')
- content_for :head do
:javascript
$(function() {
$('#article_search').autocomplete({
source: '#{articles_search_stock_articles_path}',
select: function(e, ui) {
alert(ui.item.value);
//location.href = '#{nil}' + ui.item.value;
}
});
})
/
TODO: Fix this
%p
= t '.search_text'
= text_field_tag 'article_search'
#stock_article_form
= render :partial => 'form', :locals => {:stock_article => @stock_article}

View File

@ -0,0 +1,9 @@
$('#modalContainer').html('<%= j(render(
:partial => "form",
:locals => {
:title => t('.title'),
:stock_article => @stock_article
}
)) %>');
$('#modalContainer').modal();

View File

@ -1,32 +1,22 @@
- title @stock_article.name - title @stock_article.name
- content_for :javascript do
:javascript
$(function() {
// Subscribe to database changes.
// See publish/subscribe design pattern in /doc.
$(document).on('StockArticle#update', function(e) {
$.ajax({
url: '#{show_on_stock_article_update_stock_articles_path}',
type: 'get',
data: {id: e.stock_article_id},
contentType: 'application/json; charset=UTF-8'
});
});
});
.row-fluid .row-fluid
.span6 .span6
%dl.dl-horizontal = render :partial => 'stock_article_details', :locals => {:stock_article => @stock_article}
%dt= StockArticle.human_attribute_name 'supplier'
%dd= link_to @stock_article.supplier.name, @stock_article.supplier
%dt= StockArticle.human_attribute_name 'name'
%dd= @stock_article.name
%dt= StockArticle.human_attribute_name 'unit'
%dd= @stock_article.unit
%dt= StockArticle.human_attribute_name 'price'
%dd= number_to_currency @stock_article.price
%dt= StockArticle.human_attribute_name 'tax'
%dd= number_to_percentage @stock_article.tax
%dt= StockArticle.human_attribute_name 'deposit'
%dd= number_to_currency @stock_article.deposit
%dt= StockArticle.human_attribute_name 'fc_price'
%dd= number_to_currency @stock_article.fc_price
%dt= StockArticle.human_attribute_name 'article_category'
%dd= @stock_article.article_category.name
%dt= StockArticle.human_attribute_name 'note'
%dd= @stock_article.note
%dt= StockArticle.human_attribute_name 'quantity'
%dd= @stock_article.quantity
%dt= StockArticle.human_attribute_name 'quantity_available'
%dd= @stock_article.quantity_available
.form-actions
= link_to t('ui.edit'), edit_stock_article_path(@stock_article), class: 'btn'
.span6 .span6
%h2= t('.stock_changes') %h2= t('.stock_changes')

View File

@ -0,0 +1,13 @@
// Handle more advanced DOM update after AJAX database manipulation.
// See publish/subscribe design pattern in /doc.
(function() {
var stock_article_details = $('<%= j(render(
:partial => 'stock_article_details',
:locals => {
:stock_article => @stock_article
}
)) %>');
$('#stockArticleDetails').replaceWith(stock_article_details);
$('h1').first().text('<%= j(@stock_article.name) %>');
})();

View File

@ -0,0 +1,15 @@
$('div.container-fluid').prepend('<%= j(render(
:partial => 'shared/alert_success',
:locals => {
:alert_message => t('.notice', :name => @stock_article.name)
}
)) %>');
// Publish database changes.
// See publish/subscribe design pattern in /doc.
$(document).trigger({
type: 'StockArticle#update',
stock_article_id: <%= @stock_article.id %>
});
$('#modalContainer').modal('hide');

View File

@ -5,13 +5,13 @@
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th= t '.due_date' %th= heading_helper Task, :due_date
%th= t '.task' %th= heading_helper Task, :name
%th= t '.who' %th= heading_helper Task, :user_list
%th %th
%tbody %tbody
- @tasks.each do |task| - @tasks.each do |task|
%tr %tr
%td= task.due_date unless task.due_date.nil? %td= task.due_date unless task.due_date.nil?
%td= link_to t('.task_format', name: task.name, duration: task.duration), task_path(task) %td= link_to task_title(task), task_path(task)
%td= task_assignments task %td= task_assignments task

View File

@ -1,9 +1,9 @@
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th= t '.due_date' %th= heading_helper Task, :due_date
%th %th
%th= t '.task' %th= heading_helper Task, :name
%th{:colspan => '2'} %th{:colspan => '2'}
= t '.who' = t '.who'
%small= t '.who_hint' %small= t '.who_hint'
@ -15,7 +15,7 @@
%td %td
- if task.periodic? - if task.periodic?
%i.icon-repeat{title: t('tasks.repeated')} %i.icon-repeat{title: t('tasks.repeated')}
%td= link_to t('.task_format', name: task.name, duration: task.duration), task_path(task) %td= link_to task_title(task), task_path(task)
%td %td
= task_assignments task = task_assignments task
= highlighted_required_users task = highlighted_required_users task

View File

@ -13,6 +13,6 @@
%section %section
%h3 %h3
= group.name = group.name
%small= link_to t('.show_group_tasks'), workgroup_tasks_path(group) %small= link_to t('.show_group_tasks'), workgroup_tasks_path(workgroup_id: group)
= render 'list', tasks: tasks = render 'list', tasks: tasks
= link_to_top = link_to_top

View File

@ -3,22 +3,22 @@
%section %section
%dl.dl-horizontal %dl.dl-horizontal
%dt= Task.human_attribute_name(:name) %dt= heading_helper Task, :name
%dd= @task.name %dd= @task.name
- if @task.description.present? - if @task.description.present?
%dt= Task.human_attribute_name(:description) %dt= heading_helper Task, :description
%dd= simple_format(@task.description) %dd= simple_format(@task.description)
- if @task.due_date.present? - if @task.due_date.present?
%dt= Task.human_attribute_name(:due_date) %dt= heading_helper Task, :due_date
%dd %dd
= format_date(@task.due_date) = format_date(@task.due_date)
- if @task.periodic? - if @task.periodic?
%i.icon-repeat{title: t('tasks.repeated')} %i.icon-repeat{title: t('tasks.repeated')}
%dt= Task.human_attribute_name(:duration) %dt= heading_helper Task, :duration
%dd= t('.hours', count: @task.duration) %dd= t('.hours', count: @task.duration)
%dt= Task.human_attribute_name(:user_list) %dt= heading_helper Task, :user_list
%dd= task_assignments(@task) %dd= task_assignments(@task)
%dt= Task.human_attribute_name(:workgroup) %dt= heading_helper Task, :workgroup
%dd %dd
- if @task.workgroup - if @task.workgroup
= link_to @task.workgroup.name, workgroup_tasks_path(workgroup_id: @task.workgroup_id) = link_to @task.workgroup.name, workgroup_tasks_path(workgroup_id: @task.workgroup_id)

View File

@ -2,6 +2,10 @@ require File.expand_path('../boot', __FILE__)
require 'rails/all' require 'rails/all'
# need to include this before requiring some other gems
# http://stackoverflow.com/questions/20361428
I18n.enforce_available_locales = true
if defined?(Bundler) if defined?(Bundler)
# If you precompile assets before deploying to production, use this line # If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test))) Bundler.require(*Rails.groups(:assets => %w(development test)))

View File

@ -7,7 +7,7 @@ de:
availability_short: verf. availability_short: verf.
deposit: Pfand deposit: Pfand
fc_price: Endpreis fc_price: Endpreis
fc_price_short: fc_price_short: FC-Preis
fc_share: FoodCoop-Aufschlag fc_share: FoodCoop-Aufschlag
fc_share_short: FC-Aufschlag fc_share_short: FC-Aufschlag
gross_price: Bruttopreis gross_price: Bruttopreis
@ -15,6 +15,7 @@ de:
name: Name name: Name
note: Notiz note: Notiz
order_number: Bestellnummer order_number: Bestellnummer
order_number_short: Nr.
origin: Herkunft origin: Herkunft
price: Nettopreis price: Nettopreis
supplier: Lieferantin supplier: Lieferantin
@ -22,6 +23,7 @@ de:
unit: Einheit unit: Einheit
unit_quantity: Gebindegröße unit_quantity: Gebindegröße
unit_quantity_short: GebGr unit_quantity_short: GebGr
units: Gebinde
article_category: article_category:
description: Beschreibung description: Beschreibung
name: Name name: Name
@ -31,10 +33,19 @@ de:
supplier: Lieferantin supplier: Lieferantin
financial_transaction: financial_transaction:
amount: Betrag amount: Betrag
created_on: Datum
note: Notiz note: Notiz
ordergroup: Bestellgruppe
user: Eingetragen von
group_order:
price: Bestellsumme
updated_by: Zuletzt bestellt
group_order_article: group_order_article:
ordergroup_id: Bestellgruppe ordergroup_id: Bestellgruppe
quantity: Menge
result: Menge result: Menge
tolerance: Toleranz
total_price: Summe
invoice: invoice:
amount: Betrag amount: Betrag
date: Rechnungsdatum date: Rechnungsdatum
@ -54,20 +65,30 @@ de:
sent_to_all: An alle Mitglieder schicken sent_to_all: An alle Mitglieder schicken
subject: Betreff subject: Betreff
order: order:
closed_by: Abgerechnet von
created_by: Erstellt von
ends: Endet am ends: Endet am
name: Lieferant
note: Notiz note: Notiz
starts: Läuft vom starts: Läuft vom
status: Status
order_article: order_article:
missing_units: Fehlende Einheiten
missing_units_short: Fehlende
units_to_order: Menge units_to_order: Menge
update_current_price: Globalen Preis aktualisieren update_current_price: Globalen Preis aktualisieren
order_comment: order_comment:
text: Kommentiere diese Bestellung ... text: Kommentiere diese Bestellung ...
ordergroup: ordergroup:
account_balance: Kontostand
available_funds: Verfügbares Guthaben
contact: Kontakt
contact_address: Adresse contact_address: Adresse
contact_person: Kontaktperson contact_person: Kontaktperson
contact_phone: Telefon contact_phone: Telefon
description: Beschreibung description: Beschreibung
ignore_apple_restriction: Bestellstop bei zu wenig Äpfeln ignorieren ignore_apple_restriction: Bestellstop bei zu wenig Äpfeln ignorieren
last_order: Zuletst bestellt
name: Name name: Name
user_tokens: Mitglieder user_tokens: Mitglieder
page: page:
@ -75,10 +96,12 @@ de:
parent_id: Oberseite parent_id: Oberseite
title: Titel title: Titel
stock_article: stock_article:
available: Verfügbar
price: Nettopreis price: Nettopreis
quantity: Lagerbestand quantity: im Lager
quantity_available: Verfügbarer Bestand quantity_available: Verfügbarer Bestand
supplier: Lieferant quantity_available_short: Verf.
quantity_ordered: Davon bestellt
stock_taking: stock_taking:
date: Datum date: Datum
note: Notiz note: Notiz
@ -92,6 +115,7 @@ de:
fax: FAX fax: FAX
is_subscribed: abonniert? is_subscribed: abonniert?
min_order_quantity: Mindestbestellmenge min_order_quantity: Mindestbestellmenge
min_order_quantity_short:
name: Name name: Name
note: Notiz note: Notiz
order_howto: Howto Bestellen order_howto: Howto Bestellen
@ -103,13 +127,14 @@ de:
done: Erledigt? done: Erledigt?
due_date: Wann erledigen? due_date: Wann erledigen?
duration: Dauer duration: Dauer
name: Name name: Aufgabe
required_users: Anzahl required_users: Anzahl
user_list: Verantwortliche user_list: Verantwortlichen
workgroup: Arbeitsgruppe workgroup: Arbeitsgruppe
user: user:
email: Email email: Email
first_name: Vorname first_name: Vorname
last_login: Letzter login
last_name: Nachname last_name: Nachname
name: Name name: Name
nick: Benutzername nick: Benutzername
@ -156,7 +181,6 @@ de:
workgroup: Arbeitsgruppe workgroup: Arbeitsgruppe
admin: admin:
access_to: Zugriff auf access_to: Zugriff auf
actions: Aktionen
base: base:
index: index:
all_ordergroups: Alle Bestellgruppen all_ordergroups: Alle Bestellgruppen
@ -194,11 +218,6 @@ de:
workgroup: Arbeitsgruppe workgroup: Arbeitsgruppe
new: new:
title: Bestellgruppe anlegen title: Bestellgruppe anlegen
ordergroups:
address: Adresse
contact: Kontakt
members: Mitglieder
name: Name
show: show:
confirm: Bist Du sicher? confirm: Bist Du sicher?
edit: Gruppe/Mitglieder bearbeiten edit: Gruppe/Mitglieder bearbeiten
@ -217,20 +236,11 @@ de:
title: Neue Benutzerin anlegen title: Neue Benutzerin anlegen
show: show:
confirm: Willst du %{user} wirklich rausschmeißen? confirm: Willst du %{user} wirklich rausschmeißen?
email: Email
groupabos: Gruppenabos groupabos: Gruppenabos
member_since: Mitglied seit %{time} member_since: Mitglied seit %{time}
name: Name
nick: Nick
person: Person person: Person
phone: Telefon
preference: Einstellungen preference: Einstellungen
send_message: Nachricht senden send_message: Nachricht senden
users:
email: Email
last_login: Letzter login
login: Login
name: Name
workgroups: workgroups:
destroy: destroy:
error: ! 'Arbeitsgruppe konnte nicht gelöscht werden: %{error}' error: ! 'Arbeitsgruppe konnte nicht gelöscht werden: %{error}'
@ -258,8 +268,8 @@ de:
name: Name name: Name
application: application:
controller: controller:
error_authn: error_authn: Anmeldung erforderlich!
error_denied: error_denied: Kein Zugriff!
error_members_only: Diese Aktion ist nur für Mitglieder der Gruppe erlaubt! error_members_only: Diese Aktion ist nur für Mitglieder der Gruppe erlaubt!
article_categories: article_categories:
create: create:
@ -318,17 +328,9 @@ de:
submit: Alle Artikel aktualisieren submit: Alle Artikel aktualisieren
title: Alle Artikel von %{supplier} bearbeiten title: Alle Artikel von %{supplier} bearbeiten
warning: Achtung, alle Artikel werden aktualisiert! warning: Achtung, alle Artikel werden aktualisiert!
edit_all_table:
available_desc: verfügbar
available_short: verf.
order_number_desc: Bestellnummer
order_number_short: Best.Nr.
price_desc: Netto!
price_short: Preis
unit_quantity_desc: Gebindegröße
unit_quantity_short: GebGr
form: form:
title: Neuen Artikel einfügen title_edit: Artikel bearbeiten
title_new: Neuen Artikel einfügen
import_search_results: import_search_results:
action_import: importieren action_import: importieren
already_imported: schon importiert already_imported: schon importiert
@ -354,7 +356,7 @@ de:
error_nosel: Du hast keine Artikel ausgewählt error_nosel: Du hast keine Artikel ausgewählt
parse_upload: parse_upload:
body: <p><i>Bitte überprufe die engelesenen Artikel.</i></p> <p><i>Achtung, momentan gibt es keine Überprüfung auf doppelte Artikel.</i></p> body: <p><i>Bitte überprufe die engelesenen Artikel.</i></p> <p><i>Achtung, momentan gibt es keine Überprüfung auf doppelte Artikel.</i></p>
title: title: Artikel hochladen
sync: sync:
outlist: outlist:
alert_used: Achtung, %{article} wird gerade in einer laufenden Bestellung verwendet. Bitte erst Bestellung anpassen. alert_used: Achtung, %{article} wird gerade in einer laufenden Bestellung verwendet. Bitte erst Bestellung anpassen.
@ -383,24 +385,17 @@ de:
how_many_units: Wie viele Einheiten (%{unit}) des Artikels »%{name}« liefern? how_many_units: Wie viele Einheiten (%{unit}) des Artikels »%{name}« liefern?
create: create:
notice: Lieferung wurde erstellt. Bitte nicht vergessen die Rechnung anzulegen! notice: Lieferung wurde erstellt. Bitte nicht vergessen die Rechnung anzulegen!
create_stock_article:
notice: Neuer Lagerartikel »%{name}« gespeichert.
destroy: destroy:
notice: Lieferung wurde gelöscht. notice: Lieferung wurde gelöscht.
edit: edit:
title: Lieferung bearbeiten title: Lieferung bearbeiten
form: form:
actions: Optionen confirm_foreign_supplier_reedit: Der Lagerartikel »%{name}« wurde erfolgreich gespeichert. Er gehört jedoch nicht zu dem Lieferanten dieser Lieferung. Möchtest Du diesen Lagerartikel erneut bearbeiten?
article: Artikel
category: Kategorie
create_from_blank: Ohne Vorlage anlegen create_from_blank: Ohne Vorlage anlegen
create_stock_article: Lagerartikel anlegen create_stock_article: Lagerartikel anlegen
price: Nettopreis
quantity: Menge
title_fill_quantities: 2. Liefermenge angeben title_fill_quantities: 2. Liefermenge angeben
title_finish_delivery: 3. Lieferung abschließen title_finish_delivery: 3. Lieferung abschließen
title_select_stock_articles: 1. Lagerartikel auswählen title_select_stock_articles: 1. Lagerartikel auswählen
unit: Einheit
index: index:
confirm_delete: Bist Du sicher? confirm_delete: Bist Du sicher?
new_delivery: Neue Lieferung für %{supplier} anlegen new_delivery: Neue Lieferung für %{supplier} anlegen
@ -410,29 +405,21 @@ de:
new: new:
title: Neue Lieferung von %{supplier} title: Neue Lieferung von %{supplier}
show: show:
amount: Menge
article: Artikel
price: Nettopreis
sum: Summe sum: Summe
sum_diff: Brutto - bereinigter Rechnungsbetrag sum_diff: Brutto - bereinigter Rechnungsbetrag
sum_gross: Bruttosumme sum_gross: Bruttosumme
sum_net: Nettosumme sum_net: Nettosumme
title: Lieferung anzeigen title: Lieferung anzeigen
title_articles: Artikel title_articles: Artikel
unit: Einheit
stock_article_for_adding: stock_article_for_adding:
action_add_to_delivery: Liefern action_add_to_delivery: Liefern
action_edit: Bearbeiten action_edit: Bearbeiten
action_other_price: Kopieren action_other_price: Kopieren
stock_article_form:
copy_stock_article: Lagerartikel kopieren
stock_change_fields: stock_change_fields:
remove_article: Artikel aus Lieferung entfernen remove_article: Artikel aus Lieferung entfernen
suppliers_overview: Lieferantenübersicht suppliers_overview: Lieferantenübersicht
update: update:
notice: Lieferung wurde aktualisiert. notice: Lieferung wurde aktualisiert.
update_stock_article:
notice: Lagerartikel »%{name}« aktualisiert.
documents: documents:
order_by_articles: order_by_articles:
filename: Bestellung %{name}-%{date} - Artikelsortierung filename: Bestellung %{name}-%{date} - Artikelsortierung
@ -494,26 +481,20 @@ de:
alert: ! 'Ein Fehler ist beim Abrechnen aufgetreten: %{message}' alert: ! 'Ein Fehler ist beim Abrechnen aufgetreten: %{message}'
notice: Bestellung wurde erfolgreich abgerechnet, die Kontostände aktualisiert. notice: Bestellung wurde erfolgreich abgerechnet, die Kontostände aktualisiert.
close_direct: close_direct:
alert: ! 'Bestellung kann nicht geschlossen werden: %{message}' alert: ! 'Bestellung kann nicht abgerechnet werden: %{message}'
notice: Bestellung wurde geschlossen. notice: Bestellung wurde abgerechnet.
confirm: confirm:
clear: Abschließen clear: Abrechnen
first_paragraph: ! 'Wenn die Bestellung abgeschlossen wird, werden ebenfalls alle Gruppenkonten aktualisiert.<br />Die Konten werden wie folgt belastet:' first_paragraph: ! 'Wenn die Bestellung abgerechnet wird, werden ebenfalls alle Gruppenkonten aktualisiert.<br />Die Konten werden wie folgt belastet:'
or_cancel: oder zurück zur Abrechnung or_cancel: oder zurück zur Abrechnung
title: Bestellung abrechnen title: Bestellung abrechnen
edit_results_by_articles: edit_results_by_articles:
add_article: Artikel hinzufügen add_article: Artikel hinzufügen
amount: Menge amount: Menge
amount_per_unit: GebGr * Einheit
article: Artikel
gross: Brutto gross: Brutto
net: Netto net: Netto
number: Nr.
refund: Pfand
tax: MwSt
group_order_articles: group_order_articles:
add_group: Gruppe hinzufügen add_group: Gruppe hinzufügen
group: Gruppe
total: Gesamtpreis total: Gesamtpreis
total_fc: Summe (FC-Preis) total_fc: Summe (FC-Preis)
units: Einheiten units: Einheiten
@ -534,7 +515,7 @@ de:
articles_overview: Artikelübersicht articles_overview: Artikelübersicht
comment_on_transaction: Hier kannst Du deine Abrechnung kommentieren comment_on_transaction: Hier kannst Du deine Abrechnung kommentieren
comments: Kommentare comments: Kommentare
confirm_order: Bestellung abschließen confirm_order: Bestellung abrechnen
create_invoice: Rechnung anlegen create_invoice: Rechnung anlegen
edit_note: Notiz bearbeiten edit_note: Notiz bearbeiten
edit_order: Bestellung bearbeiten edit_order: Bestellung bearbeiten
@ -549,8 +530,8 @@ de:
orders: orders:
clear: abrechnen clear: abrechnen
cleared: abgerechnet (%{amount}) cleared: abgerechnet (%{amount})
close: direkt schließen close: direkt abrechnen
confirm: Wirklich die Bestellung schließen setzen? confirm: Wirklich die Bestellung abrechnen?
end: Ende end: Ende
ended: beendet ended: beendet
last_edited_by: Zuletzt bearbeitet von last_edited_by: Zuletzt bearbeitet von
@ -588,38 +569,24 @@ de:
paragraph: Hier kannst du der Bestellgruppe <b>%{name}</b> Geld gutschreiben/abziehen. paragraph: Hier kannst du der Bestellgruppe <b>%{name}</b> Geld gutschreiben/abziehen.
title: Neue Transaktion title: Neue Transaktion
new_collection: new_collection:
amount: Betrag
new_ordergroup: Weitere Bestellgruppe hinzufügen new_ordergroup: Weitere Bestellgruppe hinzufügen
note: Notiz
ordergroup: Bestellgruppe
save: Transaktionen speichern save: Transaktionen speichern
sidebar: Hier kannst Du mehrere Konten gleichzeitig aktualsieren. Z.B. alle Überweisungen der Bestellgruppen aus einem Kontoauszug. sidebar: Hier kannst Du mehrere Konten gleichzeitig aktualsieren. Z.B. alle Überweisungen der Bestellgruppen aus einem Kontoauszug.
title: Mehrere Konten aktualisieren title: Mehrere Konten aktualisieren
ordergroup: ordergroup:
remove: Entfernen remove: Entfernen
remove_group: Gruppe enfernen remove_group: Gruppe enfernen
transactions:
amount: Betrag
date: Datum
note: Notiz
who: Wer
group_order_articles: group_order_articles:
form: form:
amount_change_for: Mengenänderung für %{article} amount_change_for: Mengenänderung für %{article}
result_hint: ! 'Einheit: %{unit}' result_hint: ! 'Einheit: %{unit}'
index: index:
amount: Betrag
amount_fc: Betrag(FC) amount_fc: Betrag(FC)
clear: Abrechnen
date: Datum
end: Ende end: Ende
everything_cleared: Super, alles schon abgerechnet... everything_cleared: Super, alles schon abgerechnet...
group: Gruppe
last_transactions: Letzte Überweisungen last_transactions: Letzte Überweisungen
note: Notiz
open_transactions: Noch nicht abgerechnet open_transactions: Noch nicht abgerechnet
show_all: alle anzeigen show_all: alle anzeigen
supplier: Lieferantin
title: Finanzbereich title: Finanzbereich
unpaid_invoices: Unbezahlte Rechnungen unpaid_invoices: Unbezahlte Rechnungen
invoices: invoices:
@ -630,7 +597,6 @@ de:
title: Rechnungen title: Rechnungen
invoices: invoices:
confirm_delete: Bist Du sicher? confirm_delete: Bist Du sicher?
delivery: Lieferung
linked: Diese Rechnung ist mit %{what_link} verknüpft. linked: Diese Rechnung ist mit %{what_link} verknüpft.
linked_delivery: einer Lieferung linked_delivery: einer Lieferung
linked_order: einer Bestellung linked_order: einer Bestellung
@ -652,10 +618,7 @@ de:
search_placeholder: Suchen ... search_placeholder: Suchen ...
title: Konten verwalten title: Konten verwalten
ordergroups: ordergroups:
account_balance: Kontostand
account_statement: Kontoauszug account_statement: Kontoauszug
contact: Kontakt
name: Name
new_transaction: Neue Transaktion new_transaction: Neue Transaktion
update: update:
notice: Rechnung wurde aktualisiert. notice: Rechnung wurde aktualisiert.
@ -666,10 +629,6 @@ de:
only_active: Nur aktive only_active: Nur aktive
only_active_desc: (mindestens einmal in den letzten 3 Monaten bestellt) only_active_desc: (mindestens einmal in den letzten 3 Monaten bestellt)
title: Bestellgruppen title: Bestellgruppen
ordergroups:
last_ordered: zuletzt bestellt
name: Name
user: Mitglieder
users: users:
index: index:
body: <p>Hier kannst Du den Mitgliedern Deiner Foodcoop eine Nachricht schreiben.</p> <p>Damit Deine Kontaktdaten einzusehen sind, musst Du sie unter %{profile_link} freigeben.</p> body: <p>Hier kannst Du den Mitgliedern Deiner Foodcoop eine Nachricht schreiben.</p> <p>Damit Deine Kontaktdaten einzusehen sind, musst Du sie unter %{profile_link} freigeben.</p>
@ -705,30 +664,14 @@ de:
notfound: Fehlerhafte URL, das ist nicht Deine Bestellung. notfound: Fehlerhafte URL, das ist nicht Deine Bestellung.
form: form:
action_save: Bestellung speichern action_save: Bestellung speichern
amount: Menge
available: Verfügbar
available_funds: Verfügbares Guthaben
created_by: Erstellt von
ending: Ende
funds: Guthaben
last_update: Zuletzt bestellt
manufacturer: Hersteller
min_quantity: Mindestbestellmenge
name: Name
new_funds: Neuer Kontostand new_funds: Neuer Kontostand
note: Notiz
price: Preis price: Preis
reset_article_search: Suche zurücksetzen reset_article_search: Suche zurücksetzen
search_article: Artikel suchen... search_article: Artikel suchen...
sum: Summe sum_amount: Gesamtbestellmenge bisher
sum_amount: ! 'Gesamtbestellmenge bisher:'
supplier: Lieferant
title: Bestellen title: Bestellen
tolerance: Toleranz
total_sum_amount: Gesamtbetrag total_sum_amount: Gesamtbetrag
total_tolerance: Gesamt-Toleranz total_tolerance: Gesamt-Toleranz
unit: Einheit
unit_missing: Fehlende Einheiten
units: Gebinde units: Gebinde
units_full: Volle Gebinde units_full: Volle Gebinde
units_total: Gesamt-Einheiten units_total: Gesamt-Einheiten
@ -740,8 +683,6 @@ de:
title: Nicht abgerechnete Bestellungen title: Nicht abgerechnete Bestellungen
total_sum: Gesamtsumme total_sum: Gesamtsumme
funds: funds:
account_balance: Kontostand
available_funds: verfügbares Guthaben
finished_orders: nicht abgerechnete Bestellungen finished_orders: nicht abgerechnete Bestellungen
open_orders: Laufende Bestellungen open_orders: Laufende Bestellungen
title: Guthaben title: Guthaben
@ -750,14 +691,9 @@ de:
not_enough_apples: Um zu Bestellen brauchst Du mindestends %{stop_ordering_under} Äpfel. Momentan hat Deine Bestellgruppe aber nur %{apples} Äpfel. not_enough_apples: Um zu Bestellen brauchst Du mindestends %{stop_ordering_under} Äpfel. Momentan hat Deine Bestellgruppe aber nur %{apples} Äpfel.
order: order:
title: Artikel title: Artikel
orders:
ending: Ende
sum: Summe
supplier: Lieferantin
show: show:
articles: articles:
edit_order: Bestellung anpassen edit_order: Bestellung anpassen
name: Name
not_ordered_msg: Du hast noch nicht bestellt not_ordered_msg: Du hast noch nicht bestellt
order_closed_msg: Die Bestellung is leider schon zu Ende. Beim nächsten mal früher aufstehen... order_closed_msg: Die Bestellung is leider schon zu Ende. Beim nächsten mal früher aufstehen...
order_nopen_title: Unter Berücksichtigung der derzeitigen Bestellungen aller Gruppen order_nopen_title: Unter Berücksichtigung der derzeitigen Bestellungen aller Gruppen
@ -767,21 +703,14 @@ de:
ordered: Bestellt ordered: Bestellt
ordered_title: Menge + Toleranz ordered_title: Menge + Toleranz
show_hide: Zeige/Verstecke nicht bestellte Artikel show_hide: Zeige/Verstecke nicht bestellte Artikel
sum: Summe show_note: Notiz zeigen
title: Artikelübersicht title: Artikelübersicht
total_price: Gesamtpreis
unit_price: Einzelpreis unit_price: Einzelpreis
units: Gebinde
closed_by: Abgerechnet von %{user}
comment: Kommentare lesen/schreiben comment: Kommentare lesen/schreiben
comments: comments:
title: Kommentare title: Kommentare
ending: Ende
not_ordered: Du hast nicht bestellt. not_ordered: Du hast nicht bestellt.
note: Notiz
order_sum: Bestellsumme
sum: Summe sum: Summe
supplier: Lieferantin
title: Dein Bestellergebnis für %{order} title: Dein Bestellergebnis für %{order}
switch_order: switch_order:
remaining: noch %{remaining} remaining: noch %{remaining}
@ -815,6 +744,7 @@ de:
create: Nachricht verschicken create: Nachricht verschicken
tasks: tasks:
required_users: Es fehlen %{count} Mitstreiterinnen! required_users: Es fehlen %{count} Mitstreiterinnen!
task_title: ! '%{name} (%{duration}h)'
home: home:
apple_bar: apple_bar:
desc: ! 'Abgebildet ist das Verhältnis von erledigten Aufgaben zu dem Bestellvolumen Deiner Bestellgruppe im Vergleich zum Durchschnitt in der Foodcoop. Konkret: Pro %{amount} Bestellsumme solltest Du eine Aufgabe machen!' desc: ! 'Abgebildet ist das Verhältnis von erledigten Aufgaben zu dem Bestellvolumen Deiner Bestellgruppe im Vergleich zum Durchschnitt in der Foodcoop. Konkret: Pro %{amount} Bestellsumme solltest Du eine Aufgabe machen!'
@ -832,12 +762,8 @@ de:
last_update: Letzte Aktualisiering ist %{when} her last_update: Letzte Aktualisiering ist %{when} her
title: Meine Bestellgruppe title: Meine Bestellgruppe
transactions: transactions:
amount: Betrag
note: Notiz
title: Letzte Transaktionen title: Letzte Transaktionen
view: Kontoauszug anzeigen view: Kontoauszug anzeigen
when: Wann
where: Wer
ordergroup: ordergroup:
title: Engagement Deiner Bestellgruppe title: Engagement Deiner Bestellgruppe
tasks_move: tasks_move:
@ -1155,10 +1081,8 @@ de:
orders: orders:
articles: articles:
article_count: ! 'Bestellte Artikel:' article_count: ! 'Bestellte Artikel:'
name: Name
prices: Netto-/Bruttopreis prices: Netto-/Bruttopreis
prices_sum: ! 'Summe (Netto/Brutto-Preise):' prices_sum: ! 'Summe (Netto/Brutto-Preise):'
unit_quantity: Gebinde
units_full: Volle Gebinde units_full: Volle Gebinde
units_ordered: Bestellte Einheiten units_ordered: Bestellte Einheiten
create: create:
@ -1177,26 +1101,18 @@ de:
notice: Die Bestellung wurde beendet. notice: Die Bestellung wurde beendet.
form: form:
ignore_warnings: Warnungen ignorieren ignore_warnings: Warnungen ignorieren
name: Name
note: Notiz
origin: Herkunft
prices: Price (netto/FC) prices: Price (netto/FC)
select_all: Alle auswählen select_all: Alle auswählen
stockit: Verfügbar stockit: Verfügbar
supplier: Hersteller
title: Artikel title: Artikel
unit_quantity: Gebinde
index: index:
action_end: Beenden action_end: Beenden
confirm_delete: Willst Du wirklich die Bestellung löschen? confirm_delete: Willst Du wirklich die Bestellung löschen?
confirm_end: Willst Du wirklich die Bestellung %{order} beenden? Es gibt kein zurück. confirm_end: Willst Du wirklich die Bestellung %{order} beenden? Es gibt kein zurück.
ended_orders: Beendete Bestellungen ended_orders: Beendete Bestellungen
ending: Ende
new_order: Neue Bestellung anlegen new_order: Neue Bestellung anlegen
no_open_orders: Derzeit gibt es keine laufende Bestellungen. no_open_orders: Derzeit gibt es keine laufende Bestellungen.
note: Notiz
open_orders: Laufende Bestellungen open_orders: Laufende Bestellungen
supplier: Lieferantin
title: Bestellungen verwalten title: Bestellungen verwalten
model: model:
error_closed: Bestellung wurde schon abgerechnet error_closed: Bestellung wurde schon abgerechnet
@ -1208,17 +1124,11 @@ de:
warning_ordered_stock: ! 'Warnung: Die rot markierten Artikel wurden in der laufenden Lagerbestellung bereits bestellt bzw. gekauft. Wenn Du sie hier abwählst, werden alle bestehenden Bestellungen bzw. Käufe dieses Artikels gelöscht und nicht abgerechnet!' warning_ordered_stock: ! 'Warnung: Die rot markierten Artikel wurden in der laufenden Lagerbestellung bereits bestellt bzw. gekauft. Wenn Du sie hier abwählst, werden alle bestehenden Bestellungen bzw. Käufe dieses Artikels gelöscht und nicht abgerechnet!'
new: new:
title: Neue Bestellung anlegen title: Neue Bestellung anlegen
orders:
ending: Ende
start: Start
status: Status
supplier: Lieferantin
show: show:
action_end: Beenden! action_end: Beenden!
amounts: ! 'Netto/Bruttosumme:' amounts: ! 'Netto/Bruttosumme:'
articles: Artikelübersicht articles: Artikelübersicht
articles_ordered: ! 'Bestellte Artikel:' articles_ordered: ! 'Bestellte Artikel:'
begin: ! 'Beginn:'
comments: comments:
title: Kommentare title: Kommentare
comments_link: Kommentare comments_link: Kommentare
@ -1226,7 +1136,6 @@ de:
confirm_end: ! 'Willst Du wirklich die Bestellung %{order} beenden? confirm_end: ! 'Willst Du wirklich die Bestellung %{order} beenden?
Es gibt kein zurück.' Es gibt kein zurück.'
created_by: ! 'Erstellt von:'
download: download:
article_pdf: Artikel PDF article_pdf: Artikel PDF
download_file: Download file download_file: Download file
@ -1235,12 +1144,9 @@ de:
group_pdf: Gruppen PDF group_pdf: Gruppen PDF
matrix_pdf: Matrix PDF matrix_pdf: Matrix PDF
title: Download title: Download
ending: ! 'Ende:'
group_orders: ! 'Gruppenbestellungen:' group_orders: ! 'Gruppenbestellungen:'
note: ! 'Notiz:'
sort_article: Sortiert nach Artikeln sort_article: Sortiert nach Artikeln
sort_group: Sortiert nach Gruppen sort_group: Sortiert nach Gruppen
supplier: ! 'Lieferantin:'
title: ! 'Bestellung: %{name}' title: ! 'Bestellung: %{name}'
warn_not_closed: Achtung, Bestellung wurde noch nicht abgerechnet. warn_not_closed: Achtung, Bestellung wurde noch nicht abgerechnet.
state: state:
@ -1332,29 +1238,23 @@ de:
shared: shared:
articles: articles:
ordered: Bestellt ordered: Bestellt
ordered_desc: ordered_desc: Anzahl der Artikel die durch das Mitglied bestellt wurden (Menge + Toleranz)
received: Bekommen received: Bekommen
received_desc: received_desc: Anzahl der Artikel die ein Mitglied erhält
articles_by_articles: articles_by_articles:
ordergroup: Bestellgruppe ordergroup: Bestellgruppe
price: Gesamtpreis price: Gesamtpreis
articles_by_groups: articles_by_groups:
fc_price: FC-Preis fc_price: FC-Preis
fc_price_desc: Preis incl. MwSt, Pfand und Foodcoop-Aufschlag fc_price_desc: Preis incl. MwSt, Pfand und Foodcoop-Aufschlag
name: Name
price: Gesamtpreis price: Gesamtpreis
unit: Einheit
unit_quantity: GebGr unit_quantity: GebGr
unit_quantity_desc: Gebindegröße unit_quantity_desc: Gebindegröße
group: group:
access: Zugriff auf access: Zugriff auf
activated: aktiviert activated: aktiviert
address: Adresse
apple_limit: Äpfel-Bestellbeschränkung apple_limit: Äpfel-Bestellbeschränkung
contact: Kontakt
deactivated: deaktiviert deactivated: deaktiviert
description: Beschreibung
members: Mitglieder
no_weekly_job: kein wöchentlicher Job definiert no_weekly_job: kein wöchentlicher Job definiert
weekly_job: Wöchentlicher Job weekly_job: Wöchentlicher Job
group_form_fields: group_form_fields:
@ -1363,12 +1263,9 @@ de:
title: Wöchentliche Jobs title: Wöchentliche Jobs
user_not_found: Keine Nutzerin gefunden user_not_found: Keine Nutzerin gefunden
open_orders: open_orders:
ending: Ende
no_open_orders: Derzeit gibt es keine laufenden Bestellungen no_open_orders: Derzeit gibt es keine laufenden Bestellungen
not_enough_apples: Achtung, Deine Bestellgruppe hat zu wenig Äpfel um Bestellen zu können! not_enough_apples: Achtung, Deine Bestellgruppe hat zu wenig Äpfel um Bestellen zu können!
supplier: Lieferantin
title: Laufende Bestellungen title: Laufende Bestellungen
total: Summe
total_sum: Gesamtsumme total_sum: Gesamtsumme
who_ordered: Wer hat bestellt? who_ordered: Wer hat bestellt?
workgroup_members: workgroup_members:
@ -1385,7 +1282,7 @@ de:
units_to_order: Wenn Du die Gesamtanzahl gelieferter Gebinde änderst, musst Du auch die individuelle Anzahl der einzelnen Bestellgruppen anpassen, indem Du auf den Artikelnamen klickst. Sie werden nicht automatisch neuberechnet und andernfalls werden den Bestellgruppen Artikel in Rechnung gestellt, die nicht geliefert wurden! units_to_order: Wenn Du die Gesamtanzahl gelieferter Gebinde änderst, musst Du auch die individuelle Anzahl der einzelnen Bestellgruppen anpassen, indem Du auf den Artikelnamen klickst. Sie werden nicht automatisch neuberechnet und andernfalls werden den Bestellgruppen Artikel in Rechnung gestellt, die nicht geliefert wurden!
update_current_price: Ändert auch den Preis für aktuelle Bestellungen update_current_price: Ändert auch den Preis für aktuelle Bestellungen
stock_article: stock_article:
copy_stock_article: copy:
name: Bitte ändern name: Bitte ändern
edit_stock_article: edit_stock_article:
price: <ul><li>Preisänderung gesperrt.</li><li>Bei Bedarf %{stock_article_copy_link}.</li></ul> price: <ul><li>Preisänderung gesperrt.</li><li>Bei Bedarf %{stock_article_copy_link}.</li></ul>
@ -1433,6 +1330,7 @@ de:
new_inventory: Neue Inventur anlegen new_inventory: Neue Inventur anlegen
title: Inventurübersicht title: Inventurübersicht
new: new:
amount: Menge
create: anlegen create: anlegen
stock_articles: Lagerartikel stock_articles: Lagerartikel
temp_inventory: vorläufigen Lagerbestand temp_inventory: vorläufigen Lagerbestand
@ -1458,23 +1356,18 @@ de:
stockit: stockit:
check: check:
not_empty: ! '%{name} kann nicht gelöscht werden. Der Lagerbestand ist nicht null.' not_empty: ! '%{name} kann nicht gelöscht werden. Der Lagerbestand ist nicht null.'
copy:
title: Lagerartikel kopieren
create:
notice: Neuer Lagerartikel »%{name}« gespeichert.
destroy: destroy:
notice: Artikel %{name} gelöscht. notice: Artikel %{name} gelöscht.
edit: edit:
title: Lagerartikel bearbeiten title: Lagerartikel bearbeiten
form: form:
copy_stock_article: Lagerartikel kopieren
price_hint: Um Chaos zu vermeiden können bis auf weiteres die Preise von angelegten Lagerartikeln nicht mehr verändert werden. price_hint: Um Chaos zu vermeiden können bis auf weiteres die Preise von angelegten Lagerartikeln nicht mehr verändert werden.
index: index:
article:
article: Artikel
available: verfügbar
category: Kategorie
ordered: davon bestellt
price: Preis
stock: im Lager
supplier: Lieferantin
unit: Einheit
vat: MwSt
confirm_delete: Bist Du sicher? confirm_delete: Bist Du sicher?
new_delivery: Neue Lieferung .. new_delivery: Neue Lieferung ..
new_stock_article: Neuen Lagerartikel anlegen new_stock_article: Neuen Lagerartikel anlegen
@ -1492,16 +1385,13 @@ de:
show: show:
change_quantity: Veränderung change_quantity: Veränderung
datetime: Zeitpunkt datetime: Zeitpunkt
delivery: Lieferung
new_quantity: Neuer Bestand new_quantity: Neuer Bestand
order: Bestellung
reason: Ereignis reason: Ereignis
stock_changes: Verlauf des Lagerbestands stock_changes: Verlauf des Lagerbestands
stock_taking: Inventur stock_article:
stock_create: confirm_delete:
notice: Lagerartikel wurde gespeichert. update:
stock_update: notice: Lagerartikel »%{name}« aktualisiert.
notice: Lagerartikel wurde gespeichert.
suppliers: suppliers:
create: create:
notice: Lieferant wurde erstellt notice: Lieferant wurde erstellt
@ -1538,11 +1428,6 @@ de:
notice: Du hast die Aufgabe übernommen notice: Du hast die Aufgabe übernommen
archive: archive:
title: Aufgabenarchiv title: Aufgabenarchiv
archive_tasks:
due_date: Fälligkeitsdatum
task: Betreff
task_format: ! '%{name} (%{duration}h)'
who: Verantwortliche Menschen
create: create:
notice: Aufgabe wurde erstellt notice: Aufgabe wurde erstellt
destroy: destroy:
@ -1566,11 +1451,8 @@ de:
accept_task: Aufgabe übernehmen accept_task: Aufgabe übernehmen
done: Erledigt done: Erledigt
done_q: Erledigt? done_q: Erledigt?
due_date: Fälligkeit
mark_done: Aufgabe als erledigt markieren mark_done: Aufgabe als erledigt markieren
reject_task: Aufgabe ablehnen reject_task: Aufgabe ablehnen
task: Betreff
task_format: ! '%{name} (%{duration}h)'
who: Wer machts? who: Wer machts?
who_hint: (Wie viele werden noch benötigt?) who_hint: (Wie viele werden noch benötigt?)
nav: nav:
@ -1607,6 +1489,7 @@ de:
title: Aufgaben für %{workgroup} title: Aufgaben für %{workgroup}
title_all: Alle Aufgaben der Gruppe title_all: Alle Aufgaben der Gruppe
ui: ui:
actions: Aktionen
close: Schließen close: Schließen
delete: Löschen delete: Löschen
edit: Bearbeiten edit: Bearbeiten

View File

@ -15,6 +15,7 @@ en:
name: Name name: Name
note: Note note: Note
order_number: Order number order_number: Order number
order_number_short: Nr.
origin: Origin origin: Origin
price: Price (net) price: Price (net)
supplier: Supplier supplier: Supplier
@ -22,6 +23,7 @@ en:
unit: Unit unit: Unit
unit_quantity: Unit quantity unit_quantity: Unit quantity
unit_quantity_short: U.Q. unit_quantity_short: U.Q.
units: Units
article_category: article_category:
description: Description description: Description
name: Name name: Name
@ -30,11 +32,20 @@ en:
note: Note note: Note
supplier: Supplier supplier: Supplier
financial_transaction: financial_transaction:
amount: amount amount: Amount
note: note created_on: Date
note: Note
ordergroup: Ordergroup
user: Entered by
group_order:
price: Order sum
updated_by: Last ordered by
group_order_article: group_order_article:
ordergroup_id: Ordergroup ordergroup_id: Ordergroup
quantity: Amount
result: Amount result: Amount
tolerance: Tolerance
total_price: Sum
invoice: invoice:
amount: Amount amount: Amount
date: Billing date date: Billing date
@ -54,20 +65,30 @@ en:
sent_to_all: Send to all members sent_to_all: Send to all members
subject: Subject subject: Subject
order: order:
closed_by: Settled by
created_by: Created by
ends: Ends at ends: Ends at
name: Supplier
note: Note note: Note
starts: Starts at starts: Starts at
status: Status
order_article: order_article:
missing_units: Missing units
missing_units_short: Missing
units_to_order: Amount of units units_to_order: Amount of units
update_current_price: Globally update current price update_current_price: Globally update current price
order_comment: order_comment:
text: Add comment to this order ... text: Add comment to this order ...
ordergroup: ordergroup:
account_balance: Account balance
available_funds: Available credit
contact: Contact
contact_address: Address contact_address: Address
contact_person: Contact person contact_person: Contact person
contact_phone: Phone contact_phone: Phone
description: Description description: Description
ignore_apple_restriction: Ignore order stop by apple points restriction ignore_apple_restriction: Ignore order stop by apple points restriction
last_order: Last order
name: Name name: Name
user_tokens: Members user_tokens: Members
page: page:
@ -75,10 +96,12 @@ en:
parent_id: Parent page parent_id: Parent page
title: Title title: Title
stock_article: stock_article:
available: Available
price: Price price: Price
quantity: Quantity quantity: In stock
quantity_available: Available quantity quantity_available: Available quantity
supplier: Supplier quantity_available_short: Avail.
quantity_ordered: Ordered
stock_taking: stock_taking:
date: Date date: Date
note: Note note: Note
@ -92,6 +115,7 @@ en:
fax: Fax fax: Fax
is_subscribed: subscribed? is_subscribed: subscribed?
min_order_quantity: Minimum order quantity min_order_quantity: Minimum order quantity
min_order_quantity_short: Min. quantity
name: Name name: Name
note: Note note: Note
order_howto: How to order order_howto: How to order
@ -103,13 +127,14 @@ en:
done: Done? done: Done?
due_date: Due date due_date: Due date
duration: Duration duration: Duration
name: Name name: Activity
required_users: People required required_users: People required
user_list: Responsible user user_list: Responsible users
workgroup: Workgroup workgroup: Workgroup
user: user:
email: Email email: Email
first_name: First name first_name: First name
last_login: Last login
last_name: Last name last_name: Last name
name: Name name: Name
nick: Username nick: Username
@ -156,7 +181,6 @@ en:
workgroup: Workgroup workgroup: Workgroup
admin: admin:
access_to: access to access_to: access to
actions: Actions
base: base:
index: index:
all_ordergroups: All ordergroups all_ordergroups: All ordergroups
@ -194,11 +218,6 @@ en:
workgroup: workgroup workgroup: workgroup
new: new:
title: Create ordergroup title: Create ordergroup
ordergroups:
address: Address
contact: Contact
members: Members
name: Name
show: show:
confirm: Are you sure? confirm: Are you sure?
edit: Edit group/members edit: Edit group/members
@ -217,20 +236,11 @@ en:
title: Create new user title: Create new user
show: show:
confirm: Do you really want to kick out %{user}? confirm: Do you really want to kick out %{user}?
email: Email
groupabos: Group subscriptions groupabos: Group subscriptions
member_since: Member since %{time} member_since: Member since %{time}
name: Name
nick: Nick
person: Person person: Person
phone: Phone
preference: Preferences preference: Preferences
send_message: Send message send_message: Send message
users:
email: email
last_login: last login
login: login
name: name
workgroups: workgroups:
destroy: destroy:
error: ! 'Workgroup could not be deleted: %{error}' error: ! 'Workgroup could not be deleted: %{error}'
@ -318,17 +328,9 @@ en:
submit: Update all articles submit: Update all articles
title: Edit all articles from %{supplier} title: Edit all articles from %{supplier}
warning: ! 'Warning: all articles will be updated!' warning: ! 'Warning: all articles will be updated!'
edit_all_table:
available_desc: available
available_short: avail
order_number_desc: Order number
order_number_short: Ordernr.
price_desc: Net price
price_short: Price
unit_quantity_desc: Unit quantity
unit_quantity_short: Quantity
form: form:
title: Add new article title_edit: Edit article
title_new: Add new article
import_search_results: import_search_results:
action_import: import action_import: import
already_imported: already imported already_imported: already imported
@ -385,24 +387,17 @@ en:
how_many_units: ! 'How many units (%{unit}) to deliver? Stock article name: %{name}.' how_many_units: ! 'How many units (%{unit}) to deliver? Stock article name: %{name}.'
create: create:
notice: Delivery was created. Please dont forget to create invoice! notice: Delivery was created. Please dont forget to create invoice!
create_stock_article:
notice: The new stock article "%{name}" was saved.
destroy: destroy:
notice: Delivery was deleted. notice: Delivery was deleted.
edit: edit:
title: Edit delivery title: Edit delivery
form: form:
actions: Tasks confirm_foreign_supplier_reedit: The stock article %{name} was successfully saved. However, it belongs to a different supplier than this delivery. Would you like to edit the stock article again?
article: Article
category: Category
create_from_blank: Create new article create_from_blank: Create new article
create_stock_article: Create stock article create_stock_article: Create stock article
price: Netprice
quantity: Quantity
title_fill_quantities: 2. Set delivery quantities title_fill_quantities: 2. Set delivery quantities
title_finish_delivery: 3. Finish delivery title_finish_delivery: 3. Finish delivery
title_select_stock_articles: 1. Select stock articles title_select_stock_articles: 1. Select stock articles
unit: Unit
index: index:
confirm_delete: Are you sure? confirm_delete: Are you sure?
new_delivery: ! 'Create new delivery for %{supplier} ' new_delivery: ! 'Create new delivery for %{supplier} '
@ -412,29 +407,21 @@ en:
new: new:
title: New delivery from %{supplier} title: New delivery from %{supplier}
show: show:
amount: Amount
article: Article
price: Netprice
sum: Sum sum: Sum
sum_diff: Gross - adjusted invoice ammount sum_diff: Gross - adjusted invoice amount
sum_gross: Gross sum sum_gross: Gross sum
sum_net: Net sum sum_net: Net sum
title: Show delivery title: Show delivery
title_articles: Article title_articles: Articles
unit: Unit
stock_article_for_adding: stock_article_for_adding:
action_add_to_delivery: Add to delivery action_add_to_delivery: Add to delivery
action_edit: Edit action_edit: Edit
action_other_price: Copy action_other_price: Copy
stock_article_form:
copy_stock_article: Copy stock article
stock_change_fields: stock_change_fields:
remove_article: Remove article from delivery remove_article: Remove article from delivery
suppliers_overview: Supplier overview suppliers_overview: Supplier overview
update: update:
notice: Delivery was updated. notice: Delivery was updated.
update_stock_article:
notice: The stock article "%{name}" was updated.
documents: documents:
order_by_articles: order_by_articles:
filename: Order %{name}-%{date} - by articles filename: Order %{name}-%{date} - by articles
@ -451,7 +438,7 @@ en:
- Ordered - Ordered
- Received - Received
- Price - Price
- Unit quantity - Unit Q.
- Unit - Unit
- Sum - Sum
sum: Sum sum: Sum
@ -496,28 +483,22 @@ en:
balancing: balancing:
close: close:
alert: ! 'An error occured while accounting: %{message}' alert: ! 'An error occured while accounting: %{message}'
notice: Order was accounted succesfully, the balance of the account was updated. notice: Order was settled succesfully, the balance of the account was updated.
close_direct: close_direct:
alert: ! 'Order can not be closed: %{message}' alert: ! 'Order can not be settled: %{message}'
notice: Order was closed. notice: Order was settled.
confirm: confirm:
clear: Close clear: Settle
first_paragraph: ! 'When the order is closed, all group accounts will be updated.<br />The accounts will be charged as follows:' first_paragraph: ! 'When the order is settled, all group accounts will be updated.<br />The accounts will be charged as follows:'
or_cancel: or back to accounting or_cancel: or back to accounting
title: Settle order title: Settle order
edit_results_by_articles: edit_results_by_articles:
add_article: Add article add_article: Add article
amount: Amount amount: Amount
amount_per_unit: Unit quantity * Unit
article: Article
gross: Gross gross: Gross
net: Net net: Net
number: Nr.
refund: Deposit
tax: Tax
group_order_articles: group_order_articles:
add_group: Add group add_group: Add group
group: Group
total: Total costs total: Total costs
total_fc: Sum (FC-price) total_fc: Sum (FC-price)
units: Units units: Units
@ -538,7 +519,7 @@ en:
articles_overview: Overview of articles articles_overview: Overview of articles
comment_on_transaction: Here you can add a comment to your accounting. comment_on_transaction: Here you can add a comment to your accounting.
comments: Comments comments: Comments
confirm_order: Close order confirm_order: Settle order
create_invoice: Create invoice create_invoice: Create invoice
edit_note: Edit note edit_note: Edit note
edit_order: Edit order edit_order: Edit order
@ -553,8 +534,8 @@ en:
orders: orders:
clear: accounting clear: accounting
cleared: accounted (%{amount}) cleared: accounted (%{amount})
close: close directly close: settle directly
confirm: Do you really want to fully close the order? confirm: Do you really want to settle the order?
end: End end: End
ended: closed ended: closed
last_edited_by: Last edited by last_edited_by: Last edited by
@ -593,38 +574,24 @@ en:
paragraph: Here you can credit and debit money for the order group <b>%{name}</b>. paragraph: Here you can credit and debit money for the order group <b>%{name}</b>.
title: New transaction title: New transaction
new_collection: new_collection:
amount: Amount
new_ordergroup: Add new order group new_ordergroup: Add new order group
note: Note
ordergroup: Order group
save: Save transaction save: Save transaction
sidebar: Here you can update more accounts at the same time. For example all transfers of the order group from one account statement sidebar: Here you can update more accounts at the same time. For example all transfers of the order group from one account statement.
title: Updating more accounts title: Updating more accounts
ordergroup: ordergroup:
remove: Remove remove: Remove
remove_group: Remove group remove_group: Remove group
transactions:
amount: Amount
date: Date
note: Note
who: Who
group_order_articles: group_order_articles:
form: form:
amount_change_for: Change amount for %{article} amount_change_for: Change amount for %{article}
result_hint: ! 'Unit: %{unit}' result_hint: ! 'Unit: %{unit}'
index: index:
amount: Amount
amount_fc: Amount(FC) amount_fc: Amount(FC)
clear: To account
date: Date
end: End end: End
everything_cleared: Great, everything is accounted... everything_cleared: Great, everything is accounted...
group: Group
last_transactions: Recent transactions last_transactions: Recent transactions
note: Note
open_transactions: Unsettled orders open_transactions: Unsettled orders
show_all: show all show_all: show all
supplier: Supplier
title: Finances title: Finances
unpaid_invoices: Unpaid invoices unpaid_invoices: Unpaid invoices
invoices: invoices:
@ -635,7 +602,6 @@ en:
title: Invoices title: Invoices
invoices: invoices:
confirm_delete: Are you sure? confirm_delete: Are you sure?
delivery: Delivery
linked: This invoice is linked to %{what_link}. linked: This invoice is linked to %{what_link}.
linked_delivery: a delivery linked_delivery: a delivery
linked_order: an order linked_order: an order
@ -657,10 +623,7 @@ en:
search_placeholder: Search ... search_placeholder: Search ...
title: Manage accounts title: Manage accounts
ordergroups: ordergroups:
account_balance: Account balance
account_statement: Account statement account_statement: Account statement
contact: Contact
name: Name
new_transaction: New transaction new_transaction: New transaction
receive: receive:
add_article: add_article:
@ -680,10 +643,6 @@ en:
only_active: Only active groups only_active: Only active groups
only_active_desc: (have placed order at least once in the last 3 months) only_active_desc: (have placed order at least once in the last 3 months)
title: Ordergroups title: Ordergroups
ordergroups:
last_ordered: Last ordered
name: Name
user: Users
users: users:
index: index:
body: <p>Here you can write a message to the members of your Foodcoop.</p> <p>You have to approve in your %{profile_link} that your contact details are visible.</p> body: <p>Here you can write a message to the members of your Foodcoop.</p> <p>You have to approve in your %{profile_link} that your contact details are visible.</p>
@ -719,30 +678,14 @@ en:
notfound: Incorrect URL, this is not your order. notfound: Incorrect URL, this is not your order.
form: form:
action_save: Save order action_save: Save order
amount: Amount
available: Available
available_funds: Available credits
created_by: Created by
ending: End
funds: Credit
last_update: Last ordered
manufacturer: Manufacturer
min_quantity: Minimum quantity
name: Name
new_funds: New account balance new_funds: New account balance
note: Note
price: Price price: Price
reset_article_search: Reset search reset_article_search: Reset search
search_article: Search for article... search_article: Search for articles...
sum: Sum
sum_amount: Current amount sum_amount: Current amount
supplier: Supplier
title: Orders title: Orders
tolerance: Tolerance
total_sum_amount: Total amount total_sum_amount: Total amount
total_tolerance: Total tolerance total_tolerance: Total tolerance
unit: Unit
unit_missing: Missing units
units: Units units: Units
units_full: Filled units units_full: Filled units
units_total: Total units units_total: Total units
@ -754,9 +697,7 @@ en:
title: Unsettled orders title: Unsettled orders
total_sum: Total sum total_sum: Total sum
funds: funds:
account_balance: Account balance finished_orders: Unsettled orders
available_funds: Available credit
finished_orders: unsettled orders
open_orders: Current orders open_orders: Current orders
title: Credit title: Credit
title: Orders overview title: Orders overview
@ -764,14 +705,9 @@ en:
not_enough_apples: You need at least %{stop_ordering_under} apples to order. Currently your order group has only %{apples} apples. not_enough_apples: You need at least %{stop_ordering_under} apples to order. Currently your order group has only %{apples} apples.
order: order:
title: Articles title: Articles
orders:
ending: End
sum: Sum
supplier: Suppliers
show: show:
articles: articles:
edit_order: Edit order edit_order: Edit order
name: Name
not_ordered_msg: You didnt place an order yet not_ordered_msg: You didnt place an order yet
order_closed_msg: Sorry, this order is closed. order_closed_msg: Sorry, this order is closed.
order_nopen_title: Considering current orders of all groups order_nopen_title: Considering current orders of all groups
@ -781,21 +717,14 @@ en:
ordered: Ordered ordered: Ordered
ordered_title: Amount + tolerance ordered_title: Amount + tolerance
show_hide: Show/hide articles not ordered show_hide: Show/hide articles not ordered
sum: Sum show_note: Show note
title: Article overview title: Article overview
total_price: Total price
unit_price: Unit price unit_price: Unit price
units: Units
closed_by: Settled by %{user}
comment: Comment comment: Comment
comments: comments:
title: Comments title: Comments
ending: End
not_ordered: You didnt order. not_ordered: You didnt order.
note: Note
order_sum: Order sum
sum: Sum sum: Sum
supplier: Suppliers
title: Your order result for %{order} title: Your order result for %{order}
switch_order: switch_order:
remaining: ! '%{remaining} remaining' remaining: ! '%{remaining} remaining'
@ -829,6 +758,7 @@ en:
create: send message create: send message
tasks: tasks:
required_users: ! '%{count} members are still needed!' required_users: ! '%{count} members are still needed!'
task_title: ! '%{name} (%{duration}h)'
home: home:
apple_bar: apple_bar:
desc: ! 'This shows the proportion of completed tasks to the volume of orders for your ordergroup in comparison to the average of the Foodcoop. In practice: for every %{amount} of total orders, you should execute a task!' desc: ! 'This shows the proportion of completed tasks to the volume of orders for your ordergroup in comparison to the average of the Foodcoop. In practice: for every %{amount} of total orders, you should execute a task!'
@ -843,15 +773,11 @@ en:
view_all: See all messages view_all: See all messages
my_ordergroup: my_ordergroup:
funds: ! '| Available Credit:' funds: ! '| Available Credit:'
last_update: Last Update was %{when} ago last_update: Last update was %{when} ago
title: My ordergroup title: My ordergroup
transactions: transactions:
amount: Amount
note: Note
title: Last Transactions title: Last Transactions
view: Show account statement view: Show account statement
when: When
where: Who
ordergroup: ordergroup:
title: Engagement of your ordergroup title: Engagement of your ordergroup
tasks_move: tasks_move:
@ -885,7 +811,7 @@ en:
admin: Administration admin: Administration
finances: finances:
accounts: Update accounts accounts: Update accounts
settle: To account orders settle: Account orders
title: Finances title: Finances
foodcoop: Foodcoop foodcoop: Foodcoop
members: Members members: Members
@ -1169,10 +1095,8 @@ en:
orders: orders:
articles: articles:
article_count: ! 'Ordered articles:' article_count: ! 'Ordered articles:'
name: Name
prices: Net/gross price prices: Net/gross price
prices_sum: ! 'Sum (net/gross price):' prices_sum: ! 'Sum (net/gross price):'
unit_quantity: Unit quantity
units_full: Full units units_full: Full units
units_ordered: Units ordered units_ordered: Units ordered
create: create:
@ -1191,26 +1115,18 @@ en:
notice: The order has been closed. notice: The order has been closed.
form: form:
ignore_warnings: Ignore warnings ignore_warnings: Ignore warnings
name: Name
note: Note
origin: Origin
prices: Prices (net/FC) prices: Prices (net/FC)
select_all: Select all select_all: Select all
stockit: In stock stockit: In stock
supplier: Producer
title: Article title: Article
unit_quantity: Unit quantity
index: index:
action_end: Close action_end: Close
confirm_delete: Do you really want to delete the order? confirm_delete: Do you really want to delete the order?
confirm_end: Do you really want to close the order %{order}? There is no going back. confirm_end: Do you really want to close the order %{order}? There is no going back.
ended_orders: Closed orders ended_orders: Closed orders
ending: End
new_order: Create new order new_order: Create new order
no_open_orders: There are currently no open orders. no_open_orders: There are currently no open orders.
note: Note
open_orders: Current orders open_orders: Current orders
supplier: Supplier
title: Manage orders title: Manage orders
model: model:
error_closed: Order was already settled error_closed: Order was already settled
@ -1218,21 +1134,15 @@ en:
error_starts_before_ends: must be after the start date (or remain empty) error_starts_before_ends: must be after the start date (or remain empty)
notice_close: ! 'Order: %{name}, until %{ends}' notice_close: ! 'Order: %{name}, until %{ends}'
stock: Stock stock: Stock
warning_ordered: ! 'Warning: Articles marked red have already been ordered within this open order. If you uncheck them here, all existing orders of these articles will be deleted.' warning_ordered: ! 'Warning: articles marked red have already been ordered within this open order. If you uncheck them here, all existing orders of these articles will be deleted.'
warning_ordered_stock: ! 'Warning: Articles marked red have already been ordered/ purchased within this open stock order. If you uncheck them here, all existing orders/ purchases of these articles will be deleted and it will not be accounted for them.' warning_ordered_stock: ! 'Warning: Articles marked red have already been ordered/purchased within this open stock order. If you uncheck them here, all existing orders/purchases of these articles will be deleted and it will not be accounted for them.'
new: new:
title: Create new order title: Create new order
orders:
ending: End
start: Start
status: Status
supplier: Supplier
show: show:
action_end: Close! action_end: Close!
amounts: ! 'Net/gross sum:' amounts: ! 'Net/gross sum:'
articles: Article overview articles: Article overview
articles_ordered: ! 'Ordered articles:' articles_ordered: ! 'Ordered articles:'
begin: ! 'Begin:'
comments: comments:
title: Comments title: Comments
comments_link: Comments comments_link: Comments
@ -1240,7 +1150,6 @@ en:
confirm_end: ! 'Do you really want to close the order %{order}? confirm_end: ! 'Do you really want to close the order %{order}?
There is no going back.' There is no going back.'
created_by: ! 'Created by:'
download: download:
article_pdf: Article PDF article_pdf: Article PDF
download_file: Download file download_file: Download file
@ -1249,12 +1158,9 @@ en:
group_pdf: Group PDF group_pdf: Group PDF
matrix_pdf: Matrix PDF matrix_pdf: Matrix PDF
title: Download title: Download
ending: ! 'End:'
group_orders: ! 'Group orders:' group_orders: ! 'Group orders:'
note: ! 'Note:'
sort_article: Sorted in articles sort_article: Sorted in articles
sort_group: Sorted in groups sort_group: Sorted in groups
supplier: ! 'Supplier:'
title: ! 'Order: %{name}' title: ! 'Order: %{name}'
warn_not_closed: Warning, order is not yet settled. warn_not_closed: Warning, order is not yet settled.
state: state:
@ -1269,7 +1175,7 @@ en:
recent_changes: Recent changes recent_changes: Recent changes
search: search:
action: Search action: Search
placeholder: Page title .. placeholder: Page title ...
site_map: Sitemap site_map: Sitemap
title: All Wiki pages title: All Wiki pages
title_list: List of pages title_list: List of pages
@ -1355,20 +1261,14 @@ en:
articles_by_groups: articles_by_groups:
fc_price: FC-Price fc_price: FC-Price
fc_price_desc: Price including taxes, deposit and Foodcoop-charge fc_price_desc: Price including taxes, deposit and Foodcoop-charge
name: Name
price: Total price price: Total price
unit: Unit
unit_quantity: Lot quantity unit_quantity: Lot quantity
unit_quantity_desc: How many units per lot. unit_quantity_desc: How many units per lot.
group: group:
access: Access to access: Access to
activated: activated activated: activated
address: Address
apple_limit: Apple points order limit apple_limit: Apple points order limit
contact: Contact
deactivated: deactivated deactivated: deactivated
description: Description
members: Members
no_weekly_job: No weekly job defined no_weekly_job: No weekly job defined
weekly_job: Weekly job weekly_job: Weekly job
group_form_fields: group_form_fields:
@ -1377,12 +1277,9 @@ en:
title: Weekly jobs title: Weekly jobs
user_not_found: No user found user_not_found: No user found
open_orders: open_orders:
ending: Ending
no_open_orders: There are no current orders no_open_orders: There are no current orders
not_enough_apples: Attention your order group has too few apple points to place an order! not_enough_apples: Attention your order group has too few apple points to place an order!
supplier: Supplier
title: Current orders title: Current orders
total: Sum
total_sum: Total sum total_sum: Total sum
who_ordered: Who ordered? who_ordered: Who ordered?
workgroup_members: workgroup_members:
@ -1392,19 +1289,19 @@ en:
default_message: Errors were found. Please check the form. default_message: Errors were found. Please check the form.
hints: hints:
article: article:
unit: ! 'For example: KG or 1L or 500g' unit: e.g. KG or 1L or 500g
message: message:
private: Message doesnt show in Foodsoft mail inbox private: Message doesnt show in Foodsoft mail inbox
order_article: order_article:
units_to_order: If you change the total amount of delivered units, you also have to change individual group amounts by clicking on the article name. They will not be automatically recalculated and so ordergroups may be accounted for articles that were not delivered! units_to_order: If you change the total amount of delivered units, you also have to change individual group amounts by clicking on the article name. They will not be automatically recalculated and so ordergroups may be accounted for articles that were not delivered!
update_current_price: Also update the price of the current order update_current_price: Also update the price of the current order
stock_article: stock_article:
copy_stock_article: copy:
name: Please modify name: Please modify
edit_stock_article: edit_stock_article:
price: <ul><li>Price changes are forbidden.</li><li>If necessary, %{stock_article_copy_link}.</li></ul> price: <ul><li>Price changes are forbidden.</li><li>If necessary, %{stock_article_copy_link}.</li></ul>
supplier: supplier:
min_order_quantity: The minimum amount which has to be orderd will be shown during the order process and should motivate ordering min_order_quantity: The minimum amount which has to be ordered will be shown during the order process and should motivate ordering
task: task:
duration: How long will the task take, 1-3 hours duration: How long will the task take, 1-3 hours
required_users: How many users will be needed in total? required_users: How many users will be needed in total?
@ -1447,6 +1344,7 @@ en:
new_inventory: Create new inventory new_inventory: Create new inventory
title: Inventory overview title: Inventory overview
new: new:
amount: Amount
create: create create: create
stock_articles: Stock articles stock_articles: Stock articles
temp_inventory: temporary inventory temp_inventory: temporary inventory
@ -1472,25 +1370,20 @@ en:
stockit: stockit:
check: check:
not_empty: ! '%{name} could not be deleted, the inventory is not zero.' not_empty: ! '%{name} could not be deleted, the inventory is not zero.'
copy:
title: Copy stock article
create:
notice: New stock article "%{name}" was created.
destroy: destroy:
notice: Article %{name} was deleted. notice: Article %{name} was deleted.
edit: edit:
title: Edit stock articles title: Edit stock articles
form: form:
copy_stock_article: copy stock article
price_hint: To avoid choas, it is not possible to edit the prices of already added stock articles until further notice. price_hint: To avoid choas, it is not possible to edit the prices of already added stock articles until further notice.
index: index:
article:
article: Article
available: available
category: Category
ordered: ordered
price: Price
stock: In stock
supplier: Supplier
unit: Unit
vat: VAT
confirm_delete: Are you sure you want to delete? confirm_delete: Are you sure you want to delete?
new_delivery: New delivery .. new_delivery: New delivery ...
new_stock_article: Add new stock article new_stock_article: Add new stock article
new_stock_taking: Add inventory new_stock_taking: Add inventory
order_online: Put stock order online order_online: Put stock order online
@ -1506,16 +1399,13 @@ en:
show: show:
change_quantity: Change change_quantity: Change
datetime: Time datetime: Time
delivery: Delivery
new_quantity: New quantity new_quantity: New quantity
order: Order
reason: Reason reason: Reason
stock_changes: Stock quantity changes stock_changes: Stock quantity changes
stock_taking: Inventory stock_article:
stock_create: confirm_delete: Are you sure you want to delete the stock article %{name}?
notice: Stock article was created. update:
stock_update: notice: Stock article %{name} was saved.
notice: Stock article was saved.
suppliers: suppliers:
create: create:
notice: Supplier was created notice: Supplier was created
@ -1552,11 +1442,6 @@ en:
notice: You have accepted the task notice: You have accepted the task
archive: archive:
title: Task archive title: Task archive
archive_tasks:
due_date: Due date
task: Subject
task_format: ! '%{name} (%{duration}h)'
who: People in charge
create: create:
notice: Task has been created notice: Task has been created
destroy: destroy:
@ -1580,11 +1465,8 @@ en:
accept_task: Accept task accept_task: Accept task
done: Done done: Done
done_q: Done? done_q: Done?
due_date: Due date
mark_done: Mark task as done mark_done: Mark task as done
reject_task: Reject task reject_task: Reject task
task: subject
task_format: ! '%{name} (%{duration}h)'
who: Who is doing it? who: Who is doing it?
who_hint: (How much are still needed?) who_hint: (How much are still needed?)
nav: nav:
@ -1621,6 +1503,7 @@ en:
title: Tasks for %{workgroup} title: Tasks for %{workgroup}
title_all: All group tasks title_all: All group tasks
ui: ui:
actions: Actions
close: Close close: Close
delete: Delete delete: Delete
edit: Edit edit: Edit

View File

@ -15,6 +15,7 @@ fr:
name: Nom name: Nom
note: Note note: Note
order_number: ! 'Numéro ' order_number: ! 'Numéro '
order_number_short: Numéro
origin: Lieu de production origin: Lieu de production
price: Prix net price: Prix net
supplier: supplier:
@ -22,6 +23,7 @@ fr:
unit: Unité unit: Unité
unit_quantity: Unités par lot unit_quantity: Unités par lot
unit_quantity_short: unit_quantity_short:
units: Lots
article_category: article_category:
description: Description description: Description
name: Nom name: Nom
@ -30,11 +32,20 @@ fr:
note: note:
supplier: Fournisseuse_r supplier: Fournisseuse_r
financial_transaction: financial_transaction:
amount: montant amount: Montant
note: note created_on: Date
note: Note
ordergroup: Cellule
user:
group_order:
price: Total de la commande
updated_by: Dernière commande
group_order_article: group_order_article:
ordergroup_id: Cellul ordergroup_id: Cellul
quantity: Quantité
result: Quantité result: Quantité
tolerance:
total_price: Total
invoice: invoice:
amount: Montant amount: Montant
date: Date de facturation date: Date de facturation
@ -54,20 +65,30 @@ fr:
sent_to_all: Envoyer à tous les membres sent_to_all: Envoyer à tous les membres
subject: Sujet subject: Sujet
order: order:
closed_by: Décompté par
created_by: Établi par
ends: Clôture le ends: Clôture le
name: FournisseurE
note: note:
starts: Ouverture le starts: Ouverture le
status:
order_article: order_article:
missing_units: Unités manquantes
missing_units_short:
units_to_order: Quantité units_to_order: Quantité
update_current_price: Mettre à jour le prix global update_current_price: Mettre à jour le prix global
order_comment: order_comment:
text: Commenter cette commande... text: Commenter cette commande...
ordergroup: ordergroup:
account_balance: Crédit initial
available_funds: Crédit disponible
contact: Contact
contact_address: Adresse contact_address: Adresse
contact_person: Personne à contacter contact_person: Personne à contacter
contact_phone: Téléphone contact_phone: Téléphone
description: Description description: Description
ignore_apple_restriction: Pour cette cellule, ne pas bloquer les commandes en cas de manque de glands ignore_apple_restriction: Pour cette cellule, ne pas bloquer les commandes en cas de manque de glands
last_order: dernière commande
name: Nom name: Nom
user_tokens: Membres user_tokens: Membres
page: page:
@ -75,10 +96,12 @@ fr:
parent_id: Page parente parent_id: Page parente
title: Titre title: Titre
stock_article: stock_article:
available: Disponible
price: Prix net price: Prix net
quantity: quantity: en Stock
quantity_available: quantity_available:
supplier: FournisseurE quantity_available_short:
quantity_ordered: Commandés
stock_taking: stock_taking:
date: date:
note: note:
@ -92,6 +115,7 @@ fr:
fax: Fa fax: Fa
is_subscribed: abonné? is_subscribed: abonné?
min_order_quantity: Quantité minimale à commander min_order_quantity: Quantité minimale à commander
min_order_quantity_short:
name: Nom name: Nom
note: Note note: Note
order_howto: Comment commander order_howto: Comment commander
@ -103,13 +127,14 @@ fr:
done: Fait? done: Fait?
due_date: Echéance due_date: Echéance
duration: Durée duration: Durée
name: Nom name:
required_users: Nombre de personnes nécessaires required_users: Nombre de personnes nécessaires
user_list: Responsables inscritEs user_list: Responsables inscritEs
workgroup: Équipe workgroup: Équipe
user: user:
email: Email email: Email
first_name: Prénom first_name: Prénom
last_login: Dernière connection
last_name: Nom de famille last_name: Nom de famille
name: Nom name: Nom
nick: Identifiant nick: Identifiant
@ -139,24 +164,23 @@ fr:
exclusion: répétition hebdomadaire invalide pour un boulot déjà effectué exclusion: répétition hebdomadaire invalide pour un boulot déjà effectué
models: models:
article: Article article: Article
article_category: la nouvelle catégorie article_category: Catégorie
delivery: le nouveau réapprovisionnement delivery: Réapprovisionnement
financial_transaction: la transaction financial_transaction: Transaction
invoice: la nouvelle facture invoice: Facture
message: Message message: Message
order: la nouvelle commande order: Commande
order_article: Article à commander order_article: Article à commander
order_comment: un nouveau commentaire order_comment: Commentaire
ordergroup: la nouvelle cellule ordergroup: Cellule
stock_article: l'article à stocker stock_article: l'article à stocker
stock_taking: Inventaire stock_taking: Inventaire
supplier: FournisseusE_r supplier: FournisseusE_r
task: comme nouveau boulot task: Boulot
user: le nouveau membre user: Membre
workgroup: la nouvelle équipe workgroup: Équipe
admin: admin:
access_to: accès à access_to: accès à
actions: Actions
base: base:
index: index:
all_ordergroups: Toutes les cellules all_ordergroups: Toutes les cellules
@ -194,11 +218,6 @@ fr:
workgroup: équipe workgroup: équipe
new: new:
title: Définir une nouvelle cellule title: Définir une nouvelle cellule
ordergroups:
address: Adresse
contact: Contact
members: Membres
name: Nom
show: show:
confirm: T'es sûrE de ton coup? confirm: T'es sûrE de ton coup?
edit: Modifier les données sur les cellules et/ou leurs membres edit: Modifier les données sur les cellules et/ou leurs membres
@ -217,20 +236,11 @@ fr:
title: Ajouter unE nouveLLE_eau membre title: Ajouter unE nouveLLE_eau membre
show: show:
confirm: Veux-tu vraiment expulser %{user}? confirm: Veux-tu vraiment expulser %{user}?
email: Email
groupabos: Participation à des équipes groupabos: Participation à des équipes
member_since: Membre depuis %{time} member_since: Membre depuis %{time}
name: Nom
nick: Identifiant
person: Personne person: Personne
phone: Numéro de téléphone
preference: Préférences preference: Préférences
send_message: Envoyer un message send_message: Envoyer un message
users:
email: email
last_login: dernière connection
login: identifiant
name: nom
workgroups: workgroups:
destroy: destroy:
error: ! 'Cette équipe n''a pas pu être supprimée: %{error}' error: ! 'Cette équipe n''a pas pu être supprimée: %{error}'
@ -318,17 +328,9 @@ fr:
submit: Mettre à jour tous les articles submit: Mettre à jour tous les articles
title: Modifier tous les articles de %{supplier} title: Modifier tous les articles de %{supplier}
warning: Attention, tous les articles sont en train d'être mis à jour! warning: Attention, tous les articles sont en train d'être mis à jour!
edit_all_table:
available_desc: disponible
available_short: disp.
order_number_desc: numéro de commande
order_number_short: n°
price_desc: Prix net
price_short: Prix
unit_quantity_desc: Unités par lot
unit_quantity_short: U/L
form: form:
title: Ajouter un nouvel article title_edit:
title_new: Ajouter un nouvel article
import_search_results: import_search_results:
action_import: importer action_import: importer
already_imported: déjà importé already_imported: déjà importé
@ -389,24 +391,17 @@ fr:
how_many_units: Combien d unités (%{unit}) de l article %{name} doivent-elles être livrées? how_many_units: Combien d unités (%{unit}) de l article %{name} doivent-elles être livrées?
create: create:
notice: Le réapprovisionnement a bien a été défini. Attention à ne pas oublier de déposer la facture correspondante! notice: Le réapprovisionnement a bien a été défini. Attention à ne pas oublier de déposer la facture correspondante!
create_stock_article:
notice: L'article "%{name}" a été ajouté au stock.
destroy: destroy:
notice: Le réapprovisionnement a été annulé. notice: Le réapprovisionnement a été annulé.
edit: edit:
title: Modifier le réapprovisionnement title: Modifier le réapprovisionnement
form: form:
actions: Options confirm_foreign_supplier_reedit:
article: Article
category: Catégorie
create_from_blank: Ajouter un nouvel article quelconque create_from_blank: Ajouter un nouvel article quelconque
create_stock_article: Ajouter un article au stock create_stock_article: Ajouter un article au stock
price: Prix net
quantity: Quantité
title_fill_quantities: 2. Définir la quantité à livrer title_fill_quantities: 2. Définir la quantité à livrer
title_finish_delivery: 3. Clore le réapprovisionnement title_finish_delivery: 3. Clore le réapprovisionnement
title_select_stock_articles: 1. Choisir les articles en stock title_select_stock_articles: 1. Choisir les articles en stock
unit: Unité
index: index:
confirm_delete: T'es sûrE de ton coup? confirm_delete: T'es sûrE de ton coup?
new_delivery: Réapprovisionner le stock par %{supplier} new_delivery: Réapprovisionner le stock par %{supplier}
@ -416,29 +411,21 @@ fr:
new: new:
title: Réapprovisionner le stock par %{supplier} title: Réapprovisionner le stock par %{supplier}
show: show:
amount: Quantité
article: Article
price: Prix net
sum: Prix total sum: Prix total
sum_diff: montant brut - montant net sum_diff: montant brut - montant net
sum_gross: prix total brut sum_gross: prix total brut
sum_net: prix total net sum_net: prix total net
title: Afficher le réapprovisionnement title: Afficher le réapprovisionnement
title_articles: Article title_articles: Articles
unit: Unité
stock_article_for_adding: stock_article_for_adding:
action_add_to_delivery: Commander action_add_to_delivery: Commander
action_edit: Modifier action_edit: Modifier
action_other_price: Copier action_other_price: Copier
stock_article_form:
copy_stock_article: Copier l'article
stock_change_fields: stock_change_fields:
remove_article: Retirer l'article de cette commande remove_article: Retirer l'article de cette commande
suppliers_overview: Liste des fournisseusEs_rs suppliers_overview: Liste des fournisseusEs_rs
update: update:
notice: La commande a été actualisée notice: La commande a été actualisée
update_stock_article:
notice: Les données de l'article "%{name}" ont été mises à jour.
documents: documents:
order_by_articles: order_by_articles:
filename: Commande %{name}-%{date} - Trier par filename: Commande %{name}-%{date} - Trier par
@ -518,16 +505,10 @@ fr:
edit_results_by_articles: edit_results_by_articles:
add_article: Ajouter un article add_article: Ajouter un article
amount: Quantité amount: Quantité
amount_per_unit: Poids d'un lot
article: Article
gross: Brut gross: Brut
net: Net net: Net
number: Numéro
refund: Consigne
tax: TVA
group_order_articles: group_order_articles:
add_group: Créer un nouveau groupe add_group: Créer un nouveau groupe
group: Groupe
total: Prix total total: Prix total
total_fc: Prix total (pour la boufcoop) total_fc: Prix total (pour la boufcoop)
units: Nombre d'unités units: Nombre d'unités
@ -602,38 +583,24 @@ fr:
paragraph: Cet espace permet de rajouter ou d'enlever du crédit à la cellule <b>%{name}</b>. paragraph: Cet espace permet de rajouter ou d'enlever du crédit à la cellule <b>%{name}</b>.
title: Nouvelle transaction title: Nouvelle transaction
new_collection: new_collection:
amount: Montant
new_ordergroup: Créer d'autres cellules new_ordergroup: Créer d'autres cellules
note: Note
ordergroup: Cellule
save: Sauvegarder les transactions save: Sauvegarder les transactions
sidebar: ! "Cet espace permet de mettre à jour plusieurs comptes simultanément, \npar exemple pour saisir les versements des cellules sur leurs comptes à partir d'un relevé." sidebar: ! "Cet espace permet de mettre à jour plusieurs comptes simultanément, \npar exemple pour saisir les versements des cellules sur leurs comptes à partir d'un relevé."
title: Mettre à jour plusieurs comptes title: Mettre à jour plusieurs comptes
ordergroup: ordergroup:
remove: Supprimer remove: Supprimer
remove_group: Supprimer cette cellule remove_group: Supprimer cette cellule
transactions:
amount: Montant
date: Date
note: Note
who: Qui?
group_order_articles: group_order_articles:
form: form:
amount_change_for: Modification de la quantité de %{article} amount_change_for: Modification de la quantité de %{article}
result_hint: result_hint:
index: index:
amount: Montant
amount_fc: Montant(boufcoop) amount_fc: Montant(boufcoop)
clear: Décompter
date: Date
end: Fin end: Fin
everything_cleared: Super, tout est a déjà été décompté! everything_cleared: Super, tout est a déjà été décompté!
group: Cellule
last_transactions: Dernières transactions last_transactions: Dernières transactions
note: Note
open_transactions: à décompter open_transactions: à décompter
show_all: tout afficher show_all: tout afficher
supplier: FournisseusE_r
title: Espace trésorerie title: Espace trésorerie
unpaid_invoices: Factures à régler unpaid_invoices: Factures à régler
invoices: invoices:
@ -644,7 +611,6 @@ fr:
title: Factures title: Factures
invoices: invoices:
confirm_delete: T'es sûrE de ton coup? confirm_delete: T'es sûrE de ton coup?
delivery: Réapprovisionnement
linked: Cette facture est associée à %{what_link}. linked: Cette facture est associée à %{what_link}.
linked_delivery: un réapprovisionnement linked_delivery: un réapprovisionnement
linked_order: une commande linked_order: une commande
@ -666,10 +632,7 @@ fr:
search_placeholder: Rechercher ... search_placeholder: Rechercher ...
title: Crédits des cellules title: Crédits des cellules
ordergroups: ordergroups:
account_balance: Crédit disponible
account_statement: Relevé de compte account_statement: Relevé de compte
contact:
name: Nom
new_transaction: Nouvelle transaction new_transaction: Nouvelle transaction
update: update:
notice: La facture a été mise à jour. notice: La facture a été mise à jour.
@ -680,10 +643,6 @@ fr:
only_active: Seulement les cellules en activité only_active: Seulement les cellules en activité
only_active_desc: (ayant commandé au moins une fois au cours des 3 derniers mois) only_active_desc: (ayant commandé au moins une fois au cours des 3 derniers mois)
title: Cellules title: Cellules
ordergroups:
last_ordered: dernière commande
name: Nom
user: Membres
users: users:
index: index:
body: ! '<p>Cette page sert à envoyer des messages aux autres membres de la coop.</p> body: ! '<p>Cette page sert à envoyer des messages aux autres membres de la coop.</p>
@ -723,30 +682,14 @@ fr:
notfound: ! ' Mauvaise adresse, ce n''est pas ta commande.' notfound: ! ' Mauvaise adresse, ce n''est pas ta commande.'
form: form:
action_save: Enregistrer ta commande action_save: Enregistrer ta commande
amount: Quantité
available: Disponible
available_funds: Crédit disponible
created_by: Établi par
ending: Clôture le
funds: Crédit
last_update: Dernière commande
manufacturer: Produit par
min_quantity: Quantité minimale
name: Nom
new_funds: Nouveau solde new_funds: Nouveau solde
note: Note
price: Prix price: Prix
reset_article_search: reset_article_search:
search_article: search_article:
sum: Prix total sum_amount: Quantité déjà commandée
sum_amount: ! 'Quantité déjà commandée:'
supplier: Fourni par
title: Commander title: Commander
tolerance: Tolérance
total_sum_amount: Montant total total_sum_amount: Montant total
total_tolerance: Tolérance totale total_tolerance: Tolérance totale
unit: Unité
unit_missing: Unités manquantes
units: Lots units: Lots
units_full: Lots complet units_full: Lots complet
units_total: Unités déjà commandées units_total: Unités déjà commandées
@ -758,8 +701,6 @@ fr:
title: Commandes par encore décomptées title: Commandes par encore décomptées
total_sum: Total total_sum: Total
funds: funds:
account_balance: Crédit initial
available_funds: Crédit disponible
finished_orders: montant prévu des commandes non décomptées finished_orders: montant prévu des commandes non décomptées
open_orders: montant des commandes en cours open_orders: montant des commandes en cours
title: Crédit title: Crédit
@ -770,14 +711,9 @@ fr:
alors que vous n''en avez que %{apples} pour le moment.' alors que vous n''en avez que %{apples} pour le moment.'
order: order:
title: Article title: Article
orders:
ending: Clôture le
sum: Total
supplier: FournisseusE_r
show: show:
articles: articles:
edit_order: Modifier ta commande edit_order: Modifier ta commande
name: Nom
not_ordered_msg: Tu n'as pas encore commandé not_ordered_msg: Tu n'as pas encore commandé
order_closed_msg: Désolé, cette commande a déjà été fermée. Il faudra te réveiller plus tôt la prochaine fois order_closed_msg: Désolé, cette commande a déjà été fermée. Il faudra te réveiller plus tôt la prochaine fois
order_nopen_title: En tenant compte des commandes en cours de toutes les cellules order_nopen_title: En tenant compte des commandes en cours de toutes les cellules
@ -787,21 +723,14 @@ fr:
ordered: Quantité souhaitée ordered: Quantité souhaitée
ordered_title: Quantité + tolérance ordered_title: Quantité + tolérance
show_hide: Montrer/cacher les articles non commandés show_hide: Montrer/cacher les articles non commandés
sum: Total show_note:
title: Aperçu des articles title: Aperçu des articles
total_price: Prix
unit_price: Prix unitaire unit_price: Prix unitaire
units: Lots
closed_by: Décompté par %{user}
comment: Lire/écrire des commentaire comment: Lire/écrire des commentaire
comments: comments:
title: Commentaire title: Commentaire
ending: Clôture le
not_ordered: Tu n'as pas commandé. not_ordered: Tu n'as pas commandé.
note: Note
order_sum: Total de la commande
sum: Total sum: Total
supplier: Fourni par
title: Ta part de la commande %{order} title: Ta part de la commande %{order}
switch_order: switch_order:
remaining: encore %{remaining} remaining: encore %{remaining}
@ -835,6 +764,7 @@ fr:
create: Envoyer un message create: Envoyer un message
tasks: tasks:
required_users: Il manque encore %{count} camarades! required_users: Il manque encore %{count} camarades!
task_title: ! '%{name} (%{duration}h)'
home: home:
apple_bar: apple_bar:
desc: ! 'Ce système de glands sert à comparer la durée du travail collectif auquel ta cellule a contribué (rapportée à la quantité commandée) avec desc: ! 'Ce système de glands sert à comparer la durée du travail collectif auquel ta cellule a contribué (rapportée à la quantité commandée) avec
@ -858,12 +788,8 @@ fr:
last_update: La dernière mise à jour date du %{when} last_update: La dernière mise à jour date du %{when}
title: Ta cellule title: Ta cellule
transactions: transactions:
amount: Montant
note: Note
title: Dernière transactions title: Dernière transactions
view: Afficher un relevé de compte view: Afficher un relevé de compte
when: Quand?
where: Qui?
ordergroup: ordergroup:
title: Niveau de participation de ta cellule title: Niveau de participation de ta cellule
tasks_move: tasks_move:
@ -1164,10 +1090,8 @@ fr:
orders: orders:
articles: articles:
article_count: ! 'Articles commandés:' article_count: ! 'Articles commandés:'
name: Nom
prices: Prix brut/net prices: Prix brut/net
prices_sum: ! 'Totaux (des prix bruts/nets):' prices_sum: ! 'Totaux (des prix bruts/nets):'
unit_quantity: Unités par lots x Lots
units_full: Lots complet units_full: Lots complet
units_ordered: Unités commandées units_ordered: Unités commandées
create: create:
@ -1186,26 +1110,18 @@ fr:
notice: La commande a été close. notice: La commande a été close.
form: form:
ignore_warnings: ignore_warnings:
name: Nom
note: Note
origin: Origine
prices: Prix (net/coop) prices: Prix (net/coop)
select_all: Tout sélectionner select_all: Tout sélectionner
stockit: Disponible stockit: Disponible
supplier: Productrice_teur
title: Article title: Article
unit_quantity: Lots
index: index:
action_end: Terminer action_end: Terminer
confirm_delete: Vraiment supprimer la commande? confirm_delete: Vraiment supprimer la commande?
confirm_end: Veux tu vraiment mettre fin à la commande %{order}? Attention, il n'y aura pas d'annulation possible. confirm_end: Veux tu vraiment mettre fin à la commande %{order}? Attention, il n'y aura pas d'annulation possible.
ended_orders: Commandes closes ended_orders: Commandes closes
ending: Clôture le
new_order: Définir une nouvelle commande new_order: Définir une nouvelle commande
no_open_orders: Il n'y a aucune commande en cours en ce moment. no_open_orders: Il n'y a aucune commande en cours en ce moment.
note: Note
open_orders: Commandes en cours open_orders: Commandes en cours
supplier: FournisseusE_r
title: Gestion des commandes title: Gestion des commandes
model: model:
error_closed: Cette commande a déjà été décomptée error_closed: Cette commande a déjà été décomptée
@ -1217,23 +1133,16 @@ fr:
warning_ordered_stock: warning_ordered_stock:
new: new:
title: Définir une nouvelle commande title: Définir une nouvelle commande
orders:
ending: Clôture le
start: Début
status: Statut
supplier: FournisseurE
show: show:
action_end: Clore! action_end: Clore!
amounts: ! 'Total net/brut:' amounts: ! 'Total net/brut:'
articles: Aperçu des articles articles: Aperçu des articles
articles_ordered: ! 'Articles commandés:' articles_ordered: ! 'Articles commandés:'
begin: ! 'Début:'
comments: comments:
title: Commentaire title: Commentaire
comments_link: Commenaire comments_link: Commenaire
confirm_delete: Veux-tu vraiment supprimer la commande? confirm_delete: Veux-tu vraiment supprimer la commande?
confirm_end: Veux tu vraiment terminer la commande %{order}? Pas d'annulation possible. confirm_end: Veux tu vraiment terminer la commande %{order}? Pas d'annulation possible.
created_by: ! 'Créée par:'
download: download:
article_pdf: Liste des articles en PDF article_pdf: Liste des articles en PDF
download_file: Télécharger download_file: Télécharger
@ -1242,12 +1151,9 @@ fr:
group_pdf: Liste des cellules en PDF group_pdf: Liste des cellules en PDF
matrix_pdf: Matrice de distribution en PDF matrix_pdf: Matrice de distribution en PDF
title: Télécharger title: Télécharger
ending: ! 'Clôture le:'
group_orders: ! 'Commandes des cellules:' group_orders: ! 'Commandes des cellules:'
note: ! 'Note:'
sort_article: Trié par article sort_article: Trié par article
sort_group: Trié par cellules sort_group: Trié par cellules
supplier: FournisseurE
title: ! 'Commande: %{name}' title: ! 'Commande: %{name}'
warn_not_closed: Attention, cette commande n'a pas encore été décomptée! warn_not_closed: Attention, cette commande n'a pas encore été décomptée!
state: state:
@ -1348,20 +1254,14 @@ fr:
articles_by_groups: articles_by_groups:
fc_price: Prix coop fc_price: Prix coop
fc_price_desc: Prix avec TVA, consigne et part de la coop inclus. fc_price_desc: Prix avec TVA, consigne et part de la coop inclus.
name: Nom
price: Prix total price: Prix total
unit: Unité
unit_quantity: U/L unit_quantity: U/L
unit_quantity_desc: Unités par lot unit_quantity_desc: Unités par lot
group: group:
access: Accès à access: Accès à
activated: activé activated: activé
address: Adresse
apple_limit: Minimum de glands apple_limit: Minimum de glands
contact: Contact
deactivated: désactivé deactivated: désactivé
description: Description
members: Membre
no_weekly_job: aucun boulot hebdomadaire n'a été défini no_weekly_job: aucun boulot hebdomadaire n'a été défini
weekly_job: Boulot hebdomadaire weekly_job: Boulot hebdomadaire
group_form_fields: group_form_fields:
@ -1370,12 +1270,9 @@ fr:
title: Boulots hebdomadaires title: Boulots hebdomadaires
user_not_found: Aucune utilisatrice n'a été trouvée. user_not_found: Aucune utilisatrice n'a été trouvée.
open_orders: open_orders:
ending: Clôture le
no_open_orders: Il n'y a aucune commande en cours en ce moment no_open_orders: Il n'y a aucune commande en cours en ce moment
not_enough_apples: Désolé, ta cellule n'a pas assez de glands pour pouvoir commander! not_enough_apples: Désolé, ta cellule n'a pas assez de glands pour pouvoir commander!
supplier: FournisseusE_r
title: Commandes en cours title: Commandes en cours
total: Total
total_sum: Total total_sum: Total
who_ordered: Qui a commandé? who_ordered: Qui a commandé?
workgroup_members: workgroup_members:
@ -1392,7 +1289,7 @@ fr:
units_to_order: units_to_order:
update_current_price: Modifie aussi le prix des commandes en cours update_current_price: Modifie aussi le prix des commandes en cours
stock_article: stock_article:
copy_stock_article: copy:
name: Merci de modifier name: Merci de modifier
edit_stock_article: edit_stock_article:
price: <ul><li>Modification du prix enregistrée. </li><li>Si nécessaire %{stock_article_copy_link}.</li></ul> price: <ul><li>Modification du prix enregistrée. </li><li>Si nécessaire %{stock_article_copy_link}.</li></ul>
@ -1440,6 +1337,7 @@ fr:
new_inventory: Inventorier le stock new_inventory: Inventorier le stock
title: Aperçu de l'inventaire title: Aperçu de l'inventaire
new: new:
amount:
create: ajouter create: ajouter
stock_articles: Articles en stock stock_articles: Articles en stock
temp_inventory: l'inventaire courant temp_inventory: l'inventaire courant
@ -1467,23 +1365,18 @@ fr:
stockit: stockit:
check: check:
not_empty: ! '%{name} ne peut pas être supprimé, car il y en a encore en stock.' not_empty: ! '%{name} ne peut pas être supprimé, car il y en a encore en stock.'
copy:
title: Copier l'article
create:
notice:
destroy: destroy:
notice: L'article %{name} a bien été supprimé du stock. notice: L'article %{name} a bien été supprimé du stock.
edit: edit:
title: Modifier l'article title: Modifier l'article
form: form:
copy_stock_article: copier l'article
price_hint: Pour éviter que ça soit le bazar, les prix des articles en stock ne peuvent plus être modifiés. price_hint: Pour éviter que ça soit le bazar, les prix des articles en stock ne peuvent plus être modifiés.
index: index:
article:
article: Article
available: disponible
category: Catégorie
ordered: commandés
price: Prix
stock: en Stock
supplier: FournisseusE_r
unit: Unité
vat: TVA
confirm_delete: T'es sûrE de ton coup? confirm_delete: T'es sûrE de ton coup?
new_delivery: Réapprovisionner le stock... new_delivery: Réapprovisionner le stock...
new_stock_article: Ajouter un article au stock new_stock_article: Ajouter un article au stock
@ -1501,16 +1394,13 @@ fr:
show: show:
change_quantity: Modification change_quantity: Modification
datetime: Temps datetime: Temps
delivery: Réapprovisionnement
new_quantity: Nouveau stock new_quantity: Nouveau stock
order: Commande
reason: Raison reason: Raison
stock_changes: Afficher l'historique stock_changes: Afficher l'historique
stock_taking: Inventaire stock_article:
stock_create: confirm_delete:
notice: L'article a été sauvegardé. update:
stock_update: notice: Les données de l'article "%{name}" ont été mises à jour.
notice: L'article a été sauvegardé.
suppliers: suppliers:
create: create:
notice: FournisseusE_r misE à jour notice: FournisseusE_r misE à jour
@ -1551,11 +1441,6 @@ fr:
notice: Tu as accepté ce boulot notice: Tu as accepté ce boulot
archive: archive:
title: Historique du boulot title: Historique du boulot
archive_tasks:
due_date: Échéance
task: Sujet
task_format: ! '%{name} (%{duration}h)'
who: Personnes en charge
create: create:
notice: Le boulot a bien été défini. notice: Le boulot a bien été défini.
destroy: destroy:
@ -1583,11 +1468,8 @@ fr:
accept_task: Te charger de ce boulot accept_task: Te charger de ce boulot
done: Effectué done: Effectué
done_q: Effectué? done_q: Effectué?
due_date: À faire pour le
mark_done: Marquer ce boulot comme étant effectué mark_done: Marquer ce boulot comme étant effectué
reject_task: Refuser ce boulot reject_task: Refuser ce boulot
task: Description
task_format: ! '%{name} (%{duration}h)'
who: Qui le fait? who: Qui le fait?
who_hint: (Combien manquent encore?) who_hint: (Combien manquent encore?)
nav: nav:
@ -1624,6 +1506,7 @@ fr:
title: Agenda de l'%{workgroup} title: Agenda de l'%{workgroup}
title_all: Boulot prévu pour l'équipe title_all: Boulot prévu pour l'équipe
ui: ui:
actions: Actions
close: Fermer close: Fermer
delete: Supprimer delete: Supprimer
edit: Modifier edit: Modifier

File diff suppressed because it is too large Load Diff

View File

@ -86,9 +86,14 @@ Foodsoft::Application.routes.draw do
end end
resources :stock_articles, :to => 'stockit' do resources :stock_articles, :to => 'stockit' do
get :copy
collection do collection do
get :articles_search get :derive
get :fill_new_stock_article_form
get :index_on_stock_article_create
get :index_on_stock_article_update
get :show_on_stock_article_update
end end
end end
@ -96,15 +101,12 @@ Foodsoft::Application.routes.draw do
get :shared_suppliers, :on => :collection get :shared_suppliers, :on => :collection
resources :deliveries do resources :deliveries do
post :add_stock_change, :on => :collection collection do
post :add_stock_change
get :new_stock_article, :on => :collection
get :copy_stock_article, :on => :collection get :form_on_stock_article_create
get :derive_stock_article, :on => :collection get :form_on_stock_article_update
post :create_stock_article, :on => :collection end
get :edit_stock_article, :on => :collection
put :update_stock_article, :on => :collection
end end
resources :articles do resources :articles do

View File

@ -4,20 +4,23 @@ Deployment
Setup Setup
-------- --------
cp config/deploy.rb.SAMPLE config/deploy.rb cp config/deploy.rb.SAMPLE config/deploy.rb
touch config/deploy/staging.rb touch config/deploy/staging.rb
touch config/deploy/production.rb touch config/deploy/production.rb
Deploy Deploy
-------- --------
On your first deploy you should run On your first deploy you should run
bundle exec cap deploy:setup
bundle exec cap deploy:check bundle exec cap deploy:setup
bundle exec cap deploy:check
Deploy to staging Deploy to staging
bundle exec cap deploy
bundle exec cap deploy
Deploy to production Deploy to production
bundle exec cap production deploy
bundle exec cap production deploy

View File

@ -17,6 +17,9 @@ Getting started
``` ```
git clone https://github.com/foodcoops/foodsoft.git git clone https://github.com/foodcoops/foodsoft.git
``` ```
This brings up the bleeding-edge development version, which might contain some
unfinished parts. If you want to be safe, choose the last release:
`git checkout $(git tag -l | grep ^v | sort -rn | head -n1)`
1. Install RVM and Ruby 1.9.3 (if you have not done so before): 1. Install RVM and Ruby 1.9.3 (if you have not done so before):
``` ```

View File

@ -0,0 +1,40 @@
# Publish/subscribe pattern
## Handling DOM updates after AJAX database manipulation
As an example, let us consider the manipulation (create, update...) of `StockArticles`. This can be done in different views, e.g., `stock_articles/index`, `stock_articles/show` and `deliveries/_form` through modals using AJAX requests. As an advantage of the AJAX technique, the user does not need to reload the entire page. However, (after the update of the `StockArticle` in the database) it is generally required to update the DOM in the current view such that the page properly reacts to the asynchronous actions.
The process can be divided in two steps: **1.** AJAX database manipulation and **2.** DOM updates for the particular view. The crucial point is the coupling of the two steps since the controller for the first step offers the same functionality to all views and does not need to know anything about the current view.
### 1. AJAX database manipulation
**(i)** Example: current view `deliveries/_form` offers a link for the AJAX action `StockArticle#new`. This opens a modal filled with `stock_articles/_form`.
**(ii)** AJAX form post addresses the `StockArticle#create` action which handles the database manipulation.
**(iii)** The database manipulation is finished by the rendering of, e.g., `stock_articles/create.js.erb`. The key task there is to **publish** the database changes by calling `trigger`, i.e.,
$(document).trigger({
type: 'StockArticle#create',
stock_article_id: <%= @stock_article.id %>
});
### 2. DOM updates for the particular view
**(i)** Each view has the opportunity to **subscribe** to particular events of the previous step. A very simple example is the update of the `stock_articles/index` view after `StockArticle#destroy`:
$(document).on('StockArticle#destroy', function(e) {
$('#stockArticle-' + e.stock_article_id).remove();
});
However, in most of the situations you will like to use the full power of the MVC framework in order to read new data from the database and render some partial. Let us consider this slightly more advanced case in the following.
The view `stock_articles/index` could listen (amongst others) to `StockArticle#create` like this:
$(document).on('StockArticle#create', function(e) {
$.ajax({
url: '#{index_on_stock_article_create_stock_articles_path}',
type: 'get',
data: {id: e.stock_article_id},
contentType: 'application/json; charset=UTF-8'
});
});
**(ii)** The action `StockArticles#index_on_stock_article_create` is a special helper action to handle DOM updates of the `stock_articles/index` view after the creation of a new `StockArticle` with the given `id`.

View File

@ -51,7 +51,7 @@ class PagesController < ApplicationController
end end
def create def create
@page = current_user.pages.build(params[:page]) @page = Page.new(params[:page].merge({:user => current_user}))
if params[:preview] if params[:preview]
render :action => 'new' render :action => 'new'

View File

@ -2,7 +2,8 @@ module PagesHelper
include WikiCloth include WikiCloth
def wikified_body(body, title = nil) def wikified_body(body, title = nil)
WikiCloth.new({:data => body+"\n", :link_handler => Wikilink.new, :params => {:referer => title}}).to_html.html_safe render_opts = {:locale => I18n.locale} # workaround for wikicloth 0.8.0 https://github.com/nricciar/wikicloth/pull/59
WikiCloth.new({:data => body+"\n", :link_handler => Wikilink.new, :params => {:referer => title}}).to_html(render_opts).html_safe
end end
def link_to_wikipage(page, text = nil) def link_to_wikipage(page, text = nil)

View File

@ -108,6 +108,9 @@ gem 'localeapp'" >>Gemfile
fi fi
# TODO add more extensive database seed # TODO add more extensive database seed
# XXX don't use redis for now
echo "Resque.inline = true" >config/initializers/resque.rb
# and push = deploy # and push = deploy
git add -A git add -A
git commit -q -m "heroku changes for environment ${RAILS_ENV}" -a git commit -q -m "heroku changes for environment ${RAILS_ENV}" -a

View File

@ -1,14 +1,26 @@
# optional test coverage # optional test coverage
# needs to be loaded first, e.g. add a require at top of spec_helper # needs to be loaded first, e.g. add a require at top of spec_helper
if ENV['COVERAGE'] if ENV['COVERAGE'] or ENV['COVERALLS']
require 'simplecov' require 'simplecov'
# update coveralls.io on Travis CI
if ENV['COVERALLS']
require 'coveralls'
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
end
# slightly tweaked coverage reporting
def cov_no_plugins(source_file, path)
source_file.filename =~ /#{path}/ and not source_file.filename =~ /\/lib\/foodsoft_.*\//
end
SimpleCov.start do SimpleCov.start do
add_filter '/spec/' add_filter '/spec/'
add_filter '/test/' add_filter '/test/'
add_group 'Models', '/app/models/' add_group 'Models' do |s| cov_no_plugins s, '/app/models/' end
add_group 'Controllers', '/app/controllers/' add_group 'Controllers' do |s| cov_no_plugins s, '/app/controllers/' end
add_group 'Helpers', '/app/helpers/' add_group 'Helpers' do |s| cov_no_plugins s, '/app/helpers/' end
add_group 'Documents', '/app/documents/' add_group 'Documents' do |s| cov_no_plugins s, '/app/documents/' end
add_group 'Libraries', '/lib/' add_group 'Libraries' do |s| cov_no_plugins s, '/lib/' end
add_group 'Plugins' do |s| s.filename =~ /\/lib\/foodsoft_.*\// end
end end
end end