Updating texts and added invoice_now link

This commit is contained in:
Hillel Coren 2014-05-04 18:49:57 +03:00
parent a20ddd1f45
commit 9d858f4bfc
13 changed files with 249 additions and 26 deletions

View File

@ -35,7 +35,7 @@ class AccountController extends \BaseController {
if ($user && $user->registered)
{
exit;
return Redirect::to('/');
}
}
@ -49,7 +49,7 @@ class AccountController extends \BaseController {
Auth::login($user, true);
Event::fire('user.login');
return Redirect::to('invoices/create');
}

View File

@ -74,6 +74,18 @@ class HomeController extends BaseController {
return View::make('coming_soon');
}
public function invoiceNow()
{
if (Auth::check())
{
return Redirect::to('invoices/create');
}
else
{
return View::make('public.header', ['invoiceNow' => true]);
}
}
public function logError()
{
return Utils::logError(Input::get('error'), 'JavaScript');

View File

@ -209,7 +209,7 @@ class InvoiceController extends \BaseController {
}
public function create($clientPublicId = 0)
{
{
$client = null;
$invoiceNumber = Auth::user()->account->getNextInvoiceNumber();
$account = Account::with('country')->findOrFail(Auth::user()->account_id);
@ -229,6 +229,7 @@ class InvoiceController extends \BaseController {
'title' => '- New Invoice',
'client' => $client);
$data = array_merge($data, self::getViewModel());
return View::make('invoices.edit', $data);
}

View File

@ -298,8 +298,8 @@ class UserController extends BaseController {
}
}
Confide::logout();
Confide::logout();
return Redirect::to('/')->with('clearGuestKey', true);
}
}

View File

