Updating text files

This commit is contained in:
Hillel Coren 2015-01-25 22:44:36 +02:00
parent 31b4e17c18
commit 1e288aafdf
15 changed files with 82 additions and 9 deletions

View File

@ -703,18 +703,27 @@ class AccountController extends \BaseController
$user->phone = trim(Input::get('phone'));
$user->save();
}
/* Logo image file */
if ($file = Input::file('logo')) {
$path = Input::file('logo')->getRealPath();
File::delete('logo/'.$account->account_key.'.jpg');
$image = Image::make($path)->resize(200, 120, true, false);
Image::canvas($image->width, $image->height, '#FFFFFF')->insert($image)->save($account->getLogoPath());
$image = Image::make($path);
$mimeType = $file->getMimeType();
if ($image->width == 200 && $mimeType == 'image/jpeg') {
$file->move('logo/', $account->account_key . '.jpg');
} else {
$image->resize(200, 120, true, false);
Image::canvas($image->width, $image->height, '#FFFFFF')->insert($image)->save($account->getLogoPath());
}
//$image = Image::make($path)->resize(200, 120, true, false);
//Image::canvas($image->width, $image->height, '#FFFFFF')->insert($image)->save($account->getLogoPath());
}
Event::fire('user.refresh');
Session::flash('message', trans('texts.updated_settings'));
return Redirect::to('company/details');

View File

@ -493,5 +493,11 @@ return array(
'discount_percent' => 'Percent',
'discount_amount' => 'Amount',
'invoice_history' => 'Invoice History',
'quote_history' => 'Quote History',
'current_version' => 'Current version',
'select_versiony' => 'Select version',
'view_history' => 'View History',
);

View File

@ -483,6 +483,11 @@ return array(
'discount_percent' => 'Percent',
'discount_amount' => 'Amount',
'invoice_history' => 'Invoice History',
'quote_history' => 'Quote History',
'current_version' => 'Current version',
'select_versiony' => 'Select version',
'view_history' => 'View History',
);

View File

@ -463,5 +463,11 @@ return array(
'discount_percent' => 'Percent',
'discount_amount' => 'Amount',
'invoice_history' => 'Invoice History',
'quote_history' => 'Quote History',
'current_version' => 'Current version',
'select_versiony' => 'Select version',
'view_history' => 'View History',
);

View File

@ -484,5 +484,11 @@ return array(
'discount_percent' => 'Percent',
'discount_amount' => 'Amount',
'invoice_history' => 'Invoice History',
'quote_history' => 'Quote History',
'current_version' => 'Current version',
'select_versiony' => 'Select version',
'view_history' => 'View History',
);

View File

@ -486,6 +486,11 @@ return array(
'discount_percent' => 'Percent',
'discount_amount' => 'Amount',
'invoice_history' => 'Invoice History',
'quote_history' => 'Quote History',
'current_version' => 'Current version',
'select_versiony' => 'Select version',
'view_history' => 'View History',
);

View File

@ -494,6 +494,11 @@ return array(
'discount_percent' => 'Percent',
'discount_amount' => 'Amount',
'invoice_history' => 'Invoice History',
'quote_history' => 'Quote History',
'current_version' => 'Current version',
'select_versiony' => 'Select version',
'view_history' => 'View History',
);

View File

@ -492,6 +492,12 @@ return array(
'discount_percent' => 'Percent',
'discount_amount' => 'Amount',
'invoice_history' => 'Invoice History',
'quote_history' => 'Quote History',
'current_version' => 'Current version',
'select_versiony' => 'Select version',
'view_history' => 'View History',
);

View File

@ -487,6 +487,12 @@ return array(
'discount_percent' => 'Percent',
'discount_amount' => 'Amount',
'invoice_history' => 'Invoice History',
'quote_history' => 'Quote History',
'current_version' => 'Current version',
'select_versiony' => 'Select version',
'view_history' => 'View History',
);

View File

@ -474,6 +474,11 @@ return array(
'discount_percent' => 'Percent',
'discount_amount' => 'Amount',
'invoice_history' => 'Invoice History',
'quote_history' => 'Quote History',
'current_version' => 'Current version',
'select_versiony' => 'Select version',
'view_history' => 'View History',

View File

@ -24,9 +24,9 @@
<p>&nbsp;</p>
@if ($invoice->client->account->isGatewayConfigured() && !$invoice->isPaid() && !$invoice->is_recurring)
<div class="pull-right" style="width:270px">
{{ Button::normal(trans('texts.download_pdf'), array('onclick' => 'onDownloadClick()', 'class' => 'btn-lg')) }}
{{ Button::success_link(URL::to('payment/' . $invitation->invitation_key), trans('texts.pay_now'), array('class' => 'btn-lg pull-right')) }}
<div class="pull-right" style="text-align:right">
{{ Button::normal(trans('texts.download_pdf'), array('onclick' => 'onDownloadClick()', 'class' => 'btn-lg')) }}&nbsp;&nbsp;
{{ Button::success_link(URL::to('payment/' . $invitation->invitation_key), trans('texts.pay_now'), array('class' => 'btn-lg')) }}
</div>
@else
<div class="pull-right">
@ -53,9 +53,10 @@
refreshPDF();
});
function onDownloadClick() {
function onDownloadClick() {
var doc = generatePDF(invoice, invoice.invoice_design.javascript, true);
doc.save('Invoice-' + invoice.invoice_number + '.pdf');
var fileName = invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice;
doc.save(fileName + '-' + invoice.invoice_number + '.pdf');
}

View File

@ -1386,6 +1386,12 @@ table.compare-table-paid th {
}
}
/* Hide bootstrap sort header icons */
table.table thead .sorting:after { content: '' !important }
table.table thead .sorting_asc:after { content: '' !important }
table.table thead .sorting_desc:after { content: '' !important}
table.table thead .sorting_asc_disabled:after { content: '' !important }
table.table thead .sorting_desc_disabled:after { content: '' !important }
/*
* Table styles
*/

View File

@ -1369,3 +1369,10 @@ table.compare-table-paid th {
display: none !important;
}
}
/* Hide bootstrap sort header icons */
table.table thead .sorting:after { content: '' !important }
table.table thead .sorting_asc:after { content: '' !important }
table.table thead .sorting_desc:after { content: '' !important}
table.table thead .sorting_asc_disabled:after { content: '' !important }
table.table thead .sorting_desc_disabled:after { content: '' !important }

0
public/logo/.gitkeep Normal file → Executable file
View File

0
public/logo/zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB