1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Bug fixes

This commit is contained in:
Hillel Coren 2014-04-03 23:01:03 +03:00
parent 3d6530e83f
commit 7c92ed8530
4 changed files with 48 additions and 0 deletions

View File

@ -61,6 +61,16 @@ class AccountController extends \BaseController {
return Redirect::to('invoices/create');
}
public function enableProPlan()
{
$account = Auth::user()->account;
dd(Request::all());
if ($account->pro_plan)
{
return Redirect::to('/dashboard');
}
}
public function setTrashVisible($entityType, $visible)
{
Session::put('show_trash', $visible == 'true');

View File

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddProPlan extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('accounts', function($table)
{
$table->boolean('pro_plan');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('accounts', function($table)
{
$table->dropColumn('pro_plan');
});
}
}

View File

@ -61,6 +61,7 @@ Route::group(array('before' => 'auth'), function()
Route::get('force_inline_pdf', 'UserController@forcePDFJS');
Route::get('account/getSearchData', array('as' => 'getSearchData', 'uses' => 'AccountController@getSearchData'));
Route::get('account/enable_pro_plan', 'AccountController@enableProPlan');
Route::get('company/{section?}', 'AccountController@showSection');
Route::post('company/{section?}', 'AccountController@doSection');
Route::post('user/setTheme', 'UserController@setTheme');

View File

@ -274,6 +274,9 @@
<iframe id="theFrame" style="display:none" frameborder="1" width="100%" height="1180"></iframe>
<canvas id="theCanvas" style="display:none;width:100%;border:solid 1px #CCCCCC;"></canvas>
@if (!Auth::user()->account->pro_plan)
Enable the pro plan by {{ link_to('account/enable_pro_plan', 'clicking here') }} to remove the Invoice Ninja logo
@endif
<div class="modal fade" id="clientModal" tabindex="-1" role="dialog" aria-labelledby="clientModalLabel" aria-hidden="true">
<div class="modal-dialog" style="min-width:1000px">