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

Minor dashboard improvements

This commit is contained in:
Hillel Coren 2015-05-08 11:21:29 +03:00
parent b368e5589c
commit ef6e930f1b
31 changed files with 172 additions and 96 deletions

View File

@ -2,18 +2,18 @@ APP_ENV=development
APP_DEBUG=true APP_DEBUG=true
APP_URL=http://ninja.dev APP_URL=http://ninja.dev
APP_CIPHER=rijndael-128 APP_CIPHER=rijndael-128
APP_KEY= APP_KEY
DB_TYPE=mysql DB_TYPE=mysql
DB_HOST=localhost DB_HOST=localhost
DB_DATABASE=ninja DB_DATABASE=ninja
DB_USERNAME= DB_USERNAME
DB_PASSWORD= DB_PASSWORD
MAIL_DRIVER=smtp MAIL_DRIVER=smtp
MAIL_PORT=587 MAIL_PORT=587
MAIL_ENCRYPTION=tls MAIL_ENCRYPTION=tls
MAIL_HOST= MAIL_HOST
MAIL_USERNAME= MAIL_USERNAME
MAIL_FROM_NAME= MAIL_FROM_NAME
MAIL_PASSWORD= MAIL_PASSWORD

View File

@ -0,0 +1,57 @@
<?php namespace App\Console\Commands;
use DB;
use DateTime;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use App\Models\Account;
use App\Ninja\Mailers\ContactMailer as Mailer;
use App\Ninja\Repositories\AccountRepository;
class SendRenewalInvoices extends Command
{
protected $name = 'ninja:send-renewals';
protected $description = 'Send renewal invoices';
protected $mailer;
protected $accountRepo;
public function __construct(Mailer $mailer, AccountRepository $repo)
{
parent::__construct();
$this->mailer = $mailer;
$this->accountRepo = $repo;
}
public function fire()
{
$this->info(date('Y-m-d').' Running SendRenewalInvoices...');
$today = new DateTime();
$accounts = Account::whereRaw('datediff(curdate(), pro_plan_paid) = 355')->get();
$this->info(count($accounts).' accounts found');
dd(0);
foreach ($accounts as $account) {
$client = $this->accountRepo->getNinjaClient($account);
$invitation = $this->accountRepo->createNinjaInvoice($client);
$this->mailer->sendInvoice($invitation->invoice);
}
$this->info('Done');
}
protected function getArguments()
{
return array(
//array('example', InputArgument::REQUIRED, 'An example argument.'),
);
}
protected function getOptions()
{
return array(
//array('example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null),
);
}
}

View File

