Working on multi-language support

This commit is contained in:
Hillel Coren 2014-04-02 22:03:01 +03:00
parent 1b7c885367
commit 4c1b33f601
8 changed files with 18 additions and 9 deletions

View File

@ -132,8 +132,11 @@ class InvoiceController extends \BaseController {
return View::make('invoices.deleted');
}
Activity::viewInvoice($invitation);
Event::fire('invoice.viewed', $invoice);
if (!Auth::check() || Auth::user()->account_id != $invoice->account_id)
{
Activity::viewInvoice($invitation);
Event::fire('invoice.viewed', $invoice);
}
$client->account->loadLocalizationSettings();

View File

@ -262,7 +262,7 @@ return array(
'user_email_footer' => 'To adjust your email notification settings please visit http://www.invoiceninja.com/company/notifications',
'invoice_link_message' => 'To view your client invoice click the link below:',
'notification_paid_subject' => 'Invoice :invoice was paid by :client',
'notification_sent_subject' => 'Invoice :invoice was sent by :client',
'notification_sent_subject' => 'Invoice :invoice was sent to :client',
'notification_viewed_subject' => 'Invoice :invoice was viewed by :client',
'notification_paid' => 'A payment of :amount was made by client :client towards Invoice :invoice.',
'notification_sent' => 'The following client :client was emailed Invoice :invoice for :amount.',

View File

@ -262,7 +262,7 @@ return array(
'user_email_footer' => 'To adjust your email notification settings please visit http://www.invoiceninja.com/company/notifications',
'invoice_link_message' => 'To view your client invoice click the link below:',
'notification_paid_subject' => 'Invoice :invoice was paid by :client',
'notification_sent_subject' => 'Invoice :invoice was sent by :client',
'notification_sent_subject' => 'Invoice :invoice was sent to :client',
'notification_viewed_subject' => 'Invoice :invoice was viewed by :client',
'notification_paid' => 'A payment of :amount was made by client :client towards Invoice :invoice.',
'notification_sent' => 'The following client :client was emailed Invoice :invoice for :amount.',

View File

@ -261,7 +261,7 @@ return array(
'user_email_footer' => 'To adjust your email notification settings please visit http://www.invoiceninja.com/company/notifications',
'invoice_link_message' => 'To view your client invoice click the link below:',
'notification_paid_subject' => 'Invoice :invoice was paid by :client',
'notification_sent_subject' => 'Invoice :invoice was sent by :client',
'notification_sent_subject' => 'Invoice :invoice was sent to :client',
'notification_viewed_subject' => 'Invoice :invoice was viewed by :client',
'notification_paid' => 'A payment of :amount was made by client :client towards Invoice :invoice.',
'notification_sent' => 'The following client :client was emailed Invoice :invoice for :amount.',

View File

@ -262,7 +262,7 @@ return array(
'user_email_footer' => 'To adjust your email notification settings please visit http://www.invoiceninja.com/company/notifications',
'invoice_link_message' => 'To view your client invoice click the link below:',
'notification_paid_subject' => 'Invoice :invoice was paid by :client',
'notification_sent_subject' => 'Invoice :invoice was sent by :client',
'notification_sent_subject' => 'Invoice :invoice was sent to :client',
'notification_viewed_subject' => 'Invoice :invoice was viewed by :client',
'notification_paid' => 'A payment of :amount was made by client :client towards Invoice :invoice.',
'notification_sent' => 'The following client :client was emailed Invoice :invoice for :amount.',

View File

@ -262,7 +262,7 @@ return array(
'user_email_footer' => 'To adjust your email notification settings please visit http://www.invoiceninja.com/company/notifications',
'invoice_link_message' => 'To view your client invoice click the link below:',
'notification_paid_subject' => 'Invoice :invoice was paid by :client',
'notification_sent_subject' => 'Invoice :invoice was sent by :client',
'notification_sent_subject' => 'Invoice :invoice was sent to :client',
'notification_viewed_subject' => 'Invoice :invoice was viewed by :client',
'notification_paid' => 'A payment of :amount was made by client :client towards Invoice :invoice.',
'notification_sent' => 'The following client :client was emailed Invoice :invoice for :amount.',

View File

@ -261,7 +261,7 @@ return array(
'user_email_footer' => 'To adjust your email notification settings please visit http://www.invoiceninja.com/company/notifications',
'invoice_link_message' => 'To view your client invoice click the link below:',
'notification_paid_subject' => 'Invoice :invoice was paid by :client',
'notification_sent_subject' => 'Invoice :invoice was sent by :client',
'notification_sent_subject' => 'Invoice :invoice was sent to :client',
'notification_viewed_subject' => 'Invoice :invoice was viewed by :client',
'notification_paid' => 'A payment of :amount was made by client :client towards Invoice :invoice.',
'notification_sent' => 'The following client :client was emailed Invoice :invoice for :amount.',

View File

@ -471,6 +471,12 @@
$('input[name=client]').val({{ $client->public_id }});
@endif
/*
if (clients.length == 0) {
$('.client_select input.form-control').prop('disabled', true);
}
*/
var $input = $('select#client');
$input.combobox().on('change', function(e) {
var clientId = parseInt($('input[name=client]').val(), 10);
@ -481,7 +487,7 @@
model.invoice().client().country = false;
}
refreshPDF();
}); //.trigger('change');
}); //.trigger('change');
$('#terms, #public_notes, #invoice_number, #invoice_date, #due_date, #po_number, #discount, #currency_id, #invoice_design_id').change(function() {
refreshPDF();