mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-18 09:04:35 +01:00
Working on multi-language support
This commit is contained in:
parent
e1cb685456
commit
2e299aa83f
@ -48,7 +48,7 @@
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Where Former should look for translations
|
||||
'translate_from' => 'fields',
|
||||
'translate_from' => 'texts',
|
||||
|
||||
// An array of attributes to automatically translate
|
||||
'translatable' => array(
|
||||
|
@ -516,7 +516,7 @@ class AccountController extends \BaseController {
|
||||
$account->date_format_id = Input::get('date_format_id') ? Input::get('date_format_id') : null;
|
||||
$account->datetime_format_id = Input::get('datetime_format_id') ? Input::get('datetime_format_id') : null;
|
||||
$account->currency_id = Input::get('currency_id') ? Input::get('currency_id') : 1; // US Dollar
|
||||
//$account->language_id = Input::get('language_id') ? Input::get('language_id') : 1; // English
|
||||
$account->language_id = Input::get('language_id') ? Input::get('language_id') : 1; // English
|
||||
$account->save();
|
||||
|
||||
$user = Auth::user();
|
||||
|
@ -23,7 +23,7 @@ class ClientController extends \BaseController {
|
||||
return View::make('list', array(
|
||||
'entityType'=>ENTITY_CLIENT,
|
||||
'title' => '- Clients',
|
||||
'columns'=>['checkbox', 'Client', 'Contact', 'Email', 'Date Created', 'Last Login', 'Balance', 'Action']
|
||||
'columns'=>Utils::trans(['checkbox', 'client', 'contact', 'email', 'date_created', 'last_login', 'balance', 'action'])
|
||||
));
|
||||
}
|
||||
|
||||
@ -43,17 +43,17 @@ class ClientController extends \BaseController {
|
||||
{
|
||||
return '<div class="btn-group tr-action" style="visibility:hidden;">
|
||||
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Select <span class="caret"></span>
|
||||
'.trans('texts.select').' <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="' . URL::to('clients/'.$model->public_id.'/edit') . '">Edit Client</a></li>
|
||||
<li><a href="' . URL::to('clients/'.$model->public_id.'/edit') . '">'.trans('texts.edit_client').'</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="' . URL::to('invoices/create/'.$model->public_id) . '">New Invoice</a></li>
|
||||
<li><a href="' . URL::to('payments/create/'.$model->public_id) . '">New Payment</a></li>
|
||||
<li><a href="' . URL::to('credits/create/'.$model->public_id) . '">New Credit</a></li>
|
||||
<li><a href="' . URL::to('invoices/create/'.$model->public_id) . '">'.trans('texts.new_invoice').'</a></li>
|
||||
<li><a href="' . URL::to('payments/create/'.$model->public_id) . '">'.trans('texts.new_payment').'</a></li>
|
||||
<li><a href="' . URL::to('credits/create/'.$model->public_id) . '">'.trans('texts.new_credit').'</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="javascript:archiveEntity(' . $model->public_id. ')">Archive Client</a></li>
|
||||
<li><a href="javascript:deleteEntity(' . $model->public_id. ')">Delete Client</a></li>
|
||||
<li><a href="javascript:archiveEntity(' . $model->public_id. ')">'.trans('texts.archive_client').'</a></li>
|
||||
<li><a href="javascript:deleteEntity(' . $model->public_id. ')">'.trans('texts.delete_client').'</a></li>
|
||||
</ul>
|
||||
</div>';
|
||||
})
|
||||
|
@ -23,7 +23,7 @@ class CreditController extends \BaseController {
|
||||
return View::make('list', array(
|
||||
'entityType'=>ENTITY_CREDIT,
|
||||
'title' => '- Credits',
|
||||
'columns'=>['checkbox', 'Client', 'Credit Amount', 'Credit Balance', 'Credit Date', 'Private Notes', 'Action']
|
||||
'columns'=>Utils::trans(['checkbox', 'client', 'credit_amount', 'credit_balance', 'credit_date', 'private_notes', 'action'])
|
||||
));
|
||||
}
|
||||
|
||||
@ -47,11 +47,11 @@ class CreditController extends \BaseController {
|
||||
{
|
||||
return '<div class="btn-group tr-action" style="visibility:hidden;">
|
||||
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Select <span class="caret"></span>
|
||||
'.trans('texts.select').' <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="javascript:archiveEntity(' . $model->public_id. ')">Archive Credit</a></li>
|
||||
<li><a href="javascript:deleteEntity(' . $model->public_id. ')">Delete Credit</a></li>
|
||||
<li><a href="javascript:archiveEntity(' . $model->public_id. ')">'.trans('texts.archive_credit').'</a></li>
|
||||
<li><a href="javascript:deleteEntity(' . $model->public_id. ')">'.trans('texts.delete_credit').'</a></li>
|
||||
</ul>
|
||||
</div>';
|
||||
})
|
||||
|
@ -46,7 +46,7 @@ class HomeController extends BaseController {
|
||||
'text' => $message
|
||||
];
|
||||
|
||||
$this->mailer->sendTo(CONTACT_EMAIL, CONTACT_EMAIL, 'Invoice Ninja Feedback', 'contact', $data);
|
||||
$this->mailer->sendTo(CONTACT_EMAIL, CONTACT_EMAIL, CONTACT_NAME, 'Invoice Ninja Feedback', 'contact', $data);
|
||||
|
||||
Session::flash('message', 'Successfully sent message');
|
||||
return Redirect::to('/contact');
|
||||
|
@ -27,13 +27,13 @@ class InvoiceController extends \BaseController {
|
||||
$data = [
|
||||
'title' => '- Invoices',
|
||||
'entityType'=>ENTITY_INVOICE,
|
||||
'columns'=>['checkbox', 'Invoice Number', 'Client', 'Invoice Date', 'Invoice Total', 'Balance Due', 'Due Date', 'Status', 'Action']
|
||||
'columns'=>Utils::trans(['checkbox', 'invoice_number', 'client', 'invoice_date', 'invoice_total', 'balance_due', 'due_date', 'status', 'action'])
|
||||
];
|
||||
|
||||
if (Invoice::scope()->where('is_recurring', '=', true)->count() > 0)
|
||||
{
|
||||
$data['secEntityType'] = ENTITY_RECURRING_INVOICE;
|
||||
$data['secColumns'] = ['checkbox', 'Frequency', 'Client', 'Start Date', 'End Date', 'Invoice Total', 'Action'];
|
||||
$data['secColumns'] = Utils::trans(['checkbox', 'frequency', 'client', 'start_date', 'end_date', 'invoice_total', 'action']);
|
||||
}
|
||||
|
||||
return View::make('list', $data);
|
||||
@ -63,14 +63,14 @@ class InvoiceController extends \BaseController {
|
||||
{
|
||||
return '<div class="btn-group tr-action" style="visibility:hidden;">
|
||||
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Select <span class="caret"></span>
|
||||
'.trans('texts.select').' <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="' . URL::to('invoices/'.$model->public_id.'/edit') . '">Edit Invoice</a></li>
|
||||
<li><a href="' . URL::to('payments/create/' . $model->client_public_id . '/' . $model->public_id ) . '">Enter Payment</a></li>
|
||||
<li><a href="' . URL::to('invoices/'.$model->public_id.'/edit') . '">'.trans('texts.edit_invoice').'</a></li>
|
||||
<li><a href="' . URL::to('payments/create/' . $model->client_public_id . '/' . $model->public_id ) . '">'.trans('texts.enter_payment').'</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="javascript:archiveEntity(' . $model->public_id . ')">Archive Invoice</a></li>
|
||||
<li><a href="javascript:deleteEntity(' . $model->public_id . ')">Delete Invoice</a></li>
|
||||
<li><a href="javascript:archiveEntity(' . $model->public_id . ')">'.trans('texts.archive_invoice').'</a></li>
|
||||
<li><a href="javascript:deleteEntity(' . $model->public_id . ')">'.trans('texts.delete_invoice').'</a></li>
|
||||
</ul>
|
||||
</div>';
|
||||
})
|
||||
@ -99,13 +99,13 @@ class InvoiceController extends \BaseController {
|
||||
{
|
||||
return '<div class="btn-group tr-action" style="visibility:hidden;">
|
||||
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Select <span class="caret"></span>
|
||||
'.trans('texts.select').' <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="' . URL::to('invoices/'.$model->public_id.'/edit') . '">Edit Invoice</a></li>
|
||||
<li><a href="' . URL::to('invoices/'.$model->public_id.'/edit') . '">'.trans('texts.edit_invoice').'</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="javascript:archiveEntity(' . $model->public_id . ')">Archive Invoice</a></li>
|
||||
<li><a href="javascript:deleteEntity(' . $model->public_id . ')">Delete Invoice</a></li>
|
||||
<li><a href="javascript:archiveEntity(' . $model->public_id . ')">'.trans('texts.archive_invoice').'</a></li>
|
||||
<li><a href="javascript:deleteEntity(' . $model->public_id . ')">'.trans('texts.delete_invoice').'</a></li>
|
||||
</ul>
|
||||
</div>';
|
||||
})
|
||||
|
@ -18,7 +18,7 @@ class PaymentController extends \BaseController
|
||||
return View::make('list', array(
|
||||
'entityType'=>ENTITY_PAYMENT,
|
||||
'title' => '- Payments',
|
||||
'columns'=>['checkbox', 'Invoice', 'Client', 'Transaction Reference', 'Method', 'Payment Amount', 'Payment Date', 'Action']
|
||||
'columns'=>Utils::trans(['checkbox', 'invoice', 'client', 'transaction_reference', 'method', 'payment_amount', 'payment_date', 'action'])
|
||||
));
|
||||
}
|
||||
|
||||
@ -46,11 +46,11 @@ class PaymentController extends \BaseController
|
||||
{
|
||||
return '<div class="btn-group tr-action" style="visibility:hidden;">
|
||||
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Select <span class="caret"></span>
|
||||
'.trans('texts.select').' <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="javascript:archiveEntity(' . $model->public_id. ')">Archive Payment</a></li>
|
||||
<li><a href="javascript:deleteEntity(' . $model->public_id. ')">Delete Payment</a></li>
|
||||
<li><a href="javascript:archiveEntity(' . $model->public_id. ')">'.trans('texts.archive_payment').'</a></li>
|
||||
<li><a href="javascript:deleteEntity(' . $model->public_id. ')">'.trans('texts.delete_payment').'</a></li>
|
||||
</ul>
|
||||
</div>';
|
||||
})
|
||||
|
54
app/lang/de/texts.php
Normal file
54
app/lang/de/texts.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
// client
|
||||
'organization' => 'Organisation',
|
||||
'name' => 'Name',
|
||||
'website' => 'Webseite',
|
||||
'work_phone' => 'Telefon',
|
||||
'address' => 'Adresse',
|
||||
'address1' => 'Straße',
|
||||
'address2' => 'Adresszusatz',
|
||||
'city' => 'Stadt',
|
||||
'state' => 'Bundesland',
|
||||
'postal_code' => 'Postleitzahl',
|
||||
'country_id' => 'Land',
|
||||
'contacts' => 'Kontakte',
|
||||
'first_name' => 'Vorname',
|
||||
'last_name' => 'Nachname',
|
||||
'phone' => 'Telefon',
|
||||
'email' => 'Email',
|
||||
'additional_info' => 'Zusätzliche Info',
|
||||
'payment_terms' => 'Payment Terms',
|
||||
'currency_id' => 'Währung',
|
||||
'size_id' => 'Größe',
|
||||
'industry_id' => 'Kategorie',
|
||||
'private_notes' => 'Notizen',
|
||||
|
||||
// invoice
|
||||
'invoice' => 'Rechnung',
|
||||
'client' => 'Kunde',
|
||||
'invoice_date' => 'Rechnungsdatum',
|
||||
'due_date' => 'Fällig am',
|
||||
'invoice_number' => 'Rechungsnummer',
|
||||
'invoice_number_short' => 'Rechnung #',
|
||||
'po_number' => 'Bestell Nummer',
|
||||
'po_number_short' => 'BN #',
|
||||
'frequency_id' => 'Wie oft',
|
||||
'dicount' => 'Rabatt',
|
||||
'taxes' => 'Steuern',
|
||||
'tax' => 'Steuer',
|
||||
'item' => 'Artikel',
|
||||
'description' => 'Beschreibung',
|
||||
'unit_cost' => 'Kosten pro Einheit',
|
||||
'quantity' => 'Menge',
|
||||
'line_total' => 'Summe',
|
||||
'subtotal' => 'Zwischensumme',
|
||||
'paid_to_date' => 'Zahlungsdatum',
|
||||
'balance_due' => 'Rechnungsbetrag',
|
||||
'invoice_design_id' => 'Design',
|
||||
'terms' => 'Bedingungen',
|
||||
'your_invoice' => 'Ihre Rechnung',
|
||||
|
||||
);
|
@ -1,54 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
// client
|
||||
'organization' => 'Organization',
|
||||
'name' => 'Name',
|
||||
'website' => 'Website',
|
||||
'work_phone' => 'Phone',
|
||||
'address' => 'Address',
|
||||
'address1' => 'Street',
|
||||
'address2' => 'Apt/Suite',
|
||||
'city' => 'City',
|
||||
'state' => 'State/Province',
|
||||
'postal_code' => 'Postal Code',
|
||||
'country_id' => 'Country',
|
||||
'contacts' => 'Contacts',
|
||||
'first_name' => 'First Name',
|
||||
'last_name' => 'Last Name',
|
||||
'phone' => 'Phone',
|
||||
'email' => 'Email',
|
||||
'additional_info' => 'Additional Info',
|
||||
'payment_terms' => 'Payment Terms',
|
||||
'currency_id' => 'Currency',
|
||||
'size_id' => 'Size',
|
||||
'industry_id' => 'Industry',
|
||||
'private_notes' => 'Private Notes',
|
||||
|
||||
// invoice
|
||||
'invoice' => 'Invoice',
|
||||
'client' => 'Client',
|
||||
'invoice_date' => 'Invoice Date',
|
||||
'due_date' => 'Due Date',
|
||||
'invoice_number' => 'Invoice Number',
|
||||
'invoice_number_short' => 'Invoice #',
|
||||
'po_number' => 'PO Number',
|
||||
'po_number_short' => 'PO #',
|
||||
'frequency_id' => 'How often',
|
||||
'discount' => 'Discount',
|
||||
'taxes' => 'Taxes',
|
||||
'tax' => 'Tax',
|
||||
'item' => 'Item',
|
||||
'description' => 'Description',
|
||||
'unit_cost' => 'Unit Cost',
|
||||
'quantity' => 'Quantity',
|
||||
'line_total' => 'Line Total',
|
||||
'subtotal' => 'Subtotal',
|
||||
'paid_to_date' => 'Paid to Date',
|
||||
'balance_due' => 'Balance Due',
|
||||
'invoice_design_id' => 'Design',
|
||||
'terms' => 'Terms',
|
||||
'your_invoice' => 'Your Invoice',
|
||||
|
||||
);
|
154
app/lang/en/texts.php
Normal file
154
app/lang/en/texts.php
Normal file
@ -0,0 +1,154 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
// client
|
||||
'organization' => 'Organization',
|
||||
'name' => 'Name',
|
||||
'website' => 'Website',
|
||||
'work_phone' => 'Phone',
|
||||
'address' => 'Address',
|
||||
'address1' => 'Street',
|
||||
'address2' => 'Apt/Suite',
|
||||
'city' => 'City',
|
||||
'state' => 'State/Province',
|
||||
'postal_code' => 'Postal Code',
|
||||
'country_id' => 'Country',
|
||||
'contacts' => 'Contacts',
|
||||
'first_name' => 'First Name',
|
||||
'last_name' => 'Last Name',
|
||||
'phone' => 'Phone',
|
||||
'email' => 'Email',
|
||||
'additional_info' => 'Additional Info',
|
||||
'payment_terms' => 'Payment Terms',
|
||||
'currency_id' => 'Currency',
|
||||
'size_id' => 'Size',
|
||||
'industry_id' => 'Industry',
|
||||
'private_notes' => 'Private Notes',
|
||||
|
||||
// invoice
|
||||
'invoice' => 'Invoice',
|
||||
'client' => 'Client',
|
||||
'invoice_date' => 'Invoice Date',
|
||||
'due_date' => 'Due Date',
|
||||
'invoice_number' => 'Invoice Number',
|
||||
'invoice_number_short' => 'Invoice #',
|
||||
'po_number' => 'PO Number',
|
||||
'po_number_short' => 'PO #',
|
||||
'frequency_id' => 'How often',
|
||||
'discount' => 'Discount',
|
||||
'taxes' => 'Taxes',
|
||||
'tax' => 'Tax',
|
||||
'item' => 'Item',
|
||||
'description' => 'Description',
|
||||
'unit_cost' => 'Unit Cost',
|
||||
'quantity' => 'Quantity',
|
||||
'line_total' => 'Line Total',
|
||||
'subtotal' => 'Subtotal',
|
||||
'paid_to_date' => 'Paid to Date',
|
||||
'balance_due' => 'Balance Due',
|
||||
'invoice_design_id' => 'Design',
|
||||
'terms' => 'Terms',
|
||||
'your_invoice' => 'Your Invoice',
|
||||
|
||||
'remove_contact' => 'Remove contact',
|
||||
'add_contact' => 'Add contact',
|
||||
'create_new_client' => 'Create new client',
|
||||
'edit_client_details' => 'Edit client details',
|
||||
'enable' => 'Enable',
|
||||
'learn_more' => 'Learn more',
|
||||
'manage_rates' => 'Manage rates',
|
||||
'note_to_client' => 'Note to client',
|
||||
'invoice_terms' => 'Invoice terms',
|
||||
'save_as_default_terms' => 'Save as default terms',
|
||||
'download_pdf' => 'Download PDF',
|
||||
'save_invoice' => 'Save Invoice',
|
||||
'clone_invoice' => 'Clone Invoice',
|
||||
'archive_invoice' => 'Archive Invoice',
|
||||
'delete_invoice' => 'Delete Invoice',
|
||||
'email_invoice' => 'Email Invoice',
|
||||
'enter_payment' => 'Enter Payment',
|
||||
'tax_rates' => 'Tax Rates',
|
||||
'rate' => 'Rate',
|
||||
'settings' => 'Settings',
|
||||
'enable_invoice_tax' => 'Enable specifying an <b>invoice tax</b>',
|
||||
'enable_line_item_tax' => 'Enable specifying <b>line item taxes</b>',
|
||||
|
||||
// navigation
|
||||
'dashboard' => 'Dashboard',
|
||||
'clients' => 'Clients',
|
||||
'invoices' => 'Invoices',
|
||||
'payments' => 'Payments',
|
||||
'credits' => 'Credits',
|
||||
'history' => 'History',
|
||||
'search' => 'Search',
|
||||
'sign_up' => 'Sign Up',
|
||||
'guest' => 'Guest',
|
||||
'company_details' => 'Company Details',
|
||||
'online_payments' => 'Online Payments',
|
||||
'notifications' => 'Notifications',
|
||||
'import_export' => 'Import/Export',
|
||||
'done' => 'Done',
|
||||
'cancel' => 'Cancel',
|
||||
'provide_email' => 'Please provide a valid email address',
|
||||
'powered_by' => 'Powered by',
|
||||
'no_items' => 'No items',
|
||||
|
||||
// recurring invoices
|
||||
'recurring_invoices' => 'Recurring Invoices',
|
||||
'recurring_help' => '<p>Automatically send clients the same invoices weekly, bi-monthly, monthly, quarterly or annually. </p>
|
||||
<p>Use :MONTH, :QUARTER or :YEAR for dynamic dates. Basic math works as well, for example :MONTH-1.</p>
|
||||
<p>Examples of dynamic invoice variables:</p>
|
||||
<ul>
|
||||
<li>"Gym membership for the month of :MONTH" => "Gym membership for the month of July"</li>
|
||||
<li>":YEAR+1 yearly subscription" => "2015 Yearly Subscription"</li>
|
||||
<li>"Retainer payment for :QUARTER+1" => "Retainer payment for Q2"</li>
|
||||
</ul>',
|
||||
|
||||
// dashboard
|
||||
'in_total_revenue' => 'in total revenue',
|
||||
'billed_client' => 'billed client',
|
||||
'billed_clients' => 'billed clients',
|
||||
'active_client' => 'active client',
|
||||
'active_clients' => 'active clients',
|
||||
'invoices_past_due' => 'Invoices Past Due',
|
||||
'upcoming_invoices' => 'Upcoming invoices',
|
||||
'average_invoice' => 'Average invoice',
|
||||
|
||||
// list pages
|
||||
'archive' => 'Archive',
|
||||
'delete' => 'Delete',
|
||||
'archive_client' => 'Archive client',
|
||||
'delete_client' => 'Delete client',
|
||||
'archive_payment' => 'Archive payment',
|
||||
'delete_payment' => 'Delete payment',
|
||||
'archive_credit' => 'Archive credit',
|
||||
'delete_credit' => 'Delete credit',
|
||||
'show_archived_deleted' => 'Show archived/deleted',
|
||||
'filter' => 'Filter',
|
||||
'new_client' => 'New Client',
|
||||
'new_invoice' => 'New Invoice',
|
||||
'new_payment' => 'New Payment',
|
||||
'new_credit' => 'New Credit',
|
||||
'contact' => 'Contact',
|
||||
'date_created' => 'Date Created',
|
||||
'last_login' => 'Last Login',
|
||||
'balance' => 'Balance',
|
||||
'action' => 'Action',
|
||||
'status' => 'Status',
|
||||
'invoice_total' => 'Invoice Total',
|
||||
'frequency' => 'Frequency',
|
||||
'start_date' => 'Start Date',
|
||||
'end_date' => 'End Date',
|
||||
'transaction_reference' => 'Transaction Reference',
|
||||
'method' => 'Method',
|
||||
'payment_amount' => 'Payment Amount',
|
||||
'payment_date' => 'Payment Date',
|
||||
'credit_amount' => 'Credit Amount',
|
||||
'credit_balance' => 'Credit Balance',
|
||||
'credit_date' => 'Credit Date',
|
||||
'empty_table' => 'No data available in table',
|
||||
'select' => 'Select',
|
||||
'edit_client' => 'Edit Client',
|
||||
'edit_invoice' => 'Edit Invoice',
|
||||
);
|
@ -11,6 +11,25 @@ class Utils
|
||||
{
|
||||
return substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/') + 1);
|
||||
}
|
||||
|
||||
public static function trans($input)
|
||||
{
|
||||
$data = [];
|
||||
|
||||
foreach ($input as $field)
|
||||
{
|
||||
if ($field == "checkbox")
|
||||
{
|
||||
$data[] = $field;
|
||||
}
|
||||
else
|
||||
{
|
||||
$data[] = trans("texts.$field");
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public static function fatalError($message = false, $exception = false)
|
||||
{
|
||||
@ -104,7 +123,8 @@ class Utils
|
||||
public static function pluralize($string, $count)
|
||||
{
|
||||
$string = str_replace('?', $count, $string);
|
||||
return $count == 1 ? $string : $string . 's';
|
||||
$field = $count == 1 ? $string : $string . 's';
|
||||
return trans("texts.$field");
|
||||
}
|
||||
|
||||
public static function toArray($data)
|
||||
|
@ -195,7 +195,7 @@ class Account extends Eloquent
|
||||
|
||||
foreach ($fields as $field)
|
||||
{
|
||||
$data[$field] = trans("fields.$field");
|
||||
$data[$field] = trans("texts.$field");
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
@ -37,7 +37,10 @@ class ContactMailer extends Mailer {
|
||||
'emailFooter' => $invoice->account->email_footer
|
||||
];
|
||||
|
||||
$this->sendTo($invitation->contact->email, $invitation->user->email, $subject, $view, $data);
|
||||
$fromEmail = $invitation->user->email;
|
||||
$fromName = $invitation->user->getDisplayName();
|
||||
|
||||
$this->sendTo($invitation->contact->email, $fromEmail, $fromName, $subject, $view, $data);
|
||||
|
||||
Activity::emailInvoice($invitation);
|
||||
}
|
||||
@ -63,6 +66,7 @@ class ContactMailer extends Mailer {
|
||||
'paymentAmount' => Utils::formatMoney($payment->amount, $payment->client->currency_id)
|
||||
];
|
||||
|
||||
$this->sendTo($payment->contact->email, $payment->invitation->user->email, $subject, $view, $data);
|
||||
$user = $payment->invitation->user;
|
||||
$this->sendTo($payment->contact->email, $user->email, $user->getDisplayName(), $subject, $view, $data);
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@ use Mail;
|
||||
|
||||
class Mailer {
|
||||
|
||||
public function sendTo($toEmail, $fromEmail, $subject, $view, $data = [])
|
||||
public function sendTo($toEmail, $fromEmail, $fromName, $subject, $view, $data = [])
|
||||
{
|
||||
$views = [
|
||||
'emails.'.$view.'_html',
|
||||
@ -13,9 +13,10 @@ class Mailer {
|
||||
|
||||
//$view = 'emails.' . $view;
|
||||
|
||||
Mail::queue($views, $data, function($message) use ($toEmail, $fromEmail, $subject)
|
||||
Mail::queue($views, $data, function($message) use ($toEmail, $fromEmail, $fromName, $subject)
|
||||
{
|
||||
$message->to($toEmail)->replyTo($fromEmail)->subject($subject);
|
||||
$message->to($toEmail)->from($fromEmail, $fromName)->sender($fromEmail, $fromName)
|
||||
->replyTo($fromEmail, $fromName)->returnPath($fromEmail)->subject($subject);
|
||||
});
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@ class UserMailer extends Mailer {
|
||||
'user' => $user
|
||||
];
|
||||
|
||||
$this->sendTo($user->email, CONTACT_EMAIL, $subject, $view, $data);
|
||||
$this->sendTo($user->email, CONTACT_EMAIL, CONTACT_NAME, $subject, $view, $data);
|
||||
}
|
||||
|
||||
public function sendNotification(User $user, Invoice $invoice, $type, Payment $payment = null)
|
||||
@ -63,6 +63,6 @@ class UserMailer extends Mailer {
|
||||
|
||||
$subject = "Invoice {$invoice->invoice_number} was $action {$invoice->client->getDisplayName()}";
|
||||
|
||||
$this->sendTo($user->email, CONTACT_EMAIL, $subject, $view, $data);
|
||||
$this->sendTo($user->email, CONTACT_EMAIL, CONTACT_NAME, $subject, $view, $data);
|
||||
}
|
||||
}
|
@ -98,7 +98,7 @@ Route::group(array('before' => 'auth'), function()
|
||||
|
||||
HTML::macro('nav_link', function($url, $text, $url2 = '', $extra = '') {
|
||||
$class = ( Request::is($url) || Request::is($url.'/*') || Request::is($url2) ) ? ' class="active"' : '';
|
||||
return '<li'.$class.'><a href="'.URL::to($url).'" '.$extra.'>'.$text.'</a></li>';
|
||||
return '<li'.$class.'><a href="'.URL::to($url).'" '.$extra.'>'.trans("texts.$text").'</a></li>';
|
||||
});
|
||||
|
||||
HTML::macro('tab_link', function($url, $text, $active = false) {
|
||||
@ -174,7 +174,8 @@ HTML::macro('breadcrumbs', function() {
|
||||
|
||||
|
||||
define('CONTACT_EMAIL', 'contact@invoiceninja.com');
|
||||
//define('ANALYTICS_KEY', 'UA-46031341-1');
|
||||
define('CONTACT_NAME', 'Invoice Ninja');
|
||||
|
||||
|
||||
define('ENV_DEVELOPMENT', 'local');
|
||||
define('ENV_STAGING', 'staging');
|
||||
|
@ -63,8 +63,8 @@
|
||||
{{ Former::text('phone') }}
|
||||
|
||||
{{ Former::legend('Localization') }}
|
||||
{{-- Former::select('language_id')->addOption('','')->label('Language')
|
||||
->fromQuery($languages, 'name', 'id') --}}
|
||||
{{ Former::select('language_id')->addOption('','')->label('Language')
|
||||
->fromQuery($languages, 'name', 'id') }}
|
||||
{{ Former::select('currency_id')->addOption('','')->label('Currency')
|
||||
->fromQuery($currencies, 'name', 'id') }}
|
||||
{{ Former::select('timezone_id')->addOption('','')->label('Timezone')
|
||||
|
@ -3,10 +3,10 @@
|
||||
@section('content')
|
||||
|
||||
<ul class="nav nav-tabs nav nav-justified">
|
||||
{{ HTML::nav_link('company/details', 'Company Details') }}
|
||||
{{ HTML::nav_link('company/payments', 'Online Payments') }}
|
||||
{{ HTML::nav_link('company/notifications', 'Notifications') }}
|
||||
{{ HTML::nav_link('company/import_export', 'Import/Export', 'company/import_map') }}
|
||||
{{ HTML::nav_link('company/details', 'company_details') }}
|
||||
{{ HTML::nav_link('company/payments', 'online_payments') }}
|
||||
{{ HTML::nav_link('company/notifications', 'notifications') }}
|
||||
{{ HTML::nav_link('company/import_export', 'import_export', 'company/import_map') }}
|
||||
</ul>
|
||||
<p> </p>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
{{ $totalIncome }}
|
||||
</div>
|
||||
<div class="in-thin">
|
||||
in total revenue
|
||||
{{ trans('texts.in_total_revenue') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -24,7 +24,7 @@
|
||||
{{ $billedClients }}
|
||||
</div>
|
||||
<div class="in-thin">
|
||||
{{ Utils::pluralize('billed client', $billedClients) }}
|
||||
{{ Utils::pluralize('billed_client', $billedClients) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -52,7 +52,7 @@
|
||||
<div class="panel panel-default dashboard" style="min-height:320px">
|
||||
<div class="panel-heading" style="background-color:#0b4d78">
|
||||
<h3 class="panel-title in-bold-white">
|
||||
<i class="glyphicon glyphicon-exclamation-sign"></i> Notifications
|
||||
<i class="glyphicon glyphicon-exclamation-sign"></i> {{ trans('texts.notifications') }}
|
||||
</h3>
|
||||
</div>
|
||||
<ul class="panel-body list-group">
|
||||
@ -69,16 +69,16 @@
|
||||
<div class="panel panel-default dashboard" style="min-height:320px">
|
||||
<div class="panel-heading" style="background-color:#e37329">
|
||||
<h3 class="panel-title in-bold-white">
|
||||
<i class="glyphicon glyphicon-time"></i> Invoices Past Due
|
||||
<i class="glyphicon glyphicon-time"></i> {{ trans('texts.invoices_past_due') }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<th>Invoice #</th>
|
||||
<th>Client</th>
|
||||
<th>Due date</th>
|
||||
<th>Balance due</th>
|
||||
<th>{{ trans('texts.invoice_number_short') }}</th>
|
||||
<th>{{ trans('texts.client') }}</th>
|
||||
<th>{{ trans('texts.due_date') }}</th>
|
||||
<th>{{ trans('texts.balance_due') }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($pastDue as $invoice)
|
||||
@ -101,16 +101,16 @@
|
||||
<div class="panel panel-default dashboard" style="min-height:320px;">
|
||||
<div class="panel-heading" style="margin:0;">
|
||||
<h3 class="panel-title">
|
||||
<i class="glyphicon glyphicon-time"></i> Upcoming invoices
|
||||
<i class="glyphicon glyphicon-time"></i> {{ trans('texts.upcoming_invoices') }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<th>Invoice #</th>
|
||||
<th>Client</th>
|
||||
<th>Due date</th>
|
||||
<th>Balance due</th>
|
||||
<th>{{ trans('texts.invoice_number_short') }}</th>
|
||||
<th>{{ trans('texts.client') }}</th>
|
||||
<th>{{ trans('texts.due_date') }}</th>
|
||||
<th>{{ trans('texts.balance_due') }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($upcoming as $invoice)
|
||||
@ -129,12 +129,12 @@
|
||||
<div class="col-md-3">
|
||||
<div class="active-clients">
|
||||
<div class="in-bold in-white" style="font-size:42px">{{ $activeClients }}</div>
|
||||
<div class="in-thin in-white">{{ Utils::pluralize('active client', $activeClients) }}</div>
|
||||
<div class="in-thin in-white">{{ Utils::pluralize('active_client', $activeClients) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="average-invoice">
|
||||
<div><b>Average invoice</b></div>
|
||||
<div><b>{{ trans('texts.average_invoice') }}</b></div>
|
||||
<div class="in-bold in-white" style="font-size:42px">{{ $invoiceAvg }}</div>
|
||||
</div>
|
||||
|
||||
|
@ -60,6 +60,19 @@
|
||||
var currency = currencyMap[currency_id];
|
||||
return accounting.formatMoney(value, hide_symbol ? '' : currency.symbol, currency.precision, currency.thousand_separator, currency.decimal_separator);
|
||||
}
|
||||
|
||||
/* Set the defaults for DataTables initialisation */
|
||||
$.extend( true, $.fn.dataTable.defaults, {
|
||||
"sDom": "t<'row-fluid'<'span6'i><'span6'p>>",
|
||||
"sPaginationType": "bootstrap",
|
||||
"bInfo": true,
|
||||
"oLanguage": {
|
||||
'sEmptyTable': "{{ trans('texts.empty_table') }}",
|
||||
'sLengthMenu': '_MENU_',
|
||||
'sSearch': ''
|
||||
}
|
||||
} );
|
||||
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@ -84,7 +97,7 @@
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbar-collapse-1">
|
||||
<ul class="nav navbar-nav" style="font-weight: bold">
|
||||
{{ HTML::nav_link('dashboard', 'Dashboard') }}
|
||||
{{ HTML::nav_link('dashboard', 'dashboard') }}
|
||||
{{ HTML::menu_link('client') }}
|
||||
{{ HTML::menu_link('invoice') }}
|
||||
{{ HTML::menu_link('payment') }}
|
||||
@ -140,16 +153,16 @@
|
||||
|
||||
<form class="navbar-form navbar-right" role="search">
|
||||
<div class="form-group">
|
||||
<input type="text" id="search" class="form-control" placeholder="Search">
|
||||
<input type="text" id="search" class="form-control" placeholder="{{ trans('texts.search') }}">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">History <b class="caret"></b></a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ trans('texts.history') }} <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
@if (count(Session::get(RECENTLY_VIEWED)) == 0)
|
||||
<li><a href="#">No items</a></li>
|
||||
<li><a href="#">{{ trans('texts.no_items') }}</a></li>
|
||||
@else
|
||||
@foreach (Session::get(RECENTLY_VIEWED) as $link)
|
||||
<li><a href="{{ $link->url }}">{{ $link->name }}</a></li>
|
||||
@ -311,7 +324,7 @@
|
||||
@endif
|
||||
|
||||
@if ($_SERVER['SERVER_NAME'] != 'www.invoiceninja.com')
|
||||
<div class="container">Powered by <a href="https://www.invoiceninja.com/" target="_blank">InvoiceNinja.com</a></div>
|
||||
<div class="container">{{ trans('texts.powered_by') }} <a href="https://www.invoiceninja.com/" target="_blank">InvoiceNinja.com</a></div>
|
||||
@endif
|
||||
|
||||
<p> </p>
|
||||
|
@ -82,7 +82,7 @@
|
||||
</div>
|
||||
@else
|
||||
<div data-bind="visible: invoice_status_id() < CONSTS.INVOICE_STATUS_SENT">
|
||||
{{ Former::checkbox('recurring')->text('Enable <a href="#" onclick="showLearnMore()"><i class="glyphicon glyphicon-question-sign"></i> Learn more</a>')->data_bind("checked: is_recurring")
|
||||
{{ Former::checkbox('recurring')->text(trans('texts.enable').' <a href="#" onclick="showLearnMore()"><i class="glyphicon glyphicon-question-sign"></i> '.trans('texts.learn_more').'</a>')->data_bind("checked: is_recurring")
|
||||
->inlineHelp($invoice && $invoice->last_sent_date ? 'Last invoice sent ' . Utils::dateToString($invoice->last_sent_date) : '') }}
|
||||
</div>
|
||||
@endif
|
||||
@ -90,15 +90,15 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" id="col_2">
|
||||
{{ Former::text('invoice_number')->label(trans('fields.invoice_number_short'))->data_bind("value: invoice_number, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('po_number')->label(trans('fields.po_number_short'))->data_bind("value: po_number, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('invoice_number')->label(trans('texts.invoice_number_short'))->data_bind("value: invoice_number, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('po_number')->label(trans('texts.po_number_short'))->data_bind("value: po_number, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('discount')->data_bind("value: discount, valueUpdate: 'afterkeydown'")->append('%') }}
|
||||
{{-- Former::select('currency_id')->addOption('', '')->fromQuery($currencies, 'name', 'id')->data_bind("value: currency_id") --}}
|
||||
|
||||
<div class="form-group" style="margin-bottom: 8px">
|
||||
<label for="recurring" class="control-label col-lg-4 col-sm-4">Taxes</label>
|
||||
<label for="recurring" class="control-label col-lg-4 col-sm-4">{{ trans('texts.taxes') }}</label>
|
||||
<div class="col-lg-8 col-sm-8" style="padding-top: 7px">
|
||||
<a href="#" data-bind="click: $root.showTaxesForm"><i class="glyphicon glyphicon-list-alt"></i> Manage rates</a>
|
||||
<a href="#" data-bind="click: $root.showTaxesForm"><i class="glyphicon glyphicon-list-alt"></i> {{ trans('texts.manage_rates') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -113,12 +113,12 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="min-width:32px;" class="hide-border"></th>
|
||||
<th style="min-width:160px">Item</th>
|
||||
<th style="width:100%">Description</th>
|
||||
<th style="min-width:120px">Unit Cost</th>
|
||||
<th style="min-width:120px">Quantity</th>
|
||||
<th style="min-width:120px;display:none;" data-bind="visible: $root.invoice_item_taxes.show">Tax</th>
|
||||
<th style="min-width:120px;">Line Total</th>
|
||||
<th style="min-width:160px">{{ trans('texts.item') }}</th>
|
||||
<th style="width:100%">{{ trans('texts.description') }}</th>
|
||||
<th style="min-width:120px">{{ trans('texts.unit_cost') }}</th>
|
||||
<th style="min-width:120px">{{ trans('texts.quantity') }}</th>
|
||||
<th style="min-width:120px;display:none;" data-bind="visible: $root.invoice_item_taxes.show">{{ trans('texts.tax') }}</th>
|
||||
<th style="min-width:120px;">{{ trans('texts.line_total') }}</th>
|
||||
<th style="min-width:32px;" class="hide-border"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -157,41 +157,41 @@
|
||||
<td colspan="2" rowspan="5">
|
||||
<br/>
|
||||
{{ Former::textarea('public_notes')->data_bind("value: wrapped_notes, valueUpdate: 'afterkeydown'")
|
||||
->label(false)->placeholder('Note to client')->style('width: 520px; resize: none') }}
|
||||
->label(false)->placeholder(trans('texts.note_to_client'))->style('width: 520px; resize: none') }}
|
||||
{{ Former::textarea('terms')->data_bind("value: wrapped_terms, valueUpdate: 'afterkeydown'")
|
||||
->label(false)->placeholder('Invoice terms')->style('width: 520px; resize: none')
|
||||
->label(false)->placeholder(trans('texts.invoice_terms'))->style('width: 520px; resize: none')
|
||||
->addGroupClass('less-space-bottom') }}
|
||||
<label class="checkbox" style="width: 200px">
|
||||
<input type="checkbox" style="width: 24px" data-bind="checked: set_default_terms"/>Save as default terms
|
||||
<input type="checkbox" style="width: 24px" data-bind="checked: set_default_terms"/>{{ trans('texts.save_as_default_terms') }}
|
||||
</label>
|
||||
</td>
|
||||
<td style="display:none" data-bind="visible: $root.invoice_item_taxes.show"/>
|
||||
<td colspan="2">Subtotal</td>
|
||||
<td colspan="2">{{ trans('texts.subtotal') }}</td>
|
||||
<td style="text-align: right"><span data-bind="text: totals.subtotal"/></td>
|
||||
</tr>
|
||||
<tr style="display:none" data-bind="visible: discount() > 0">
|
||||
<td class="hide-border" colspan="3"/>
|
||||
<td style="display:none" class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
||||
<td colspan="2">Discount</td>
|
||||
<td colspan="2">{{ trans('texts.discount') }}</td>
|
||||
<td style="text-align: right"><span data-bind="text: totals.discounted"/></td>
|
||||
</tr>
|
||||
<tr style="display:none" data-bind="visible: $root.invoice_taxes.show">
|
||||
<td class="hide-border" colspan="3"/>
|
||||
<td style="display:none" class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
||||
<td>Tax</td>
|
||||
<td>{{ trans('texts.tax') }}</td>
|
||||
<td style="min-width:120px"><select class="form-control" style="width:100%" data-bind="value: tax, options: $root.tax_rates, optionsText: 'displayName'"></select></td>
|
||||
<td style="text-align: right"><span data-bind="text: totals.taxAmount"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hide-border" colspan="3"/>
|
||||
<td style="display:none" class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
||||
<td colspan="2">Paid to Date</td>
|
||||
<td colspan="2">{{ trans('texts.paid_to_date') }}</td>
|
||||
<td style="text-align: right" data-bind="text: totals.paidToDate"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hide-border" colspan="3"/>
|
||||
<td style="display:none" class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
||||
<td colspan="2"><b>Balance Due</b></td>
|
||||
<td colspan="2"><b>{{ trans('texts.balance_due') }}</b></td>
|
||||
<td style="text-align: right"><span data-bind="text: totals.total"/></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@ -214,26 +214,25 @@
|
||||
->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id") }}
|
||||
|
||||
|
||||
{{ Button::primary('Download PDF', array('onclick' => 'onDownloadClick()'))->append_with_icon('download-alt'); }}
|
||||
{{ Button::primary(trans('texts.download_pdf'), array('onclick' => 'onDownloadClick()'))->append_with_icon('download-alt'); }}
|
||||
|
||||
@if (!$invoice || (!$invoice->trashed() && !$invoice->client->trashed()))
|
||||
@if ($invoice)
|
||||
|
||||
<div id="primaryActions" style="text-align:left" class="btn-group">
|
||||
<button class="btn-success btn" type="button">Save Invoice</button>
|
||||
<button class="btn-success btn" type="button">{{ trans('texts.save_invoice') }}</button>
|
||||
<button class="btn-success btn dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="javascript:onSaveClick()" id="saveButton">Save Invoice</a></li>
|
||||
<li><a href="javascript:onCloneClick()">Clone Invoice</a></li>
|
||||
<li><a href="javascript:onSaveClick()" id="saveButton">{{ trans('texts.save_invoice') }}</a></li>
|
||||
<li><a href="javascript:onCloneClick()">{{ trans('texts.clone_invoice') }}</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="javascript:onArchiveClick()">Archive Invoice</a></li>
|
||||
<li><a href="javascript:onDeleteClick()">Delete Invoice</a></li>
|
||||
<li><a href="javascript:onArchiveClick()">{{ trans('texts.archive_invoice') }}</a></li>
|
||||
<li><a href="javascript:onDeleteClick()">{{ trans('texts.delete_invoice') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
{{-- DropdownButton::normal('Download PDF',
|
||||
Navigation::links(
|
||||
array(
|
||||
@ -257,13 +256,13 @@
|
||||
)
|
||||
, array('id'=>'primaryActions', 'style'=>'text-align:left', 'data-bind'=>'css: $root.enable.save'))->split(); --}}
|
||||
@else
|
||||
{{ Button::success('Save Invoice', array('id' => 'saveButton', 'onclick' => 'onSaveClick()')) }}
|
||||
{{ Button::success(trans('texts.save_invoice'), array('id' => 'saveButton', 'onclick' => 'onSaveClick()')) }}
|
||||
@endif
|
||||
|
||||
{{ Button::normal('Email Invoice', array('id' => 'email_button', 'onclick' => 'onEmailClick()'))->append_with_icon('send'); }}
|
||||
{{ Button::normal(trans('texts.email_invoice'), array('id' => 'email_button', 'onclick' => 'onEmailClick()'))->append_with_icon('send'); }}
|
||||
|
||||
@if ($invoice)
|
||||
{{ Button::primary('Enter Payment', array('onclick' => 'onPaymentClick()'))->append_with_icon('usd'); }}
|
||||
{{ Button::primary(trans('texts.enter_payment'), array('onclick' => 'onPaymentClick()'))->append_with_icon('usd'); }}
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@ -281,20 +280,20 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="clientModalLabel">Client</h4>
|
||||
<h4 class="modal-title" id="clientModalLabel">{{ trans('texts.client') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="container" style="width: 100%">
|
||||
<div style="background-color: #fff" class="row" data-bind="with: client" onkeypress="clientModalEnterClick(event)">
|
||||
<div class="col-md-6" style="margin-left:0px;margin-right:0px" >
|
||||
|
||||
{{ Former::legend('Organization') }}
|
||||
{{ Former::legend('organization') }}
|
||||
{{ Former::text('name')->data_bind("value: name, valueUpdate: 'afterkeydown', attr { placeholder: name.placeholder }") }}
|
||||
{{ Former::text('website')->data_bind("value: website, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('work_phone')->data_bind("value: work_phone, valueUpdate: 'afterkeydown'") }}
|
||||
|
||||
|
||||
{{ Former::legend('Address') }}
|
||||
{{ Former::legend('address') }}
|
||||
{{ Former::text('address1')->data_bind("value: address1, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('address2')->data_bind("value: address2, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('city')->data_bind("value: city, valueUpdate: 'afterkeydown'") }}
|
||||
@ -307,7 +306,7 @@
|
||||
<div class="col-md-6" style="margin-left:0px;margin-right:0px" >
|
||||
|
||||
|
||||
{{ Former::legend('Contacts') }}
|
||||
{{ Former::legend('contacts') }}
|
||||
<div data-bind='template: { foreach: contacts,
|
||||
beforeRemove: hideContact,
|
||||
afterAdd: showContact }'>
|
||||
@ -320,16 +319,16 @@
|
||||
<div class="form-group">
|
||||
<div class="col-lg-8 col-lg-offset-4">
|
||||
<span class="redlink bold" data-bind="visible: $parent.contacts().length > 1">
|
||||
{{ link_to('#', 'Remove contact -', array('data-bind'=>'click: $parent.removeContact')) }}
|
||||
{{ link_to('#', trans('texts.remove_contact').' -', array('data-bind'=>'click: $parent.removeContact')) }}
|
||||
</span>
|
||||
<span data-bind="visible: $index() === ($parent.contacts().length - 1)" class="pull-right greenlink bold">
|
||||
{{ link_to('#', 'Add contact +', array('data-bind'=>'click: $parent.addContact')) }}
|
||||
{{ link_to('#', trans('texts.add_contact').' +', array('data-bind'=>'click: $parent.addContact')) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Former::legend('Additional Info') }}
|
||||
{{ Former::legend('additional_info') }}
|
||||
{{ Former::select('payment_terms')->addOption('','0')->data_bind('value: payment_terms')
|
||||
->fromQuery($paymentTerms, 'name', 'num_days') }}
|
||||
{{ Former::select('currency_id')->addOption('','')->data_bind('value: currency_id')
|
||||
@ -346,9 +345,9 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-footer" style="margin-top: 0px">
|
||||
<span class="error-block" id="emailError" style="display:none;float:left;font-weight:bold">Please provide a valid email address.</span><span> </span>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button id="clientDoneButton" type="button" class="btn btn-primary" data-bind="click: $root.clientFormComplete">Done</button>
|
||||
<span class="error-block" id="emailError" style="display:none;float:left;font-weight:bold">{{ trans('texts.provide_email') }}</span><span> </span>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.cancel') }}</button>
|
||||
<button id="clientDoneButton" type="button" class="btn btn-primary" data-bind="click: $root.clientFormComplete">{{ trans('texts.done') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -360,7 +359,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="taxModalLabel">Tax Rates</h4>
|
||||
<h4 class="modal-title" id="taxModalLabel">{{ trans('texts.tax_rates') }}</h4>
|
||||
</div>
|
||||
|
||||
<div style="background-color: #fff" onkeypress="taxModalEnterClick(event)">
|
||||
@ -368,8 +367,8 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="hide-border"></th>
|
||||
<th class="hide-border">Name</th>
|
||||
<th class="hide-border">Rate</th>
|
||||
<th class="hide-border">{{ trans('texts.name') }}</th>
|
||||
<th class="hide-border">{{ trans('texts.rate') }}</th>
|
||||
<th class="hide-border"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -390,9 +389,9 @@
|
||||
</table>
|
||||
|
||||
|
||||
{{ Former::checkbox('invoice_taxes')->text('Enable specifying an <b>invoice tax</b>')
|
||||
->label('Settings')->data_bind('checked: $root.invoice_taxes, enable: $root.tax_rates().length > 1') }}
|
||||
{{ Former::checkbox('invoice_item_taxes')->text('Enable specifying <b>line item taxes</b>')
|
||||
{{ Former::checkbox('invoice_taxes')->text(trans('texts.enable_invoice_tax'))
|
||||
->label(trans('texts.settings'))->data_bind('checked: $root.invoice_taxes, enable: $root.tax_rates().length > 1') }}
|
||||
{{ Former::checkbox('invoice_item_taxes')->text(trans('texts.enable_line_item_tax'))
|
||||
->label(' ')->data_bind('checked: $root.invoice_item_taxes, enable: $root.tax_rates().length > 1') }}
|
||||
|
||||
<br/>
|
||||
@ -401,7 +400,7 @@
|
||||
|
||||
<div class="modal-footer" style="margin-top: 0px">
|
||||
<!-- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> -->
|
||||
<button type="button" class="btn btn-primary" data-bind="click: $root.taxFormComplete">Done</button>
|
||||
<button type="button" class="btn btn-primary" data-bind="click: $root.taxFormComplete">{{ trans('texts.done') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -413,22 +412,11 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="recurringModalLabel">Recurring Invoices</h4>
|
||||
<h4 class="modal-title" id="recurringModalLabel">{{ trans('texts.recurring_invoices') }}</h4>
|
||||
</div>
|
||||
|
||||
<div style="background-color: #fff; padding-left: 16px; padding-right: 16px">
|
||||
|
||||
<p>Automatically send clients the same invoices weekly, bi-monthly, monthly, quarterly or annually. </p>
|
||||
|
||||
<p>Use :MONTH, :QUARTER or :YEAR for dynamic dates. Basic math works as well, for example :MONTH-1.</p>
|
||||
|
||||
<p>Examples of dynamic invoice variables:</p>
|
||||
<ul>
|
||||
<li>"Gym membership for the month of :MONTH" => "Gym membership for the month of July"</li>
|
||||
<li>":YEAR+1 yearly subscription" => "2015 Yearly Subscription"</li>
|
||||
<li>"Retainer payment for :QUARTER+1" => "Retainer payment for Q2"</li>
|
||||
</ul>
|
||||
|
||||
{{ trans('texts.recurring_help') }}
|
||||
</div>
|
||||
|
||||
<div class="modal-footer" style="margin-top: 0px">
|
||||
@ -957,7 +945,7 @@
|
||||
self.clientLinkText = ko.computed(function() {
|
||||
if (self.invoice().client().public_id())
|
||||
{
|
||||
return 'Edit client details';
|
||||
return "{{ trans('texts.edit_client_details') }}";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -967,7 +955,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
return 'Create new client';
|
||||
return "{{ trans('texts.create_new_client') }}";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -8,23 +8,23 @@
|
||||
{{ Former::text('id') }}
|
||||
</div>
|
||||
|
||||
{{ DropdownButton::normal('Archive',
|
||||
{{ DropdownButton::normal(trans('texts.archive'),
|
||||
Navigation::links(
|
||||
array(
|
||||
array('Archive '.ucwords($entityType), "javascript:submitForm('archive')"),
|
||||
array('Delete '.ucwords($entityType), "javascript:submitForm('delete')"),
|
||||
array(trans('texts.archive_'.$entityType), "javascript:submitForm('archive')"),
|
||||
array(trans('texts.delete_'.$entityType), "javascript:submitForm('delete')"),
|
||||
)
|
||||
)
|
||||
, array('id'=>'archive'))->split(); }}
|
||||
|
||||
<label for="trashed" style="font-weight:normal; margin-left: 10px;">
|
||||
<input id="trashed" type="checkbox" onclick="setTrashVisible()"
|
||||
{{ Session::get('show_trash') ? 'checked' : ''}}/> Show archived/deleted {{ $entityType }}s
|
||||
{{ Session::get('show_trash') ? 'checked' : ''}}/> {{ trans('texts.show_archived_deleted')}} {{ strtolower(trans('texts.'.$entityType.'s')) }}
|
||||
</label>
|
||||
|
||||
<div id="top_right_buttons" class="pull-right">
|
||||
<input id="tableFilter" type="text" style="width:140px;margin-right:17px" class="form-control pull-left" placeholder="Filter"/>
|
||||
{{ Button::success_link(URL::to($entityType . 's/create'), 'New ' . Utils::getEntityName($entityType), array('class' => 'pull-right'))->append_with_icon('plus-sign'); }}
|
||||
<input id="tableFilter" type="text" style="width:140px;margin-right:17px" class="form-control pull-left" placeholder="{{ trans('texts.filter') }}"/>
|
||||
{{ Button::success_link(URL::to($entityType . 's/create'), trans("texts.new_$entityType"), array('class' => 'pull-right'))->append_with_icon('plus-sign'); }}
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -83,7 +83,8 @@
|
||||
|
||||
<!--<a href="https://twitter.com/invoiceninja" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @invoiceninja</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>-->
|
||||
<div class="fb-like" data-href="https://www.invoiceninja.com" data-layout="button" data-action="like" data-show-faces="false" data-share="false"></div>
|
||||
<!--<div class="fb-like" data-href="https://www.invoiceninja.com" data-layout="button" data-action="like" data-show-faces="false" data-share="false"></div> -->
|
||||
<div class="fb-share-button" data-href="https://www.invoiceninja.com/" data-type="button"></div>
|
||||
|
||||
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="https://www.invoiceninja.com/" data-via="invoiceninja" data-related="hillelcoren" data-count="none" data-text="Free online invoicing">Tweet</a>
|
||||
|
@ -183,22 +183,6 @@ function getQuarter(offset) {
|
||||
return 'Q' + quarter;
|
||||
}
|
||||
|
||||
/* Set the defaults for DataTables initialisation */
|
||||
$.extend( true, $.fn.dataTable.defaults, {
|
||||
"sDom": "t<'row-fluid'<'span6'i><'span6'p>>",
|
||||
//"sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
|
||||
"sPaginationType": "bootstrap",
|
||||
//"bProcessing": true,
|
||||
//"iDisplayLength": 50,
|
||||
"bInfo": true,
|
||||
"oLanguage": {
|
||||
//"sLengthMenu": "_MENU_ records per page"
|
||||
"sLengthMenu": "_MENU_",
|
||||
"sSearch": ""
|
||||
}
|
||||
//"sScrollY": "500px",
|
||||
} );
|
||||
|
||||
|
||||
/* Default class modification */
|
||||
$.extend( $.fn.dataTableExt.oStdClasses, {
|
||||
|
Loading…
Reference in New Issue
Block a user