@ -17,6 +17,12 @@ class AddAdvancedSettings extends Migration {
$table->string('primary_color');
$table->string('secondary_color');
});
Schema::table('payments', function($table)
{
$table->dropForeign('payments_invoice_id_foreign');
$table->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade');
});
}
/**

View File

@ -129,12 +129,10 @@ class Activity extends Eloquent
if (!$invoice->is_deleted)
{
if ($invoice->balance > 0)
{
$client = $invoice->client;
$client->balance = $client->balance - $invoice->balance;
$client->save();
}
$client = $invoice->client;
$client->balance = $client->balance - $invoice->balance;
$client->paid_to_date = $client->paid_to_date - ($invoice->amount - $invoice->balance);
$client->save();
$activity = Activity::getBlank();
$activity->invoice_id = $invoice->id;
@ -167,12 +165,10 @@ class Activity extends Eloquent
{
if ($invoice->is_deleted && !$invoice->getOriginal('is_deleted'))
{
if ($invoice->balance > 0)
{
$client = $invoice->client;
$client->balance = $client->balance - $invoice->balance;
$client->save();
}
$client = $invoice->client;
$client->balance = $client->balance - $invoice->balance;
$client->paid_to_date = $client->paid_to_date - ($invoice->amount - $invoice->balance);
$client->save();
$activity = Activity::getBlank();
$activity->client_id = $invoice->client_id;

View File

@ -35,6 +35,7 @@ Route::get('/faq', 'HomeController@showFaq');
Route::get('/features', 'HomeController@showFeatures');
Route::get('log_error', 'HomeController@logError');
Route::get('invoice_now', 'HomeController@invoiceNow');
Route::post('get_started', 'AccountController@getStarted');
Route::get('view/{invitation_key}', 'InvoiceController@view');

View File

@ -344,7 +344,7 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice
@if (Auth::check() && !Auth::user()->isPro())
<div class="modal fade" id="proPlanModal" tabindex="-1" role="dialog" aria-labelledby="proPlanModalLabel" aria-hidden="true">
<div class="modal-dialog" style="min-width:1040px">
<div class="modal-dialog" style="min-width:910px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
@ -352,6 +352,7 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice
</div>
<div style="background-color: #fff; padding-left: 16px; padding-right: 16px" id="proPlanDiv">
<!--
&nbsp;<p/>
<b>Go Pro to Unlock Premium Invoice Ninja Features</b><p/>
We believe that the free version of Invoice Ninja is a truly awesome product loaded
@ -360,6 +361,74 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice
offers more versatility, power and customization options for just $50 per year.
<br/>&nbsp;<br/>
<img src="{{ asset('images/pro-plan-chart.png') }}"/>
-->
<section class="plans">
<div class="container">
<div class="row">
<div class="col-md-9">
<h2>Go Pro to Unlock Premium Invoice Ninja Features</h2>
<p>We believe that the free version of Invoice Ninja is a truly awesome product loaded
with the key features you need to bill your clients electronically. But for those who
crave still more Ninja awesomeness, we've unmasked the Invoice Ninja Pro plan, which
offers more versatility, power and customization options for just $50 per year. </p>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="plans-table col-md-9">
<div class="col-md-4 desc hide-mobile">
<div class="cell"></div>
<div class="cell">Number of clients per account</div>
<div class="cell">Unlimited client invoices</div>
<div class="cell">Add your company logo</div>
<div class="cell">Live .PDF invoice creation </div>
<div class="cell">4 beatiful invoice templates</div>
<div class="cell">Accept credit card payments</div>
<div class="cell">Custom invoice fields</div>
<div class="cell">Priority email support</div>
<div class="cell">Custom invoice colors</div>
<div class="cell">Remove "Created by Invoice Ninja"</div>
<div class="cell">Pricing</div>
</div>
<div class="free col-md-4">
<div class="cell">Free</div>
<div class="cell"><div class="hide-desktop">Number of clients per account</div><span>500</span></div>
<div class="cell"><div class="hide-desktop">Unlimited client invoices</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell"><div class="hide-desktop">Add your company logo</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell"><div class="hide-desktop">Live .PDF invoice creation</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell"><div class="hide-desktop">4 beatiful invoice templates</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell"><div class="hide-desktop">Accept credit card payments</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell"><div class="hide-desktop">Custom invoice fields</div><span class="glyphicon glyphicon-remove"></div>
<div class="cell"><div class="hide-desktop">Priority email support</div><span class="glyphicon glyphicon-remove"></div>
<div class="cell"><div class="hide-desktop">Custom invoice colors</div><span class="glyphicon glyphicon-remove"></div>
<div class="cell"><div class="hide-desktop">Remove "Created by Invoice Ninja"</div><span class="glyphicon glyphicon-remove"></div>
<div class="cell price"><div class="hide-desktop">Pricing</div><p>Free<span> /Always!</span></p></div>
</div>
<div class="pro col-md-4">
<div class="cell">Pro Plan<span class="glyphicon glyphicon-star"></div>
<div class="cell"><div class="hide-desktop">Number of clients per account</div><span style="color: #2299c0; font-size: 16px;">5,000</span></div>
<div class="cell"><div class="hide-desktop">Unlimited client invoices</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell"><div class="hide-desktop">Add your company logo</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell"><div class="hide-desktop">Live .PDF invoice creation</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell"><div class="hide-desktop">4 beatiful invoice templates</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell"><div class="hide-desktop">Accept credit card payments</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell"><div class="hide-desktop">Custom invoice fields</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell"><div class="hide-desktop">Priority email support</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell"><div class="hide-desktop">Custom invoice colors</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell"><div class="hide-desktop">Remove "Created by Invoice Ninja"</div><span class="glyphicon glyphicon-ok"></div>
<div class="cell price"><div class="hide-desktop">Pricing</div><p>$50<span> /Year</span></p></div>
</a>
</div>
</div>
</div>
</section>
&nbsp;
</div>

View File

@ -20,6 +20,7 @@
<meta name="keywords" content="Invoice Ninja"></meta>
<script src="{{ asset('built.js') }}" type="text/javascript"></script>
<!-- <script src="{{ asset('vendor/jquery/jquery.js') }}" type="text/javascript"></script> -->
<!-- <script src="{{ asset('vendor/jquery/dist/jquery.js') }}" type="text/javascript"></script> -->
@ -65,6 +66,7 @@
@yield('body')
<script type="text/javascript">
NINJA.formIsChanged = false;
$(function() {

View File

@ -53,11 +53,13 @@
<script>
$(document).ready(function () {
if (isStorageSupported()) {
$('[name="guest_key"]').val(localStorage.getItem('guest_key'));
}
});
if (isStorageSupported()) {
$('[name="guest_key"]').val(localStorage.getItem('guest_key'));
}
@if (isset($invoiceNow) && $invoiceNow)
getStarted();
@endif
function isStorageSupported() {
if ('localStorage' in window && window['localStorage'] !== null) {

View File

@ -89,7 +89,7 @@
</div>
</div>
<p>or {{ link_to('features', 'View Our Features' ) }}</a></p>
<!-- <p>or {{ link_to('features', 'View Our Features' ) }}</a></p> -->
</div>
<div class="col-md-7">
<img src="{{ asset('images/devices.png') }}">

View File

@ -2238,6 +2238,66 @@ div.fb_iframe_widget > span {
font-size:9px;
}
.plans-table {float: none; margin-top: 10px; }
.plans-table div {text-align:center; margin: 0 auto; }
.plans-table .free, .plans-table .desc { padding: 0; }
.plans-table .free .cell { padding-right: 15px; }
.plans-table .desc .cell { text-align: right; padding-right: 15px; border-left: 1px solid #dfe0e1; font-size: 13px; font-weight: 800; }
.plans-table .pro .cell { border-left: 1px solid #cccccc; border-right: 1px solid #cccccc;}
.plans-table .cell {background-color: #fff; border-top: 1px solid #dfe0e1;padding: 18px 0; font-family: Roboto, sans-serif; height: 60px;}
.plans-table .cell:nth-child(odd){background-color: #fbfbfb;}
.plans-table .pro .cell:nth-child(odd){background-color: #f4f4f4;}
.plans-table .pro {
background-color: #2299c0;
overflow:hidden;
padding: 0;
-webkit-box-shadow: 0px 0px 15px 0px rgba(0, 5, 5, 0.2);
-moz-box-shadow: 0px 0px 15px 0px rgba(0, 5, 5, 0.2);
box-shadow: 0px 0px 15px 0px rgba(0, 5, 5, 0.2);
}
.plans-table .free .cell:first-child, .plans-table .pro .cell:first-child {color: #fff; text-transform: uppercase; font-size: 24px; font-weight:800; line-height: 60px; padding: 0; position: relative; bottom: -1px; border: none;}
.plans-table .free .cell:first-child {background-color: #9b9b9b; margin-right: 15px; padding-right: 0;}
.plans-table .free, .plans-table .desc {border-bottom: 1px solid #dfe0e1;}
.plans-table .pro .cell:first-child {background-color: #2299c0;}
.plans-table .pro .cell:last-child {padding: 0; border: none;}
.plans-table .desc .cell:first-child {background-color: transparent; border: none;}
.plans-table .glyphicon {color: #fff; border-radius: 50px; padding: 5px; font-size: 10px;}
.plans-table .glyphicon-remove {background-color: #da4830;}
.plans-table .glyphicon-ok {background-color: #35c156;}
.plans-table .glyphicon-star {border-radius: 0; background-color: #2e2b2b;
display: block;
width: 60px;
height: 30px;
position: absolute;
top: -5px;
right: -20px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
padding: 13px 0 0 1px;
}
.plans-table .price {padding: 0; }
.plans-table .free .price p {color: #35c156;}
.plans-table .pro .price p {color: #2299c0;}
.plans-table .price p {font-size: 40px; text-transform: uppercase; font-weight: 800; margin: 0; line-height: 55px;}
.plans-table .price p span {font-size: 16px; text-transform: none; font-weight: 400;}
.plans-table a .cta h2 {background: #2299c0; color:#fff; margin: 0;}
.plans-table a .cta h2 span {background: #1e84a5;}
@media screen and (min-width: 769px) {
.hide-desktop {display: none;}
}
@media (max-width: 767px) {
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
color: #ecf0f1;
@ -2246,4 +2306,11 @@ div.fb_iframe_widget > span {
.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
color: #ffffff;
}
}
.plans-table .cell {height: auto; padding: 14px 0; }
.plans-table .free .cell { padding-right: 0; }
.plans-table .free .cell:first-child {margin-right: 0;}
.plans-table .cell div:first-child {margin-bottom: 5px;}
.plans-table .cell .cta {margin-bottom: 0 !important;}
.plans-table .pro {margin-top: 40px;}
}

View File

@ -641,6 +641,66 @@ div.fb_iframe_widget > span {
font-size:9px;
}
.plans-table {float: none; margin-top: 10px; }
.plans-table div {text-align:center; margin: 0 auto; }
.plans-table .free, .plans-table .desc { padding: 0; }
.plans-table .free .cell { padding-right: 15px; }
.plans-table .desc .cell { text-align: right; padding-right: 15px; border-left: 1px solid #dfe0e1; font-size: 13px; font-weight: 800; }
.plans-table .pro .cell { border-left: 1px solid #cccccc; border-right: 1px solid #cccccc;}
.plans-table .cell {background-color: #fff; border-top: 1px solid #dfe0e1;padding: 18px 0; font-family: Roboto, sans-serif; height: 60px;}
.plans-table .cell:nth-child(odd){background-color: #fbfbfb;}
.plans-table .pro .cell:nth-child(odd){background-color: #f4f4f4;}
.plans-table .pro {
background-color: #2299c0;
overflow:hidden;
padding: 0;
-webkit-box-shadow: 0px 0px 15px 0px rgba(0, 5, 5, 0.2);
-moz-box-shadow: 0px 0px 15px 0px rgba(0, 5, 5, 0.2);
box-shadow: 0px 0px 15px 0px rgba(0, 5, 5, 0.2);
}
.plans-table .free .cell:first-child, .plans-table .pro .cell:first-child {color: #fff; text-transform: uppercase; font-size: 24px; font-weight:800; line-height: 60px; padding: 0; position: relative; bottom: -1px; border: none;}
.plans-table .free .cell:first-child {background-color: #9b9b9b; margin-right: 15px; padding-right: 0;}
.plans-table .free, .plans-table .desc {border-bottom: 1px solid #dfe0e1;}
.plans-table .pro .cell:first-child {background-color: #2299c0;}
.plans-table .pro .cell:last-child {padding: 0; border: none;}
.plans-table .desc .cell:first-child {background-color: transparent; border: none;}
.plans-table .glyphicon {color: #fff; border-radius: 50px; padding: 5px; font-size: 10px;}
.plans-table .glyphicon-remove {background-color: #da4830;}
.plans-table .glyphicon-ok {background-color: #35c156;}
.plans-table .glyphicon-star {border-radius: 0; background-color: #2e2b2b;
display: block;
width: 60px;
height: 30px;
position: absolute;
top: -5px;
right: -20px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
padding: 13px 0 0 1px;
}
.plans-table .price {padding: 0; }
.plans-table .free .price p {color: #35c156;}
.plans-table .pro .price p {color: #2299c0;}
.plans-table .price p {font-size: 40px; text-transform: uppercase; font-weight: 800; margin: 0; line-height: 55px;}
.plans-table .price p span {font-size: 16px; text-transform: none; font-weight: 400;}
.plans-table a .cta h2 {background: #2299c0; color:#fff; margin: 0;}
.plans-table a .cta h2 span {background: #1e84a5;}
@media screen and (min-width: 769px) {
.hide-desktop {display: none;}
}
@media (max-width: 767px) {
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
color: #ecf0f1;
@ -649,4 +709,11 @@ div.fb_iframe_widget > span {
.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
color: #ffffff;
}
}
.plans-table .cell {height: auto; padding: 14px 0; }
.plans-table .free .cell { padding-right: 0; }
.plans-table .free .cell:first-child {margin-right: 0;}
.plans-table .cell div:first-child {margin-bottom: 5px;}
.plans-table .cell .cta {margin-bottom: 0 !important;}
.plans-table .pro {margin-top: 40px;}
}