diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php index 3b4776c1f389..174ae6721048 100755 --- a/app/controllers/HomeController.php +++ b/app/controllers/HomeController.php @@ -16,22 +16,22 @@ class HomeController extends BaseController { public function showWelcome() { - return View::make('splash'); + return View::make('public.splash'); } public function showAboutUs() { - return View::make('about_us'); + return View::make('public.about_us'); } public function showContactUs() { - return View::make('contact_us'); + return View::make('public.contact_us'); } public function showTerms() { - return View::make('terms'); + return View::make('public.terms'); } public function doContactUs() diff --git a/app/controllers/PaymentController.php b/app/controllers/PaymentController.php index 9d73671cbaf3..af2834da19bc 100755 --- a/app/controllers/PaymentController.php +++ b/app/controllers/PaymentController.php @@ -180,7 +180,15 @@ class PaymentController extends \BaseController $account = $invitation->invoice->client->account; if ($account->isGatewayConfigured(GATEWAY_PAYPAL_EXPRESS)) { - return self::do_payment($invitationKey, false); + if (Session::has('error')) + { + Session::reflash(); + return Redirect::to('view/' . $invitationKey); + } + else + { + return self::do_payment($invitationKey, false); + } } $invitation = Invitation::with('contact', 'invoice.client')->where('invitation_key', '=', $invitationKey)->firstOrFail(); @@ -291,7 +299,7 @@ class PaymentController extends \BaseController $invoice = $invitation->invoice; $accountGateway = $invoice->client->account->account_gateways[0]; - $payment = Payment::createNew(); + $payment = Payment::createNew($invitation); $payment->invitation_id = $invitation->id; $payment->account_gateway_id = $accountGateway->id; $payment->invoice_id = $invoice->id; @@ -334,7 +342,7 @@ class PaymentController extends \BaseController $invoice->invoice_status_id = INVOICE_STATUS_PAID; $invoice->save(); - + Event::fire('invoice.paid', $payment); Session::flash('message', 'Successfully applied payment'); diff --git a/app/controllers/UserController.php b/app/controllers/UserController.php index 91e93febe11f..89d8c7504695 100755 --- a/app/controllers/UserController.php +++ b/app/controllers/UserController.php @@ -249,10 +249,13 @@ class UserController extends BaseController { */ public function logout() { - if (!Auth::user()->registered) + if (Auth::check()) { - $account = Auth::user()->account; - $account->forceDelete(); + if (!Auth::user()->registered) + { + $account = Auth::user()->account; + $account->forceDelete(); + } } Confide::logout(); diff --git a/app/routes.php b/app/routes.php index 5b8bc8d7d2b2..332bd03adfdd 100755 --- a/app/routes.php +++ b/app/routes.php @@ -136,7 +136,9 @@ HTML::macro('breadcrumbs', function() { // Get the breadcrumbs by exploding the current path. $basePath = Utils::basePath(); - $path = $_SERVER['REQUEST_URI']; + $parts = explode('?', $_SERVER['REQUEST_URI']); + $path = $parts[0]; + if ($basePath != '/') { $path = str_replace($basePath, '', $path); diff --git a/app/views/about_us.blade.php b/app/views/about_us.blade.php deleted file mode 100644 index 68caa700259a..000000000000 --- a/app/views/about_us.blade.php +++ /dev/null @@ -1,170 +0,0 @@ -@extends('master') - -@section('head') - - - - - -@stop - -@section('body') - -{{ Form::open(array('url' => 'get_started', 'id' => 'startForm')) }} -{{ Form::hidden('guest_key') }} -{{ Form::close() }} - - - - - -
-
-
-

WHY INVOICE NINJA? -

-
-
-
- -
-
-
-
-

Open Source Platform

-

Free yourself from online invoicing platforms with high monthly fees and limited functionality. Being open source allows us fast app development, security audits by the open-course community, and we can keep it FREE!

-
-
-
-
- -
-
-
-
-
- -
-
-
-

Live PDF Creation

-

Look professional from day #1. Select one of our beautiful invoice templates to suit your company identity, switch between designs in real time to preview invoices & email them to clients with one click. The live preview PDF function was designed for an efficient and hassle-free experience, and it’s awesome! -

-
-
-
-
-
-
-
-
-

Online Payments

-

Authorize.net, Beanstream, PayPal? InvoiceNinja supports the most popular online payment gateways! If you need help integrating a third party gateway we don’t yet support, please contact us! We’re happy to help! If you need assistance of want to learn more about online payment solutions, contact us!

-
-
-
- -
-
-
-
-
- - - - - - @stop \ No newline at end of file diff --git a/app/views/contact_us.blade.php b/app/views/contact_us.blade.php deleted file mode 100644 index 1405c8c54bab..000000000000 --- a/app/views/contact_us.blade.php +++ /dev/null @@ -1,216 +0,0 @@ -@extends('master') - -@section('head') - - - - - - -@stop - -@section('body') - -{{ Form::open(array('url' => 'get_started', 'id' => 'startForm')) }} -{{ Form::hidden('guest_key') }} -{{ Form::close() }} - - - - - -
-
-
-

Contact us -

-
-
-
- -
-
-
- - - @if (Session::has('message')) -
{{ Session::get('message') }}
- @endif - - @if (Session::has('error')) -
{{ Session::get('error') }}
- @endif - - -
-
-

Questions, special requests, or just want to say hi?

-

Fill in the form below and we'll get back to you as soon as possible. Hope to hear from you!

- - {{ Form::open(['url' => 'contact', 'class' => 'feedbackForm']) }} -
- - -
-
- - -
-
- - -
-
-
- -
-
- - {{ Form::close() }} - -
-
-

Other ways to reach us

-

contact@invoiceninja.com

-

+1-800-763-1948

-

- -
-
-
-
- -
- - - - - - - - -@stop \ No newline at end of file diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php index 95454b8d02b4..e4c35c5c4e88 100755 --- a/app/views/invoices/edit.blade.php +++ b/app/views/invoices/edit.blade.php @@ -128,7 +128,7 @@ - {{ Former::text('product_key')->useDatalist(Product::getProductKeys($products), 'key')->onkeyup('onItemChange()') + {{ Former::text('product_key')->useDatalist(Product::getProductKeys($products), 'product_key')->onkeyup('onItemChange()') ->raw()->data_bind("value: product_key, valueUpdate: 'afterkeydown'")->addClass('datalist') }} diff --git a/app/views/public/about_us.blade.php b/app/views/public/about_us.blade.php new file mode 100644 index 000000000000..2623fcf69e3a --- /dev/null +++ b/app/views/public/about_us.blade.php @@ -0,0 +1,86 @@ +@extends('public.header') + +@section('content') +
+
+
+

WHY INVOICE NINJA? +

+
+
+
+ +
+
+
+
+

Open Source Platform

+

Free yourself from online invoicing platforms with high monthly fees and limited functionality. Being open source allows us fast app development, security audits by the open-course community, and we can keep it FREE!

+
+
+
+
+ +
+
+
+
+
+ +
+
+
+

Live PDF Creation

+

Look professional from day #1. Select one of our beautiful invoice templates to suit your company identity, switch between designs in real time to preview invoices & email them to clients with one click. The live preview PDF function was designed for an efficient and hassle-free experience, and it’s awesome! +

+
+
+
+
+
+
+
+
+

Online Payments

+

Authorize.net, Beanstream, PayPal? InvoiceNinja supports the most popular online payment gateways! If you need help integrating a third party gateway we don’t yet support, please contact us! We’re happy to help! If you need assistance of want to learn more about online payment solutions, contact us!

+
+
+
+ +
+
+
+
+
+ + + + +@stop \ No newline at end of file diff --git a/app/views/public/contact_us.blade.php b/app/views/public/contact_us.blade.php new file mode 100644 index 000000000000..d5f7cde55618 --- /dev/null +++ b/app/views/public/contact_us.blade.php @@ -0,0 +1,150 @@ +@extends('public.header') + + +@section('content') + + + +
+
+
+

Contact us +

+
+
+
+ +
+
+
+ + + @if (Session::has('message')) +
{{ Session::get('message') }}
+ @endif + + @if (Session::has('error')) +
{{ Session::get('error') }}
+ @endif + + +
+
+

Questions, special requests, or just want to say hi?

+

Fill in the form below and we'll get back to you as soon as possible. Hope to hear from you!

+ + {{ Form::open(['url' => 'contact', 'class' => 'feedbackForm']) }} +
+ + +
+
+ + +
+
+ + +
+
+
+ +
+
+ + {{ Form::close() }} + +
+
+

Other ways to reach us

+

contact@invoiceninja.com

+

+1-800-763-1948

+

+ +
+
+
+
+ +
+ + + + + + +@stop \ No newline at end of file diff --git a/app/views/public/header.blade.php b/app/views/public/header.blade.php new file mode 100644 index 000000000000..5a47e2290ddf --- /dev/null +++ b/app/views/public/header.blade.php @@ -0,0 +1,112 @@ +@extends('master') + +@section('head') + + + + + + +@stop + +@section('body') + +
+ + + +{{ Form::open(array('url' => 'get_started', 'id' => 'startForm')) }} +{{ Form::hidden('guest_key') }} +{{ Form::close() }} + + + + + + + + @yield('content') + + + + + + + +@stop \ No newline at end of file diff --git a/app/views/public/splash.blade.php b/app/views/public/splash.blade.php new file mode 100755 index 000000000000..2a520e2e525c --- /dev/null +++ b/app/views/public/splash.blade.php @@ -0,0 +1,113 @@ +@extends('public.header') + +@section('content') + + +
+
+ +
+
+
+
+

THE SIMPLE & + FREE WAY TO INVOICE + CLIENTS

+

It's that easy. Stop spending time on + complicated and expensive invoicing.
+ No fuss, just get started and get paid.

+
+
+
+
+ +
+ +
+
+ +
+
+
+
+
+
+

100% FREE, ALWAYS

+

Invoicing with no monthly fee, because you have enough bills already! Free, now and forever! Quality invoicing to build your business and get paid.

+
+
+ +
+
+
+

OPEN-SOURCE

+

Cloud-based, super secure, and user-developed. Open source platforms are a better way to do business (and save the world). Need we say more?

+
+
+ +
+
+
+

LIVE .PDF VIEW

+

Create beautiful email-ready .PDF invoices created instantly as you type. Our ‘Save & send’ feature saves you time and impresses clients.

+
+
+ +
+
+
+

ONLINE PAYMENTS

+

PayPal? Authorize.Net? Stripe? We support many payment technologies and if you need help or advice we’ll lend a hand (we’re pretty friendly).

+
+
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+

SIMPLE, INTUITIVE INVOICING.

+
+
+
+ + + + @stop \ No newline at end of file diff --git a/app/views/terms.blade.php b/app/views/public/terms.blade.php similarity index 72% rename from app/views/terms.blade.php rename to app/views/public/terms.blade.php index 1e3439714308..44776fa9fabf 100644 --- a/app/views/terms.blade.php +++ b/app/views/public/terms.blade.php @@ -1,29 +1,6 @@ -@extends('master') +@extends('public.header') -@section('head') - - - - - -@stop - -@section('body') - - - +@section('content')
@@ -170,41 +147,4 @@

 

 

- -
- -
- - @stop \ No newline at end of file +@stop \ No newline at end of file diff --git a/app/views/splash.blade.php b/app/views/splash.blade.php deleted file mode 100755 index a9700183b435..000000000000 --- a/app/views/splash.blade.php +++ /dev/null @@ -1,196 +0,0 @@ -@extends('master') - -@section('head') - - - - - -@stop - -@section('body') - -{{ Form::open(array('url' => 'get_started', 'id' => 'startForm')) }} -{{ Form::hidden('guest_key') }} -{{ Form::close() }} - - - - - -
-
- -
-
-
-
-

THE SIMPLE & - FREE WAY TO INVOICE - CLIENTS

-

It's that easy. Stop spending time on - complicated and expensive invoicing.
- No fuss, just get started and get paid.

-
-
-
-
- - -
- -
-
-
-
-
-
-

100% FREE, ALWAYS

-

Invoicing with no monthly fee, because you have enough bills already! Free, now and forever! Quality invoicing to build your business and get paid.

-
-
- -
-
-
-

OPEN-SOURCE

-

Cloud-based, super secure, and user-developed. Open source platforms are a better way to do business (and save the world). Need we say more?

-
-
- -
-
-
-

LIVE .PDF VIEW

-

Create beautiful email-ready .PDF invoices created instantly as you type. Our ‘Save & send’ feature saves you time and impresses clients.

-
-
- -
-
-
-

ONLINE PAYMENTS

-

PayPal? Authorize.Net? Stripe? We support many payment technologies and if you need help or advice we’ll lend a hand (we’re pretty friendly).

-
-
-
-
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
-
-

SIMPLE, INTUITIVE INVOICING.

-
-
-
- - - -
- -
- - - @stop \ No newline at end of file diff --git a/public/images/facebook.jpg b/public/images/facebook.jpg index 83fe17e4380a..9770a82ccf58 100644 Binary files a/public/images/facebook.jpg and b/public/images/facebook.jpg differ