@ -16,6 +16,7 @@ class Kernel extends ConsoleKernel {
'App\Console\Commands\ResetData', 'App\Console\Commands\ResetData',
'App\Console\Commands\ImportTimesheetData', 'App\Console\Commands\ImportTimesheetData',
'App\Console\Commands\CheckData', 'App\Console\Commands\CheckData',
'App\Console\Commands\SendRenewalInvoices',
]; ];
/** /**

View File

@ -27,6 +27,7 @@ class Handler extends ExceptionHandler {
{ {
Utils::logError(Utils::getErrorString($e)); Utils::logError(Utils::getErrorString($e));
return false; return false;
//return parent::report($e); //return parent::report($e);
} }

View File

@ -572,7 +572,7 @@ class AccountController extends BaseController
} }
$subdomain = preg_replace('/[^a-zA-Z0-9_\-]/', '', substr(strtolower(Input::get('subdomain')), 0, MAX_SUBDOMAIN_LENGTH)); $subdomain = preg_replace('/[^a-zA-Z0-9_\-]/', '', substr(strtolower(Input::get('subdomain')), 0, MAX_SUBDOMAIN_LENGTH));
if (in_array($subdomain, ['www', 'app', 'mail'])) { if (!$subdomain || in_array($subdomain, ['www', 'app', 'mail', 'admin', 'blog'])) {
$subdomain = null; $subdomain = null;
} }
if ($subdomain) { if ($subdomain) {

View File

@ -9,6 +9,7 @@ use Exception;
use Input; use Input;
use Utils; use Utils;
use View; use View;
use Session;
use App\Models\User; use App\Models\User;
use App\Ninja\Mailers\Mailer; use App\Ninja\Mailers\Mailer;
use App\Ninja\Repositories\AccountRepository; use App\Ninja\Repositories\AccountRepository;

View File

@ -52,7 +52,7 @@ class DashboardController extends BaseController
$activities = Activity::where('activities.account_id', '=', Auth::user()->account_id) $activities = Activity::where('activities.account_id', '=', Auth::user()->account_id)
->where('activity_type_id', '>', 0) ->where('activity_type_id', '>', 0)
->orderBy('created_at', 'desc')->take(6)->get(); ->orderBy('created_at', 'desc')->take(14)->get();
$pastDue = Invoice::scope() $pastDue = Invoice::scope()
->where('due_date', '<', date('Y-m-d')) ->where('due_date', '<', date('Y-m-d'))
@ -73,7 +73,7 @@ class DashboardController extends BaseController
$data = [ $data = [
'paidToDate' => $paidToDate, 'paidToDate' => $paidToDate,
'averageInvoice' => $averageInvoice, 'averageInvoice' => $averageInvoice,
'billedClients' => $metrics ? $metrics->billed_clients : 0, //'billedClients' => $metrics ? $metrics->billed_clients : 0,
'invoicesSent' => $metrics ? $metrics->invoices_sent : 0, 'invoicesSent' => $metrics ? $metrics->invoices_sent : 0,
'activeClients' => $metrics ? $metrics->active_clients : 0, 'activeClients' => $metrics ? $metrics->active_clients : 0,
'activities' => $activities, 'activities' => $activities,

View File

@ -13,6 +13,8 @@ use CreditCard;
use URL; use URL;
use Cache; use Cache;
use Event; use Event;
use DateTime;
use App\Models\Account;
use App\Models\Invoice; use App\Models\Invoice;
use App\Models\Invitation; use App\Models\Invitation;
use App\Models\Client; use App\Models\Client;
@ -20,6 +22,7 @@ use App\Models\PaymentType;
use App\Models\Country; use App\Models\Country;
use App\Models\License; use App\Models\License;
use App\Models\Payment; use App\Models\Payment;
use App\Models\Affiliate;
use App\Models\AccountGatewayToken; use App\Models\AccountGatewayToken;
use App\Ninja\Repositories\PaymentRepository; use App\Ninja\Repositories\PaymentRepository;
use App\Ninja\Repositories\InvoiceRepository; use App\Ninja\Repositories\InvoiceRepository;
@ -610,7 +613,12 @@ class PaymentController extends BaseController
if ($invoice->account->account_key == NINJA_ACCOUNT_KEY) { if ($invoice->account->account_key == NINJA_ACCOUNT_KEY) {
$account = Account::find($invoice->client->public_id); $account = Account::find($invoice->client->public_id);
if ($account->pro_plan_paid) {
$date = DateTime::createFromFormat('Y-m-d', $account->pro_plan_paid);
$account->pro_plan_paid = $date->modify('+1 year')->format('Y-m-d');
} else {
$account->pro_plan_paid = date_create()->format('Y-m-d'); $account->pro_plan_paid = date_create()->format('Y-m-d');
}
$account->save(); $account->save();
} }

View File

@ -10,6 +10,7 @@ use Cache;
use Session; use Session;
use Event; use Event;
use App\Models\Language; use App\Models\Language;
use App\Models\InvoiceDesign;
use App\Events\UserSettingsChanged; use App\Events\UserSettingsChanged;
class StartupCheck class StartupCheck
@ -124,7 +125,7 @@ class StartupCheck
$licenseKey = Input::get('license_key'); $licenseKey = Input::get('license_key');
$productId = Input::get('product_id'); $productId = Input::get('product_id');
$data = trim(file_get_contents((Utils::isNinjaDev() ? 'http://ninja.dev' : NINJA_APP_URL)."/claim_license?license_key={$licenseKey}&product_id={$productId}")); $data = trim(file_get_contents((Utils::isNinjaDev() ? 'http://www.ninja.dev' : NINJA_APP_URL)."/claim_license?license_key={$licenseKey}&product_id={$productId}"));
if ($productId == PRODUCT_INVOICE_DESIGNS) { if ($productId == PRODUCT_INVOICE_DESIGNS) {
if ($data = json_decode($data)) { if ($data = json_decode($data)) {

View File

@ -84,7 +84,7 @@ Route::post('user/reset', 'UserController@do_reset_password');
Route::get('logout', 'UserController@logout'); Route::get('logout', 'UserController@logout');
*/ */
if (\App\Libraries\Utils::isNinja()) { if (Utils::isNinja()) {
Route::post('/signup/register', 'AccountController@doRegister'); Route::post('/signup/register', 'AccountController@doRegister');
Route::get('/news_feed/{user_type}/{version}/', 'HomeController@newsFeed'); Route::get('/news_feed/{user_type}/{version}/', 'HomeController@newsFeed');
Route::get('/demo', 'AccountController@demo'); Route::get('/demo', 'AccountController@demo');
@ -350,7 +350,7 @@ define('EVENT_CREATE_PAYMENT', 4);
define('REQUESTED_PRO_PLAN', 'REQUESTED_PRO_PLAN'); define('REQUESTED_PRO_PLAN', 'REQUESTED_PRO_PLAN');
define('DEMO_ACCOUNT_ID', 'DEMO_ACCOUNT_ID'); define('DEMO_ACCOUNT_ID', 'DEMO_ACCOUNT_ID');
define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h'); define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h');
define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET); define('NINJA_GATEWAY_ID', GATEWAY_STRIPE);
define('NINJA_GATEWAY_CONFIG', ''); define('NINJA_GATEWAY_CONFIG', '');
define('NINJA_WEB_URL', 'https://www.invoiceninja.com'); define('NINJA_WEB_URL', 'https://www.invoiceninja.com');
define('NINJA_APP_URL', 'https://app.invoiceninja.com'); define('NINJA_APP_URL', 'https://app.invoiceninja.com');
@ -507,7 +507,7 @@ Validator::extend('has_credit', function($attribute, $value, $parameters) {
$publicClientId = $parameters[0]; $publicClientId = $parameters[0];
$amount = $parameters[1]; $amount = $parameters[1];
$client = Client::scope($publicClientId)->firstOrFail(); $client = \App\Models\Client::scope($publicClientId)->firstOrFail();
$credit = $client->getTotalCredit(); $credit = $client->getTotalCredit();
return $credit >= $amount; return $credit >= $amount;

View File

@ -109,18 +109,18 @@ class AccountRepository
return false; return false;
} }
$ninjaAccount = $this->getNinjaAccount(); $client = $this->getNinjaClient(Auth::user()->account);
$lastInvoice = Invoice::withTrashed()->whereAccountId($ninjaAccount->id)->orderBy('public_id', 'DESC')->first(); $invitation = $this->createNinjaInvoice($client);
$publicId = $lastInvoice ? ($lastInvoice->public_id + 1) : 1;
$ninjaClient = $this->getNinjaClient($ninjaAccount);
$invitation = $this->createNinjaInvoice($publicId, $ninjaAccount, $ninjaClient);
return $invitation; return $invitation;
} }
private function createNinjaInvoice($publicId, $account, $client) public function createNinjaInvoice($client)
{ {
$account = $this->getNinjaAccount();
$lastInvoice = Invoice::withTrashed()->whereAccountId($account->id)->orderBy('public_id', 'DESC')->first();
$publicId = $lastInvoice ? ($lastInvoice->public_id + 1) : 1;
$invoice = new Invoice(); $invoice = new Invoice();
$invoice->account_id = $account->id; $invoice->account_id = $account->id;
$invoice->user_id = $account->users()->first()->id; $invoice->user_id = $account->users()->first()->id;
@ -174,7 +174,6 @@ class AccountRepository
$user->confirmed = true; $user->confirmed = true;
$user->email = 'contact@invoiceninja.com'; $user->email = 'contact@invoiceninja.com';
$user->password = $random; $user->password = $random;
$user->password_confirmation = $random;
$user->username = $random; $user->username = $random;
$user->first_name = 'Invoice'; $user->first_name = 'Invoice';
$user->last_name = 'Ninja'; $user->last_name = 'Ninja';
@ -193,27 +192,29 @@ class AccountRepository
return $account; return $account;
} }
private function getNinjaClient($ninjaAccount) public function getNinjaClient($account)
{ {
$client = Client::whereAccountId($ninjaAccount->id)->wherePublicId(Auth::user()->account_id)->first(); $account->load('users');
$ninjaAccount = $this->getNinjaAccount();
$client = Client::whereAccountId($ninjaAccount->id)->wherePublicId($account->id)->first();
if (!$client) { if (!$client) {
$client = new Client(); $client = new Client();
$client->public_id = Auth::user()->account_id; $client->public_id = $account->id;
$client->user_id = $ninjaAccount->users()->first()->id; $client->user_id = $ninjaAccount->users()->first()->id;
$client->currency_id = 1; $client->currency_id = 1;
foreach (['name', 'address1', 'address2', 'city', 'state', 'postal_code', 'country_id', 'work_phone'] as $field) { foreach (['name', 'address1', 'address2', 'city', 'state', 'postal_code', 'country_id', 'work_phone'] as $field) {
$client->$field = Auth::user()->account->$field; $client->$field = $account->$field;
} }
$ninjaAccount->clients()->save($client); $ninjaAccount->clients()->save($client);
$contact = new Contact(); $contact = new Contact();
$contact->user_id = $ninjaAccount->users()->first()->id; $contact->user_id = $ninjaAccount->users()->first()->id;
$contact->account_id = $ninjaAccount->id; $contact->account_id = $ninjaAccount->id;
$contact->public_id = Auth::user()->account_id; $contact->public_id = $account->id;
$contact->is_primary = true; $contact->is_primary = true;
foreach (['first_name', 'last_name', 'email', 'phone'] as $field) { foreach (['first_name', 'last_name', 'email', 'phone'] as $field) {
$contact->$field = Auth::user()->$field; $contact->$field = $account->users()->first()->$field;
} }
$client->contacts()->save($contact); $client->contacts()->save($contact);
} }
@ -223,7 +224,7 @@ class AccountRepository
public function registerUser($user) public function registerUser($user)
{ {
$url = NINJA_APP_URL.'/signup/register'; $url = (Utils::isNinjaDev() ? '' : NINJA_APP_URL) . '/signup/register';
$data = ''; $data = '';
$fields = [ $fields = [
'first_name' => urlencode($user->first_name), 'first_name' => urlencode($user->first_name),

View File

@ -95,7 +95,7 @@ return [
| |
*/ */
'log' => 'daily', 'log' => 'single',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@ -29,7 +29,7 @@ return [
| |
*/ */
'lifetime' => 120, 'lifetime' => 360,
'expire_on_close' => false, 'expire_on_close' => false,

View File

@ -2388,7 +2388,7 @@ body { background: #f8f8f8 !important;
} }
.bold { font-weight: 700; } .bold { font-weight: 700; }
a {color:#0b4d78;} a {color:#0b4d78;}
a:hover { text-decoration: none; color: #0a3857;} /*a:hover { text-decoration: none; color: #0a3857;}*/
.breadcrumb { .breadcrumb {
padding: 8px 0!important; padding: 8px 0!important;
} }

View File

@ -4,7 +4,7 @@ body { background: #f8f8f8 !important;
} }
.bold { font-weight: 700; } .bold { font-weight: 700; }
a {color:#0b4d78;} a {color:#0b4d78;}
a:hover { text-decoration: none; color: #0a3857;} /*a:hover { text-decoration: none; color: #0a3857;}*/
.breadcrumb { .breadcrumb {
padding: 8px 0!important; padding: 8px 0!important;
} }

View File

@ -31941,7 +31941,7 @@ function isValidEmailAddress(emailAddress) {
$(function() { $(function() {
$.ajaxSetup({ $.ajaxSetup({
headers: { headers: {
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content') 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
} }
}); });
}); });

View File

@ -391,7 +391,7 @@ function isValidEmailAddress(emailAddress) {
$(function() { $(function() {
$.ajaxSetup({ $.ajaxSetup({
headers: { headers: {
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content') 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
} }
}); });
}); });

View File

@ -9,7 +9,7 @@
@if (!Auth::user()->account->isPro()) @if (!Auth::user()->account->isPro())
<center> <center>
<div style="font-size:larger;" class="col-md-8 col-md-offset-2">{!! trans('texts.pro_plan_advanced_settings', ['link'=>'<a href="#" onclick="showProPlan(\''.$feature.'\')">'.trans('texts.pro_plan.remove_logo_link').'</a>']) !!}</div> <div style="font-size:larger;" class="col-md-8 col-md-offset-2">{!! trans('texts.pro_plan_advanced_settings', ['link'=>'<a href="#" onclick="submitProPlan(\''.$feature.'\')">'.trans('texts.pro_plan.remove_logo_link').'</a>']) !!}</div>
&nbsp;<p/>&nbsp; &nbsp;<p/>&nbsp;
</center> </center>
@endif @endif

View File

@ -47,6 +47,14 @@
z-index: 2; z-index: 2;
} }
.modal-header a:link,
.modal-header a:visited,
.modal-header a:hover,
.modal-header a:active {
text-decoration: none;
color: white;
}
</style> </style>
@endsection @endsection
@ -59,8 +67,11 @@
{{ Former::populateField('remember', 'true') }} {{ Former::populateField('remember', 'true') }}
<div class="modal-header"> <div class="modal-header">
<a href="{{ NINJA_WEB_URL }}" target="_blank">
<img src="{{ asset('images/icon-login.png') }}" /> <img src="{{ asset('images/icon-login.png') }}" />
<h4>Invoice Ninja | {{ trans('texts.account_login') }}</h4></div> <h4>Invoice Ninja | {{ trans('texts.account_login') }}</h4>
</a>
</div>
<div class="inner"> <div class="inner">
<p> <p>
{!! Former::text('email')->placeholder(trans('texts.email_address'))->raw() !!} {!! Former::text('email')->placeholder(trans('texts.email_address'))->raw() !!}

View File

@ -26,11 +26,13 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
<img src="{{ asset('images/clients.png') }}" class="in-image"/> <img src="{{ asset('images/clients.png') }}" class="in-image"/>
<div class="in-bold">
{{ $billedClients }}
</div>
<div class="in-thin"> <div class="in-thin">
{{ Utils::pluralize('billed_client', $billedClients) }} {{ trans('texts.average_invoice') }}
</div>
<div class="in-bold">
@foreach ($averageInvoice as $item)
{{ Utils::formatMoney($item->invoice_avg, $item->currency_id) }}<br/>
@endforeach
</div> </div>
</div> </div>
</div> </div>
@ -55,7 +57,7 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="panel panel-default dashboard" style="min-height:320px"> <div class="panel panel-default dashboard" style="min-height:660px">
<div class="panel-heading" style="background-color:#0b4d78 !important"> <div class="panel-heading" style="background-color:#0b4d78 !important">
<h3 class="panel-title in-bold-white"> <h3 class="panel-title in-bold-white">
<i class="glyphicon glyphicon-exclamation-sign"></i> {{ trans('texts.notifications') }} <i class="glyphicon glyphicon-exclamation-sign"></i> {{ trans('texts.notifications') }}
@ -101,11 +103,6 @@
</table> </table>
</div> </div>
</div> </div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="panel panel-default dashboard" style="min-height:320px;"> <div class="panel panel-default dashboard" style="min-height:320px;">
<div class="panel-heading" style="margin:0; background-color: #f5f5f5 !important;"> <div class="panel-heading" style="margin:0; background-color: #f5f5f5 !important;">
<h3 class="panel-title" style="color: black !important"> <h3 class="panel-title" style="color: black !important">
@ -135,23 +132,12 @@
</table> </table>
</div> </div>
</div> </div>
</div>
<div class="col-md-3">
<div class="active-clients">
<div class="in-bold in-white" style="font-size:42px">{{ $activeClients }}</div>
<div class="in-thin in-white">{{ Utils::pluralize('active_client', $activeClients) }}</div>
</div>
</div>
<div class="col-md-3">
<div class="average-invoice">
<div><b>{{ trans('texts.average_invoice') }}</b></div>
<div class="in-bold in-white" style="font-size:42px">
@foreach ($averageInvoice as $item)
{{ Utils::formatMoney($item->invoice_avg, $item->currency_id) }}<br/>
@endforeach
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-6">
</div> </div>
</div> </div>

View File

@ -149,15 +149,8 @@
} }
@if (Auth::check() && !Auth::user()->isPro()) @if (Auth::check() && !Auth::user()->isPro())
var proPlanFeature = false; function submitProPlan(feature) {
function showProPlan(feature) { trackUrl('/submit_pro_plan/' + feature);
proPlanFeature = feature;
$('#proPlanModal').modal('show');
trackUrl('/view_pro_plan/' + feature);
}
function submitProPlan() {
trackUrl('/submit_pro_plan/' + proPlanFeature);
if (NINJA.isRegistered) { if (NINJA.isRegistered) {
$('#proPlanDiv, #proPlanFooter').hide(); $('#proPlanDiv, #proPlanFooter').hide();
$('#proPlanWorking').show(); $('#proPlanWorking').show();
@ -167,7 +160,7 @@
url: '{{ URL::to('account/go_pro') }}', url: '{{ URL::to('account/go_pro') }}',
success: function(result) { success: function(result) {
NINJA.formIsChanged = false; NINJA.formIsChanged = false;
window.location = '{{ Utils::isNinjaDev() ? '' : NINJA_APP_URL }}/view/' + result; window.location = '/view/' + result;
} }
}); });
} else { } else {
@ -319,7 +312,7 @@
@if (!Auth::user()->registered) @if (!Auth::user()->registered)
{!! Button::success(trans('texts.sign_up'))->withAttributes(array('id' => 'signUpButton', 'data-toggle'=>'modal', 'data-target'=>'#signUpModal'))->small() !!} &nbsp; {!! Button::success(trans('texts.sign_up'))->withAttributes(array('id' => 'signUpButton', 'data-toggle'=>'modal', 'data-target'=>'#signUpModal'))->small() !!} &nbsp;
@elseif (!Auth::user()->isPro()) @elseif (!Auth::user()->isPro())
{!! Button::success(trans('texts.go_pro'))->withAttributes(array('id' => 'proPlanButton', 'data-toggle'=>'modal', 'data-target'=>'#proPlanModal'))->small() !!} &nbsp; {!! Button::success(trans('texts.go_pro'))->withAttributes(array('id' => 'proPlanButton', 'onclick' => 'submitProPlan("")'))->small() !!} &nbsp;
@endif @endif
@endif @endif

View File

@ -40,8 +40,10 @@
@if ($invoice && $invoice->id) @if ($invoice && $invoice->id)
<div class="form-group"> <div class="form-group">
<label for="client" class="control-label col-lg-4 col-sm-4">Client</label> <label for="client" class="control-label col-lg-4 col-sm-4">Client</label>
<div class="col-lg-8 col-sm-8" style="padding-top: 10px"> <div class="col-lg-8 col-sm-8">
<a id="editClientLink" class="pointer" data-bind="click: $root.showClientForm, text: getClientDisplayName(ko.toJS(client()))"></a> <h4><div data-bind="text: getClientDisplayName(ko.toJS(client()))"></div></h4>
<a id="editClientLink" class="pointer" data-bind="click: $root.showClientForm">{{ trans('texts.edit_client') }}</a> |
{!! link_to('/clients/'.$invoice->client->public_id, trans('texts.view_client'), ['target' => '_blank']) !!}
</div> </div>
</div> </div>
<div style="display:none"> <div style="display:none">
@ -52,6 +54,9 @@
<div class="form-group" style="margin-bottom: 8px"> <div class="form-group" style="margin-bottom: 8px">
<div class="col-lg-8 col-sm-8 col-lg-offset-4 col-sm-offset-4"> <div class="col-lg-8 col-sm-8 col-lg-offset-4 col-sm-offset-4">
<a id="createClientLink" class="pointer" data-bind="click: $root.showClientForm, text: $root.clientLinkText"></a> <a id="createClientLink" class="pointer" data-bind="click: $root.showClientForm, text: $root.clientLinkText"></a>
<span data-bind="visible: $root.invoice().client().public_id() > 0">|
<a data-bind="attr: {href: '{{ url('/clients') }}/' + $root.invoice().client().public_id()}" target="_blank">{{ trans('texts.view_client') }}</a>
</span>
</div> </div>
</div> </div>
@ -384,7 +389,7 @@
@if (!Auth::user()->account->isPro()) @if (!Auth::user()->account->isPro())
<div style="font-size:larger"> <div style="font-size:larger">
{!! trans('texts.pro_plan.remove_logo', ['link'=>'<a href="#" onclick="showProPlan(\'remove_logo\')">'.trans('texts.pro_plan.remove_logo_link').'</a>']) !!} {!! trans('texts.pro_plan.remove_logo', ['link'=>'<a href="#" onclick="submitProPlan(\'remove_logo\')">'.trans('texts.pro_plan.remove_logo_link').'</a>']) !!}
</div> </div>
@endif @endif
@ -1089,7 +1094,7 @@
self.clientLinkText = ko.computed(function() { self.clientLinkText = ko.computed(function() {
if (self.invoice().client().public_id()) if (self.invoice().client().public_id())
{ {
return "{{ trans('texts.edit_client_details') }}"; return "{{ trans('texts.edit_client') }}";
} }
else else
{ {

View File

@ -35,7 +35,7 @@
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.cancel') }}</button> <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.cancel') }}</button>
@if (Utils::isNinjaProd()) @if (Utils::isNinjaProd())
<button type="button" class="btn btn-primary" onclick="showProPlan('invoice_designs')">{{ trans('texts.go_pro') }}</button> <button type="button" class="btn btn-primary" onclick="submitProPlan('invoice_designs')">{{ trans('texts.go_pro') }}</button>
@else @else
<button type="button" class="btn btn-primary" onclick="buyProduct('{{ INVOICE_DESIGNS_AFFILIATE_KEY }}', '{{ PRODUCT_INVOICE_DESIGNS }}')">{{ trans('texts.buy') }}</button> <button type="button" class="btn btn-primary" onclick="buyProduct('{{ INVOICE_DESIGNS_AFFILIATE_KEY }}', '{{ PRODUCT_INVOICE_DESIGNS }}')">{{ trans('texts.buy') }}</button>
@endif @endif

View File

@ -53,6 +53,10 @@ body {
padding: 28px 0; padding: 28px 0;
} }
#footer .bottom a {
color: #636262;
}
#footer .menu-item-31 a:before { #footer .menu-item-31 a:before {
content: ''; content: '';
display: inline-block; display: inline-block;
@ -241,7 +245,7 @@ table.table thead .sorting_desc_disabled:after { content: '' !important }
<div class="bottom"> <div class="bottom">
<div class="wrap"> <div class="wrap">
<div class="copy">Copyright &copy;2015 InvoiceNinja. All rights reserved.</div> <div class="copy">Copyright &copy;2015 <a href="{{ NINJA_WEB_URL }}" target="_blank">Invoice Ninja</a>. All rights reserved.</div>
</div><!-- .wrap --> </div><!-- .wrap -->
</div><!-- .bottom --> </div><!-- .bottom -->
</footer><!-- #footer --> </footer><!-- #footer -->

View File

@ -50,8 +50,8 @@
<p>&nbsp;</p> <p>&nbsp;</p>
{!! Former::checkbox('enable_chart')->text(trans('texts.enable')) !!} {!! Former::checkbox('enable_chart')->text(trans('texts.enable')) !!}
{!! Former::select('chart_type')->options($chartTypes, $chartType) !!}
{!! Former::select('group_by')->options($dateTypes, $groupBy) !!} {!! Former::select('group_by')->options($dateTypes, $groupBy) !!}
{!! Former::select('chart_type')->options($chartTypes, $chartType) !!}
<p>&nbsp;</p> <p>&nbsp;</p>
@if (Auth::user()->isPro()) @if (Auth::user()->isPro())

View File

@ -6,6 +6,13 @@
<meta name="csrf-token" content="<?= csrf_token() ?>"> <meta name="csrf-token" content="<?= csrf_token() ?>">
<script src="{{ asset('js/built.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script> <script src="{{ asset('js/built.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
<link href="{{ asset('css/built.public.css') }}?no_cache={{ NINJA_VERSION }}" rel="stylesheet" type="text/css"/> <link href="{{ asset('css/built.public.css') }}?no_cache={{ NINJA_VERSION }}" rel="stylesheet" type="text/css"/>
<style type="text/css">
body {
background-color: #f8f8f8;
}
</style>
</head> </head>
<body> <body>
@ -23,7 +30,7 @@
@if (!extension_loaded('fileinfo')) @if (!extension_loaded('fileinfo'))
<div class="alert alert-warning">Warning: The <a href="http://php.net/manual/en/book.fileinfo.php" target="_blank">fileinfo</a> extension needs to be installed and enabled.</div> <div class="alert alert-warning">Warning: The <a href="http://php.net/manual/en/book.fileinfo.php" target="_blank">fileinfo</a> extension needs to be installed and enabled.</div>
@endif @endif
@if (!@fopen(base_path()."/.env", 'w')) @if (!@fopen(base_path()."/.env", 'a'))
<div class="alert alert-warning">Warning: Permission denied to write config file <div class="alert alert-warning">Warning: Permission denied to write config file
<pre>sudo chown yourname:www-data /path/to/ninja</pre> <pre>sudo chown yourname:www-data /path/to/ninja</pre>
</div> </div>