Merge master branch of base
This commit is contained in:
commit
b5acd9b116
10 changed files with 1925 additions and 75 deletions
|
@ -38,6 +38,19 @@ $.fn.sorter = (function(){
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
// allow touch devices to work on click events
|
||||||
|
// http://stackoverflow.com/a/16221066
|
||||||
|
$.fn.extend({ _on: (function(){ return $.fn.on; })() });
|
||||||
|
$.fn.extend({
|
||||||
|
on: (function(){
|
||||||
|
var isTouchSupported = 'ontouchstart' in window || window.DocumentTouch && document instanceof DocumentTouch;
|
||||||
|
return function( types, selector, data, fn, one ) {
|
||||||
|
if (typeof types == 'string' && isTouchSupported && !(types.match(/touch/gi))) types = types.replace(/click/gi, 'touchstart');
|
||||||
|
return this._on( types, selector, data, fn);
|
||||||
|
};
|
||||||
|
}()),
|
||||||
|
});
|
||||||
|
|
||||||
// Load following statements, when DOM is ready
|
// Load following statements, when DOM is ready
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
|
|
|
@ -108,17 +108,7 @@ class Ordergroup < Group
|
||||||
|
|
||||||
# Make sure, the name is uniq, add usefull message if uniq group is already deleted
|
# Make sure, the name is uniq, add usefull message if uniq group is already deleted
|
||||||
def uniqueness_of_name
|
def uniqueness_of_name
|
||||||
id = new_record? ? '' : self.id
|
id = new_record? ? nil : self.id
|
||||||
group = Ordergroup.with_deleted.where('groups.id != ? AND groups.name = ?', id, name).first
|
|
||||||
if group.present?
|
|
||||||
message = group.deleted? ? :taken_with_deleted : :taken
|
|
||||||
errors.add :name, message
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Make sure, the name is uniq, add usefull message if uniq group is already deleted
|
|
||||||
def uniqueness_of_name
|
|
||||||
id = new_record? ? '' : self.id
|
|
||||||
group = Ordergroup.where('groups.id != ? AND groups.name = ?', id, name).first
|
group = Ordergroup.where('groups.id != ? AND groups.name = ?', id, name).first
|
||||||
if group.present?
|
if group.present?
|
||||||
message = group.deleted? ? :taken_with_deleted : :taken
|
message = group.deleted? ? :taken_with_deleted : :taken
|
||||||
|
|
|
@ -82,7 +82,7 @@ class Supplier < ActiveRecord::Base
|
||||||
|
|
||||||
# Make sure, the name is uniq, add usefull message if uniq group is already deleted
|
# Make sure, the name is uniq, add usefull message if uniq group is already deleted
|
||||||
def uniqueness_of_name
|
def uniqueness_of_name
|
||||||
id = new_record? ? '' : self.id
|
id = new_record? ? nil : self.id
|
||||||
supplier = Supplier.where('suppliers.id != ? AND suppliers.name = ?', id, name).first
|
supplier = Supplier.where('suppliers.id != ? AND suppliers.name = ?', id, name).first
|
||||||
if supplier.present?
|
if supplier.present?
|
||||||
message = supplier.deleted? ? :taken_with_deleted : :taken
|
message = supplier.deleted? ? :taken_with_deleted : :taken
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
%tr{:class => cycle("even","odd", :name => "order")}
|
%tr{:class => cycle("even","odd", :name => "order")}
|
||||||
%td= link_to truncate(order.name), new_finance_order_path(order_id: order.id)
|
%td= link_to truncate(order.name), new_finance_order_path(order_id: order.id)
|
||||||
%td=h format_time(order.ends) unless order.ends.nil?
|
%td=h format_time(order.ends) unless order.ends.nil?
|
||||||
%td= order.closed? ? t('.cleared', amount: number_to_currency(order.foodcoop_result)) : "beendet"
|
%td= order.closed? ? t('.cleared', amount: number_to_currency(order.foodcoop_result)) : t('.ended')
|
||||||
%td= order.updated_by.nil? ? '??' : order.updated_by.nick
|
%td= order.updated_by.nil? ? '??' : order.updated_by.nick
|
||||||
%td
|
%td
|
||||||
- unless order.closed?
|
- unless order.closed?
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
= t '.text', user: @user.nick, link: @link, expires: I18n.l(@user.reset_password_expires)
|
= raw t '.text', user: @user.nick, link: @link, expires: I18n.l(@user.reset_password_expires)
|
||||||
|
|
|
@ -22,17 +22,17 @@ default: &defaults
|
||||||
zip_code: "10997"
|
zip_code: "10997"
|
||||||
city: Berlin
|
city: Berlin
|
||||||
country: Deutschland
|
country: Deutschland
|
||||||
email: foodsoft@myfoodcoop.org
|
email: foodsoft@foodcoop.test
|
||||||
phone: "030 323 23249"
|
phone: "030 323 23249"
|
||||||
|
|
||||||
# Homepage
|
# Homepage
|
||||||
homepage: http://www.fctest.de
|
homepage: http://www.foodcoop.test
|
||||||
|
|
||||||
# foodsoft documentation URL
|
# foodsoft documentation URL
|
||||||
help_url: https://github.com/bennibu/foodsoft/wiki/Doku
|
help_url: https://github.com/foodcoops/foodsoft/wiki/Doku
|
||||||
|
|
||||||
# documentation URL for the apples&pears work system
|
# documentation URL for the apples&pears work system
|
||||||
applepear_url: https://github.com/bennibu/foodsoft/wiki/%C3%84pfel-u.-Birnen
|
applepear_url: https://github.com/foodcoops/foodsoft/wiki/%C3%84pfel-u.-Birnen
|
||||||
|
|
||||||
# price markup in percent
|
# price markup in percent
|
||||||
price_markup: 2.0
|
price_markup: 2.0
|
||||||
|
@ -46,17 +46,17 @@ default: &defaults
|
||||||
# stop_ordering_under: 75
|
# stop_ordering_under: 75
|
||||||
|
|
||||||
# email address to be used as sender
|
# email address to be used as sender
|
||||||
email_sender: foodsoft@myfoodcoop.org
|
email_sender: foodsoft@foodcoop.test
|
||||||
|
|
||||||
# If your foodcoop uses a mailing list instead of internal messaging system
|
# If your foodcoop uses a mailing list instead of internal messaging system
|
||||||
#mailing_list: list@myfoodcoop.org
|
#mailing_list: list@example.org
|
||||||
#mailing_list_subscribe: list-subscribe@myfoodcoop.org
|
#mailing_list_subscribe: list-subscribe@example.org
|
||||||
|
|
||||||
# Config for the exception_notification plugin
|
# Config for the exception_notification plugin
|
||||||
notification:
|
notification:
|
||||||
error_recipients:
|
error_recipients:
|
||||||
- admin@myfoodcoop.org
|
- admin@foodcoop.test
|
||||||
sender_address: "\"FoodSoft Error\" <foodsoft@myfoodcoop.org>"
|
sender_address: "\"FoodSoft Error\" <foodsoft@foodcoop.test>"
|
||||||
email_prefix: "[FoodSoft]"
|
email_prefix: "[FoodSoft]"
|
||||||
|
|
||||||
# Access to sharedLists, the external article-database
|
# Access to sharedLists, the external article-database
|
||||||
|
|
|
@ -190,11 +190,11 @@ de:
|
||||||
first_paragraph: Neue Mitglieder kannst du %{url} einladen.
|
first_paragraph: Neue Mitglieder kannst du %{url} einladen.
|
||||||
here: hier
|
here: hier
|
||||||
index:
|
index:
|
||||||
first_paragraph: Hier kannst du %{url} anlegen, Gruppen bearbeiten und löschen.
|
first_paragraph: Hier kannst du %{url} anlegen, bearbeiten und löschen.
|
||||||
new_workgroup: Neue Arbeitsgruppe anlegen
|
new_workgroup: Neue Arbeitsgruppe anlegen
|
||||||
new_workgroups: neue Arbeitsgruppen
|
new_workgroups: neue Arbeitsgruppen
|
||||||
ordergroup: Bestellgruppe
|
ordergroup: Bestellgruppe
|
||||||
second_paragraph: ! 'Beachte dabei den <em>Unterschied zwischen Gruppe und Bestellgruppe</em>: Eine %{url} hat ein Konto und kann Essen bestellen. In einer Arbeitsgruppe (z.b. ''Soritiergruppe'') koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten. Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören.'
|
second_paragraph: ! 'Beachte dabei den Unterschied zwischen <em>Gruppe</em> und <em>Bestellgruppe</em>: eine <em>%{url}</em> hat ein Konto und kann Essen bestellen. In einer Arbeitsgruppe (z.b. ''Soritiergruppe'') koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten. Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören.'
|
||||||
title: Arbeitsgruppen
|
title: Arbeitsgruppen
|
||||||
new:
|
new:
|
||||||
title: Arbeitsgruppe anlegen
|
title: Arbeitsgruppe anlegen
|
||||||
|
@ -302,7 +302,7 @@ de:
|
||||||
body: ! 'Folgende Artikel wurden ausgelistet und werden <b>gelöscht</b>:'
|
body: ! 'Folgende Artikel wurden ausgelistet und werden <b>gelöscht</b>:'
|
||||||
body_skip: Es müssen keine Artikel gelöscht werden.
|
body_skip: Es müssen keine Artikel gelöscht werden.
|
||||||
title: Auslisten ...
|
title: Auslisten ...
|
||||||
price_short: Price
|
price_short: Preis
|
||||||
submit: Alle löschen/aktualisieren
|
submit: Alle löschen/aktualisieren
|
||||||
title: Artikel mit externer Datenbank synchronisieren
|
title: Artikel mit externer Datenbank synchronisieren
|
||||||
unit_quantity_short: GebGr
|
unit_quantity_short: GebGr
|
||||||
|
@ -614,8 +614,9 @@ de:
|
||||||
close: direkt schließen
|
close: direkt schließen
|
||||||
confirm: Wirklich die Bestellung schließen setzen?
|
confirm: Wirklich die Bestellung schließen setzen?
|
||||||
end: Ende
|
end: Ende
|
||||||
last_edited_by: zuletzt bearbeitet von
|
ended: beendet
|
||||||
name: Name
|
last_edited_by: Zuletzt bearbeitet von
|
||||||
|
name: Lieferantin
|
||||||
no_closed_orders: derzeit gibt es keine beendeten Bestellungen
|
no_closed_orders: derzeit gibt es keine beendeten Bestellungen
|
||||||
state: Status
|
state: Status
|
||||||
summary:
|
summary:
|
||||||
|
|
|
@ -7,7 +7,7 @@ en:
|
||||||
general_msg: ! 'A problem has occured: %{msg}'
|
general_msg: ! 'A problem has occured: %{msg}'
|
||||||
messages:
|
messages:
|
||||||
accepted: has to be accepted
|
accepted: has to be accepted
|
||||||
blank: has to be filled
|
blank: has to be entered
|
||||||
confirmation: does not match the confirmation
|
confirmation: does not match the confirmation
|
||||||
empty: has to be entered
|
empty: has to be entered
|
||||||
equal_to: has to be exactly %{count}
|
equal_to: has to be exactly %{count}
|
||||||
|
@ -135,11 +135,11 @@ en:
|
||||||
first_paragraph: You can invite new members %{url}.
|
first_paragraph: You can invite new members %{url}.
|
||||||
here: here
|
here: here
|
||||||
index:
|
index:
|
||||||
first_paragraph: Here you can add a %{url}, administer a group or delete it.
|
first_paragraph: Here you can add %{url}, and edit or delete groups.
|
||||||
new_ordergroup: Add new ordergroup
|
new_ordergroup: Add new ordergroup
|
||||||
new_ordergroups: new ordergroups
|
new_ordergroups: new ordergroups
|
||||||
second_paragraph: ! 'Consider the <em>difference between group and ordergroup</em>: An ordergroup has an account and can order food. In a <em>%{url}</em> (for example ''sorting group'') the members coordinate with each other via tasks and messages. Users can only be in one ordergroup, but can be in multiple other groups.'
|
second_paragraph: ! 'Consider the difference between <em>group</em> and <em>ordergroup</em>: An ordergroup has an account and can order food. In a <em>%{url}</em> (for example ''sorting group''), members coordinate with each other via tasks and messages. Users can only be in one ordergroup, but can be in multiple workgroups.'
|
||||||
title: Ordergroup
|
title: Ordergroups
|
||||||
workgroup: workgroup
|
workgroup: workgroup
|
||||||
new:
|
new:
|
||||||
title: Create ordergroup
|
title: Create ordergroup
|
||||||
|
@ -150,7 +150,7 @@ en:
|
||||||
name: Name
|
name: Name
|
||||||
show:
|
show:
|
||||||
confirm: Are you sure?
|
confirm: Are you sure?
|
||||||
edit: Edit group/member
|
edit: Edit group/members
|
||||||
send_message: Send message
|
send_message: Send message
|
||||||
title: Ordergroup %{name}
|
title: Ordergroup %{name}
|
||||||
search_placeholder: name ..
|
search_placeholder: name ..
|
||||||
|
@ -158,10 +158,10 @@ en:
|
||||||
edit:
|
edit:
|
||||||
title: Edit user
|
title: Edit user
|
||||||
index:
|
index:
|
||||||
first_paragraph: Here you can edit users %{url}, bearbeiten and also delete them.
|
first_paragraph: Here you can %{url}, edit and delete users.
|
||||||
new_user: Create new user
|
new_user: Create new user
|
||||||
new_users: Create new user
|
new_users: create new
|
||||||
title: Admin/users
|
title: User admin
|
||||||
new:
|
new:
|
||||||
title: Create new user
|
title: Create new user
|
||||||
show:
|
show:
|
||||||
|
@ -194,7 +194,7 @@ en:
|
||||||
new_workgroup: Create new workgroup
|
new_workgroup: Create new workgroup
|
||||||
new_workgroups: new workgroups
|
new_workgroups: new workgroups
|
||||||
ordergroup: ordergroup
|
ordergroup: ordergroup
|
||||||
second_paragraph: ! 'Be aware of the <em>difference between a group and ordergroup</em>: A %{url} has an account and can order food. In a workgroup (for example ''sorting group'') the members coordinate with each other via tasks and messages. Users can only be in one ordergroup, but can be in multiple other groups.'
|
second_paragraph: ! 'Consider the difference between a <em>workgroup</em> and an <em>ordergroup</em>: an <em>%{url}</em> has an account and can order food. In a workgroup (for example ''sorting group''), members coordinate with each other via tasks and messages. Users can only be in one ordergroup, but can be in multiple workgroups.'
|
||||||
title: Workgroups
|
title: Workgroups
|
||||||
new:
|
new:
|
||||||
title: Create workgroup
|
title: Create workgroup
|
||||||
|
@ -223,43 +223,43 @@ en:
|
||||||
articles:
|
articles:
|
||||||
article:
|
article:
|
||||||
confirm_delete: Are you sure?
|
confirm_delete: Are you sure?
|
||||||
last_update: ! 'last updated: %{last_update} | Gross: %{gross_price}'
|
last_update: ! 'last updated: %{last_update} | gross: %{gross_price}'
|
||||||
articles:
|
articles:
|
||||||
confirm_delete: Do you really want to delete all selected articles?
|
confirm_delete: Do you really want to delete all selected articles?
|
||||||
option_available: Articles are available
|
option_available: Make articles available
|
||||||
option_delete: Delete article
|
option_delete: Delete article
|
||||||
option_not_available: Articles are not available anymore
|
option_not_available: Make articles unavailable
|
||||||
option_select: Choose special offer ...
|
option_select: Choose special offer ...
|
||||||
price_netto: Price
|
price_netto: Price
|
||||||
unit_quantity_desc: Unit quantity
|
unit_quantity_desc: Unit quantity
|
||||||
unit_quantity_short: Quantity
|
unit_quantity_short: Quantity
|
||||||
controller:
|
controller:
|
||||||
create_from_upload:
|
create_from_upload:
|
||||||
notice: ! '%{count} new articles were saved'
|
notice: ! '%{count} new articles were saved.'
|
||||||
error_invalid: Articles are incorrect.
|
error_invalid: There are errors in articles
|
||||||
error_nosel: You have selected no articles
|
error_nosel: No articles selected
|
||||||
error_parse: ! '%{msg} ... in line %{line}'
|
error_parse: ! '%{msg} ... in line %{line}'
|
||||||
error_update: ! 'There was an error when updating the article ''%{article}'' on: %{msg}'
|
error_update: ! 'An error occured when updating article ''%{article}'': %{msg}'
|
||||||
parse_upload:
|
parse_upload:
|
||||||
notice: ! '%{count} articles analysed succesfully.'
|
notice: ! '%{count} articles were succesfully analysed.'
|
||||||
sync:
|
sync:
|
||||||
notice: The catalog is up to date
|
notice: Catalog is up to date
|
||||||
shared_alert: ! '%{supplier} is not linked to an external database'
|
shared_alert: ! '%{supplier} is not linked to an external database'
|
||||||
update_all:
|
update_all:
|
||||||
notice: All articles and prices are updated
|
notice: All articles and prices were updated.
|
||||||
update_sel:
|
update_sel:
|
||||||
notice_avail: ! 'All selected articles have been made available '
|
notice_avail: All selected articles were set to be available.
|
||||||
notice_destroy: All selected articles have been deleted
|
notice_destroy: All selected articles were deleted.
|
||||||
notice_noaction: No action selected!
|
notice_noaction: No action specified!
|
||||||
notice_unavail: All selected articles have been made unavailable
|
notice_unavail: All selected articles were set to be unavailable.
|
||||||
update_sync:
|
update_sync:
|
||||||
notice: All articles and prices have been updated
|
notice: All articles and prices were updated.
|
||||||
destroy_active_article:
|
destroy_active_article:
|
||||||
drop: delete
|
drop: delete
|
||||||
note: ! '%{article} is used in current orders and can not be deleted Please first ... the article from orders %{drop_link}.'
|
note: ! '%{article} is used in current orders and can not be deleted Please first ... the article from orders %{drop_link}.'
|
||||||
edit_all:
|
edit_all:
|
||||||
note: ! 'Mandatory fields are: name, unit, (net) price and order number.'
|
note: ! 'Mandatory fields are: name, unit, (net) price and order number.'
|
||||||
submit: Updating 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:
|
edit_all_table:
|
||||||
|
@ -291,7 +291,7 @@ en:
|
||||||
new: New article
|
new: New article
|
||||||
new_order: Create new order
|
new_order: Create new order
|
||||||
search_placeholder: Name ...
|
search_placeholder: Name ...
|
||||||
title: Article from %{supplier} (%{count})
|
title: Articles from %{supplier} (%{count})
|
||||||
upload: Upload articles
|
upload: Upload articles
|
||||||
model:
|
model:
|
||||||
error_in_use: ! '%{article} can not be deleted because the article is part of a current order!'
|
error_in_use: ! '%{article} can not be deleted because the article is part of a current order!'
|
||||||
|
@ -300,14 +300,16 @@ en:
|
||||||
body: <p><i>Please verify the articles.</i></p> <p><i>Warning, at the moment there is no check for duplicate articles.</i></p>
|
body: <p><i>Please verify the articles.</i></p> <p><i>Warning, at the moment there is no check for duplicate articles.</i></p>
|
||||||
outlist:
|
outlist:
|
||||||
body: ! 'The following articles were outlisted and <b>deleted</b>:'
|
body: ! 'The following articles were outlisted and <b>deleted</b>:'
|
||||||
body_skip: No articles were deleted.
|
body_skip: No articles to delete.
|
||||||
title: Outlist ...
|
title: Outlist ...
|
||||||
price_short: Price
|
price_short: Price
|
||||||
submit: Delete/update all
|
submit: Delete/update all
|
||||||
title: Synchronize articles with external database
|
title: Synchronize articles with external database
|
||||||
unit_quantity_short: unit quantity
|
unit_quantity_short: unit quantity
|
||||||
update:
|
update:
|
||||||
body: <p><i>All articles are shown twice. Old articles are shown in grey and the text fields show their current values.</i></p> <p><i>Changes from old articles are marked in yellow.</i></p>
|
body: ! '<p><i>Every article is shown twice. The old values are gray and contain the current values.</i></p>
|
||||||
|
|
||||||
|
<p><i>Differences with the old articles are marked yellow.</i></p>'
|
||||||
title: Update ...
|
title: Update ...
|
||||||
update_msg: ! 'Articles must be updated:'
|
update_msg: ! 'Articles must be updated:'
|
||||||
upload:
|
upload:
|
||||||
|
@ -566,7 +568,7 @@ en:
|
||||||
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
|
amount_per_unit: Unit quantity * Unit
|
||||||
article: Article
|
article: Article
|
||||||
gross: Gross
|
gross: Gross
|
||||||
net: Net
|
net: Net
|
||||||
|
@ -590,11 +592,11 @@ en:
|
||||||
new: Create new invoice
|
new: Create new invoice
|
||||||
new_body: ! 'Create an invoice for this order:'
|
new_body: ! 'Create an invoice for this order:'
|
||||||
plus_refund_credited: ! '+ refund credited:'
|
plus_refund_credited: ! '+ refund credited:'
|
||||||
refund_adjusted_amount: ! 'refund adjusted amount:'
|
refund_adjusted_amount: ! 'amount adjusted for refund:'
|
||||||
new:
|
new:
|
||||||
alert: Attention, order was already accounted
|
alert: Attention, order was already accounted
|
||||||
articles_overview: Overview of articles
|
articles_overview: Overview of articles
|
||||||
comment_on_transaction: Here you can add a comment with your accounting
|
comment_on_transaction: Here you can add a comment to your accounting.
|
||||||
comments: Comments
|
comments: Comments
|
||||||
confirm_order: Close order
|
confirm_order: Close order
|
||||||
create_invoice: Create invoice
|
create_invoice: Create invoice
|
||||||
|
@ -609,14 +611,15 @@ en:
|
||||||
order_article:
|
order_article:
|
||||||
confirm: Are you sure?
|
confirm: Are you sure?
|
||||||
orders:
|
orders:
|
||||||
clear: Accounting
|
clear: accounting
|
||||||
cleared: Accounted (%{amount})
|
cleared: accounted (%{amount})
|
||||||
close: Close directly
|
close: close directly
|
||||||
confirm: Really want to put the order on closed?
|
confirm: Do you really want to fully close the order?
|
||||||
end: End
|
end: End
|
||||||
|
ended: ended
|
||||||
last_edited_by: Last edited by
|
last_edited_by: Last edited by
|
||||||
name: Name
|
name: Supplier
|
||||||
no_closed_orders: At the moment there are not closed orders
|
no_closed_orders: At the moment there are no ended orders.
|
||||||
state: State
|
state: State
|
||||||
summary:
|
summary:
|
||||||
changed: Data was changed!
|
changed: Data was changed!
|
||||||
|
@ -627,8 +630,8 @@ en:
|
||||||
groups_amount: ! 'Group amounts:'
|
groups_amount: ! 'Group amounts:'
|
||||||
net_amount: ! 'Net amount:'
|
net_amount: ! 'Net amount:'
|
||||||
reload: Reload summary
|
reload: Reload summary
|
||||||
with_extra_charge: ! 'With extra charge:'
|
with_extra_charge: ! 'with extra charge:'
|
||||||
without_extra_charge: ! 'Without extra charge:'
|
without_extra_charge: ! 'without extra charge:'
|
||||||
create:
|
create:
|
||||||
notice: Invoice was created
|
notice: Invoice was created
|
||||||
financial_transactions:
|
financial_transactions:
|
||||||
|
@ -639,12 +642,12 @@ en:
|
||||||
notice: All Transactions were saved.
|
notice: All Transactions were saved.
|
||||||
index:
|
index:
|
||||||
balance: ! 'Balance of account: %{balance}'
|
balance: ! 'Balance of account: %{balance}'
|
||||||
last_updated_at: (last updated at %{when})
|
last_updated_at: (last updated %{when} ago)
|
||||||
new_transaction: Create new transaction
|
new_transaction: Create new transaction
|
||||||
search_placeholder: Search ..
|
search_placeholder: Search ..
|
||||||
title: Account statement for %{name}
|
title: Account statement for %{name}
|
||||||
new:
|
new:
|
||||||
paragraph: Here you can credit/deduct the order group <b>%{name}</b> money.
|
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
|
amount: Amount
|
||||||
|
@ -773,7 +776,7 @@ en:
|
||||||
last_update: Last ordered
|
last_update: Last ordered
|
||||||
manufacturer: Manufacturer
|
manufacturer: Manufacturer
|
||||||
min_quantity: Minimum quantity
|
min_quantity: Minimum quantity
|
||||||
name: Mame
|
name: Name
|
||||||
new_funds: New account balance
|
new_funds: New account balance
|
||||||
note: Note
|
note: Note
|
||||||
price: Price
|
price: Price
|
||||||
|
@ -791,7 +794,7 @@ en:
|
||||||
units_full: Filled units
|
units_full: Filled units
|
||||||
index:
|
index:
|
||||||
closed_orders:
|
closed_orders:
|
||||||
more: more..
|
more: more...
|
||||||
title: Closed orders
|
title: Closed orders
|
||||||
finished_orders:
|
finished_orders:
|
||||||
title: Unaccounted orders
|
title: Unaccounted orders
|
||||||
|
@ -834,7 +837,7 @@ en:
|
||||||
comments:
|
comments:
|
||||||
title: Comments
|
title: Comments
|
||||||
ending: End
|
ending: End
|
||||||
not_ordered: You didn’t order
|
not_ordered: You didn’t order.
|
||||||
note: Note
|
note: Note
|
||||||
order_sum: Order sum
|
order_sum: Order sum
|
||||||
sum: Sum
|
sum: Sum
|
||||||
|
@ -1298,7 +1301,7 @@ en:
|
||||||
number: Number
|
number: Number
|
||||||
to_address: Shipping address
|
to_address: Shipping address
|
||||||
finish:
|
finish:
|
||||||
notice: The order has finished.
|
notice: The order has been ended.
|
||||||
form:
|
form:
|
||||||
name: Name
|
name: Name
|
||||||
note: Note
|
note: Note
|
||||||
|
@ -1324,7 +1327,7 @@ en:
|
||||||
model:
|
model:
|
||||||
error_closed: Order was already accounted for
|
error_closed: Order was already accounted for
|
||||||
error_nosel: At least one article must be selected
|
error_nosel: At least one article must be selected
|
||||||
error_starts_before_ends: must be before the starting 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}'
|
||||||
new:
|
new:
|
||||||
title: Create new order
|
title: Create new order
|
||||||
|
|
1723
config/locales/nl.yml
Normal file
1723
config/locales/nl.yml
Normal file
File diff suppressed because it is too large
Load diff
120
script/heroku_deploy
Executable file
120
script/heroku_deploy
Executable file
|
@ -0,0 +1,120 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# deploy foodsoft to heroku
|
||||||
|
#
|
||||||
|
# To be run from foodsoft's root. A new temporary git branch will be created
|
||||||
|
# from the current working directory - it's safest to run this with a clean
|
||||||
|
# working directory.
|
||||||
|
#
|
||||||
|
# Use environment variables to customize variables below.
|
||||||
|
# You need to have a working heroku client.
|
||||||
|
#
|
||||||
|
|
||||||
|
# rails environment to deploy
|
||||||
|
[ "$RAILS_ENV" ] || RAILS_ENV=production
|
||||||
|
# heroku application name
|
||||||
|
[ "$APP" ] || APP=foodsoft-translation
|
||||||
|
# heroku region to create application in
|
||||||
|
[ "$REGION" ] || REGION=eu
|
||||||
|
|
||||||
|
|
||||||
|
# make sure required software is available
|
||||||
|
if ! heroku >/dev/null 2>&1; then
|
||||||
|
echo "Please install heroku." 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! git version >/dev/null 2>&1; then
|
||||||
|
echo "Please install git." 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# required settings
|
||||||
|
if [ "$RAILS_ENV" = "translation" -a ! "$LOCALEAPP_KEY" ]; then
|
||||||
|
echo "Need to specify LOCALEAPP_KEY key for translation environment" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# create app if it doesn't exist
|
||||||
|
if ! heroku apps | grep -q "^$APP\s"; then
|
||||||
|
heroku create "$APP" --region "$REGION"
|
||||||
|
heroku addons:add heroku-postgresql:dev --app "$APP"
|
||||||
|
heroku pg:promote `heroku config | grep 'HEROKU_POSTGRESQL_.*_URL' | cut -d: -f1`
|
||||||
|
fi
|
||||||
|
heroku config:set RACK_ENV="${RAILS_ENV}" RAILS_ENV="${RAILS_ENV}" --app "$APP"
|
||||||
|
|
||||||
|
# create temporary branch with heroku-specific changes
|
||||||
|
touch ._tmp_havestash
|
||||||
|
OLDSTASH=`git stash list | wc -l`
|
||||||
|
git stash save -q -a "stored changes before creating heroku-$APP"
|
||||||
|
ORIG_BRANCH=`git status --b --porcelain | head -n 1 | sed 's|^#*\s*||;s|\.\.\..*$||'`
|
||||||
|
BRANCH="_tmp-heroku-$APP"
|
||||||
|
if ! git checkout -b "$BRANCH"; then
|
||||||
|
echo "Could not create to temporary branch '$BRANCH', aborting." 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# remove sqlite3 dependency as it doesn't install on heroku
|
||||||
|
sed -i "s|^\\(\\s*gem\\s\\+'sqlite3'\\)|#\1|" Gemfile
|
||||||
|
sed -i "s|^\\(\\s*sqlite3\\b\)|#\1|" Gemfile.lock
|
||||||
|
# make sure postgresql db is present, as it is the default heroku db
|
||||||
|
echo "\ngem 'pg'" >>Gemfile
|
||||||
|
echo "\ngem 'localeapp'" >>Gemfile
|
||||||
|
# always use unicorn
|
||||||
|
echo "\ngem 'unicorn'" >>Gemfile
|
||||||
|
echo 'web: bundle exec unicorn -p $PORT -E $RACK_ENV' >Procfile
|
||||||
|
bundle install --quiet # to update Gemfile.lock
|
||||||
|
# do not ignore deployment files
|
||||||
|
sed -i 's|^\(config/\*.yml\)|#\1|' .gitignore
|
||||||
|
sed -i 's|^\(config/initializers/secret_token.rb\)|#\1|' .gitignore
|
||||||
|
sed -i 's|^\(config/environments/development.rb\)|#\1|' .gitignore
|
||||||
|
# make sure we have a full configuration
|
||||||
|
# TODO pull this from heroku when exists?
|
||||||
|
if [ ! -e config/app_config.yml ]; then
|
||||||
|
echo "config/app_config.yml not present, copying config/app_config.yml.SAMPLE"
|
||||||
|
cp config/app_config.yml.SAMPLE config/app_config.yml
|
||||||
|
fi
|
||||||
|
# keep secret token from currently deployed app, else generate new one
|
||||||
|
heroku git:remote --app="$APP" >/dev/null 2>&1
|
||||||
|
if git show heroku/master:config/initializers/secret_token.rb >/dev/null 2>&1; then
|
||||||
|
git show heroku/master:config/initializers/secret_token.rb >config/initializers/secret_token.rb
|
||||||
|
else
|
||||||
|
cat >config/initializers/secret_token.rb <<-EOF
|
||||||
|
# auto-generated secret key
|
||||||
|
Foodsoft::Application.config.secret_token = '`openssl rand -hex 128`'
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
# configure localeapp, manually to include environment
|
||||||
|
if [ "$LOCALEAPP_KEY" ]; then
|
||||||
|
cat >config/initializers/localeapp.rb <<EOF
|
||||||
|
require 'localeapp/rails'
|
||||||
|
|
||||||
|
Localeapp.configure do |config|
|
||||||
|
config.api_key = '$LOCALEAPP_KEY'
|
||||||
|
config.sending_environments = ['$RAILS_ENV']
|
||||||
|
config.polling_environments = ['$RAILS_ENV']
|
||||||
|
end
|
||||||
|
EOF
|
||||||
|
# also do not cache so we get locale updates
|
||||||
|
sed -i 's|config\.cache_classes\s*=.*|config.cache_classes = false|' config/environments/${RAILS_ENV}.rb
|
||||||
|
fi
|
||||||
|
# TODO add more extensive database seed
|
||||||
|
|
||||||
|
# and push = deploy
|
||||||
|
git add -A
|
||||||
|
git commit -q -m "heroku changes for environment ${RAILS_ENV}" -a
|
||||||
|
git push -f heroku $BRANCH:master
|
||||||
|
# create/update database
|
||||||
|
if !heroku run rake db:version >/dev/null 2>&1; then
|
||||||
|
heroku run rake db:setup
|
||||||
|
else
|
||||||
|
heroku run rake db:migrate
|
||||||
|
fi
|
||||||
|
# get full translations so update works
|
||||||
|
[ "$LOCALEAPP_KEY" ] && heroku run localeapp pull
|
||||||
|
|
||||||
|
# restart just to be sure
|
||||||
|
heroku ps:restart
|
||||||
|
|
||||||
|
# return to original branch
|
||||||
|
git checkout -q "$ORIG_BRANCH" && git stash pop -q
|
||||||
|
git branch -q -D "$BRANCH"
|
||||||
|
rm -f ._tmp_havestash
|
||||||
|
|
Loading…
Reference in a new issue