diff --git a/README.md b/README.md
index ad03017fff47..24fa8714447a 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
Most online invoicing sites are expensive. They shouldn't be. The aim of this project is to provide a free, open-source alternative. Additionally, the hope is the codebase will serve as a sample site for Laravel as well as other JavaScript technologies.
-For updates follow [@invoiceninja](https://twitter.com/invoiceninja) and [@hillelcoren](https://twitter.com/hillelcoren)
+For updates follow [@invoiceninja](https://twitter.com/invoiceninja) or join the [Facebook Group](https://www.facebook.com/invoiceninja)
Site design by [kantorp-wegl.in](http://kantorp-wegl.in/)
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index e76a91db5e13..81b69709a058 100755
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -530,7 +530,7 @@ class AccountController extends \BaseController {
{
$path = Input::file('logo')->getRealPath();
File::delete('logo/' . $account->account_key . '.jpg');
- Image::make($path)->resize(120, 80, true, false)->save('logo/' . $account->account_key . '.jpg');
+ Image::make($path)->resize(null, 120, true, false)->save('logo/' . $account->account_key . '.jpg');
}
Event::fire('user.refresh');
diff --git a/app/controllers/InvoiceController.php b/app/controllers/InvoiceController.php
index 7d16724aec52..629e6df79e33 100755
--- a/app/controllers/InvoiceController.php
+++ b/app/controllers/InvoiceController.php
@@ -206,6 +206,12 @@ class InvoiceController extends \BaseController {
public static function getViewModel()
{
+ // Temporary fix to let users know to re-upload their logos for higher res
+ if (Auth::user()->account->getLogoHeight() == 80)
+ {
+ Session::flash('warning', "We've increased the logo resolution in the PDF. Please re-upload your logo to take advantage of it.");
+ }
+
return [
'account' => Auth::user()->account,
'products' => Product::scope()->orderBy('id')->get(array('product_key','notes','cost','qty')),
diff --git a/app/routes.php b/app/routes.php
index a55f6907c064..d8177f4d5b3d 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -166,7 +166,13 @@ HTML::macro('breadcrumbs', function() {
$str = '
';
// Get the breadcrumbs by exploding the current path.
- $crumbs = explode('/', str_replace(Utils::basePath(), '', $_SERVER['REQUEST_URI']));
+ $basePath = Utils::basePath();
+ $path = $_SERVER['REQUEST_URI'];
+ if ($basePath != '/')
+ {
+ $path = str_replace($basePath, '', $path);
+ }
+ $crumbs = explode('/', $path);
foreach ($crumbs as $key => $val)
{
@@ -175,6 +181,7 @@ HTML::macro('breadcrumbs', function() {
unset($crumbs[$key]);
}
}
+
$crumbs = array_values($crumbs);
for ($i=0; $ilabel('Email') }}
{{ Former::text('work_phone')->label('Phone') }}
- {{ Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp('Supported: JPEG, GIF and PNG. Recommended size: 120px width, 80px height') }}
+ {{ Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp('Supported: JPEG, GIF and PNG. Recommended height: 120px') }}
@if (file_exists($account->getLogoPath()))
diff --git a/app/views/header.blade.php b/app/views/header.blade.php
index f439b6a46dda..95c32ffd068a 100755
--- a/app/views/header.blade.php
+++ b/app/views/header.blade.php
@@ -164,6 +164,10 @@
{{ HTML::breadcrumbs() }}
@endif
+ @if (Session::has('warning'))
+ {{ Session::get('warning') }}
+ @endif
+
@if (Session::has('message'))
{{ Session::get('message') }}
@endif
diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php
index 9b1b2fa26037..bcdd34be910c 100755
--- a/app/views/invoices/edit.blade.php
+++ b/app/views/invoices/edit.blade.php
@@ -578,8 +578,8 @@
@if (file_exists($account->getLogoPath()))
invoice.image = "{{ HTML::image_data($account->getLogoPath()) }}";
- invoice.imageWidth = {{ $account->getLogoWidth() }};
- invoice.imageHeight = {{ $account->getLogoHeight() }};
+ invoice.imageWidth = {{ $account->getLogoWidth() * (72/96) }};
+ invoice.imageHeight = {{ $account->getLogoHeight() * (72/96) }};
@endif
diff --git a/public/js/script.js b/public/js/script.js
index d14a8ea63fab..2208e4dac422 100644
--- a/public/js/script.js
+++ b/public/js/script.js
@@ -15,7 +15,7 @@ function GetReportTemplate4(doc, invoice, layout, checkMath) {
if (invoice.image)
{
var left = layout.headerRight - invoice.imageWidth;
- doc.addImage(invoice.image, 'JPEG', left, 30, invoice.imageWidth, invoice.imageHeight);
+ doc.addImage(invoice.image, 'JPEG', left, 20);
}
/* table header */
@@ -700,7 +700,7 @@ function GetReportTemplate1(doc, invoice, layout, checkMath)
if (invoice.image)
{
var left = layout.headerRight - invoice.imageWidth;
- doc.addImage(invoice.image, 'JPEG', layout.marginLeft, layout.accountTop, invoice.imageWidth, invoice.imageHeight);
+ doc.addImage(invoice.image, 'JPEG', layout.marginLeft, 20);
}
if (invoice.imageLogo1)
@@ -822,7 +822,7 @@ function GetReportTemplate2(doc, invoice, layout, checkMath)
if (invoice.image)
{
var left = layout.headerRight - invoice.imageWidth;
- doc.addImage(invoice.image, 'JPEG', layout.marginLeft, 30, invoice.imageWidth, invoice.imageHeight);
+ doc.addImage(invoice.image, 'JPEG', layout.marginLeft, 30);
}
Report2AddFooter (invoice,doc);
@@ -1140,7 +1140,7 @@ function GetReportTemplate3(doc, invoice, layout, checkMath)
{
y=130;
var left = layout.headerRight - invoice.imageWidth;
- doc.addImage(invoice.image, 'JPEG', layout.marginLeft, y, invoice.imageWidth, invoice.imageHeight);
+ doc.addImage(invoice.image, 'JPEG', layout.marginLeft, y);
}
Report3AddFooter (invoice, account, doc, layout);