Upgrade to Laravel 5.2

This commit is contained in:
Hillel Coren 2016-03-02 15:36:42 +02:00
parent e5fac72e01
commit aef4c6be98
72 changed files with 878 additions and 611 deletions

View File

@ -27,7 +27,7 @@ class AccountApiController extends BaseAPIController
public function __construct(AccountRepository $accountRepo) public function __construct(AccountRepository $accountRepo)
{ {
parent::__construct(); //parent::__construct();
$this->accountRepo = $accountRepo; $this->accountRepo = $accountRepo;
} }

View File

@ -41,7 +41,7 @@ class AccountController extends BaseController
public function __construct(AccountRepository $accountRepo, UserMailer $userMailer, ContactMailer $contactMailer, ReferralRepository $referralRepository) public function __construct(AccountRepository $accountRepo, UserMailer $userMailer, ContactMailer $contactMailer, ReferralRepository $referralRepository)
{ {
parent::__construct(); //parent::__construct();
$this->accountRepo = $accountRepo; $this->accountRepo = $accountRepo;
$this->userMailer = $userMailer; $this->userMailer = $userMailer;

View File

@ -24,7 +24,7 @@ class AccountGatewayController extends BaseController
public function __construct(AccountGatewayService $accountGatewayService) public function __construct(AccountGatewayService $accountGatewayService)
{ {
parent::__construct(); //parent::__construct();
$this->accountGatewayService = $accountGatewayService; $this->accountGatewayService = $accountGatewayService;
} }

View File

@ -15,7 +15,7 @@ class ActivityController extends BaseController
public function __construct(ActivityService $activityService) public function __construct(ActivityService $activityService)
{ {
parent::__construct(); //parent::__construct();
$this->activityService = $activityService; $this->activityService = $activityService;
} }

View File

@ -30,7 +30,7 @@ class AppController extends BaseController
public function __construct(AccountRepository $accountRepo, Mailer $mailer, EmailService $emailService) public function __construct(AccountRepository $accountRepo, Mailer $mailer, EmailService $emailService)
{ {
parent::__construct(); //parent::__construct();
$this->accountRepo = $accountRepo; $this->accountRepo = $accountRepo;
$this->mailer = $mailer; $this->mailer = $mailer;

View File

@ -27,7 +27,6 @@ class AuthController extends Controller {
use AuthenticatesAndRegistersUsers; use AuthenticatesAndRegistersUsers;
protected $loginPath = '/login';
protected $redirectTo = '/dashboard'; protected $redirectTo = '/dashboard';
protected $authService; protected $authService;
protected $accountRepo; protected $accountRepo;

View File

@ -27,7 +27,7 @@ class BankAccountController extends BaseController
public function __construct(BankAccountService $bankAccountService, BankAccountRepository $bankAccountRepo) public function __construct(BankAccountService $bankAccountService, BankAccountRepository $bankAccountRepo)
{ {
parent::__construct(); //parent::__construct();
$this->bankAccountService = $bankAccountService; $this->bankAccountService = $bankAccountService;
$this->bankAccountRepo = $bankAccountRepo; $this->bankAccountRepo = $bankAccountRepo;

View File

@ -1,10 +1,10 @@
<?php namespace App\Http\Controllers; <?php namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesCommands; use Illuminate\Foundation\Bus\DispatchesJobs;
class BaseController extends Controller class BaseController extends Controller
{ {
use DispatchesCommands; use DispatchesJobs;
/** /**
* Setup the layout used by the controller. * Setup the layout used by the controller.
@ -18,8 +18,10 @@ class BaseController extends Controller
} }
} }
/*
public function __construct() public function __construct()
{ {
$this->beforeFilter('csrf', array('on' => array('post', 'delete', 'put'))); $this->beforeFilter('csrf', array('on' => array('post', 'delete', 'put')));
} }
*/
} }

View File

@ -20,7 +20,7 @@ class ClientApiController extends BaseAPIController
public function __construct(ClientRepository $clientRepo, ClientService $clientService) public function __construct(ClientRepository $clientRepo, ClientService $clientService)
{ {
parent::__construct(); //parent::__construct();
$this->clientRepo = $clientRepo; $this->clientRepo = $clientRepo;
$this->clientService = $clientService; $this->clientService = $clientService;

View File

@ -35,7 +35,7 @@ class ClientController extends BaseController
public function __construct(ClientRepository $clientRepo, ClientService $clientService) public function __construct(ClientRepository $clientRepo, ClientService $clientService)
{ {
parent::__construct(); //parent::__construct();
$this->clientRepo = $clientRepo; $this->clientRepo = $clientRepo;
$this->clientService = $clientService; $this->clientService = $clientService;

View File

@ -1,11 +1,11 @@
<?php namespace App\Http\Controllers; <?php namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesCommands; use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController; use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Foundation\Validation\ValidatesRequests;
abstract class Controller extends BaseController { abstract class Controller extends BaseController {
use DispatchesCommands, ValidatesRequests; use DispatchesJobs, ValidatesRequests;
} }

View File

@ -20,7 +20,7 @@ class CreditController extends BaseController
public function __construct(CreditRepository $creditRepo, CreditService $creditService) public function __construct(CreditRepository $creditRepo, CreditService $creditService)
{ {
parent::__construct(); //parent::__construct();
$this->creditRepo = $creditRepo; $this->creditRepo = $creditRepo;
$this->creditService = $creditService; $this->creditService = $creditService;

View File

@ -18,7 +18,7 @@ class ExpenseApiController extends BaseAPIController
public function __construct(ExpenseRepository $expenseRepo, ExpenseService $expenseService) public function __construct(ExpenseRepository $expenseRepo, ExpenseService $expenseService)
{ {
parent::__construct(); //parent::__construct();
$this->expenseRepo = $expenseRepo; $this->expenseRepo = $expenseRepo;
$this->expenseService = $expenseService; $this->expenseService = $expenseService;

View File

@ -28,7 +28,7 @@ class ExpenseController extends BaseController
public function __construct(ExpenseRepository $expenseRepo, ExpenseService $expenseService) public function __construct(ExpenseRepository $expenseRepo, ExpenseService $expenseService)
{ {
parent::__construct(); //parent::__construct();
$this->expenseRepo = $expenseRepo; $this->expenseRepo = $expenseRepo;
$this->expenseService = $expenseService; $this->expenseService = $expenseService;

View File

@ -17,7 +17,7 @@ class HomeController extends BaseController
public function __construct(Mailer $mailer) public function __construct(Mailer $mailer)
{ {
parent::__construct(); //parent::__construct();
$this->mailer = $mailer; $this->mailer = $mailer;
} }

View File

@ -13,7 +13,7 @@ class ImportController extends BaseController
{ {
public function __construct(ImportService $importService) public function __construct(ImportService $importService)
{ {
parent::__construct(); //parent::__construct();
$this->importService = $importService; $this->importService = $importService;
} }

View File

@ -28,7 +28,7 @@ class InvoiceApiController extends BaseAPIController
public function __construct(InvoiceService $invoiceService, InvoiceRepository $invoiceRepo, ClientRepository $clientRepo, PaymentRepository $paymentRepo, Mailer $mailer) public function __construct(InvoiceService $invoiceService, InvoiceRepository $invoiceRepo, ClientRepository $clientRepo, PaymentRepository $paymentRepo, Mailer $mailer)
{ {
parent::__construct(); //parent::__construct();
$this->invoiceRepo = $invoiceRepo; $this->invoiceRepo = $invoiceRepo;
$this->clientRepo = $clientRepo; $this->clientRepo = $clientRepo;

View File

@ -37,7 +37,7 @@ class InvoiceController extends BaseController
public function __construct(Mailer $mailer, InvoiceRepository $invoiceRepo, ClientRepository $clientRepo, InvoiceService $invoiceService, RecurringInvoiceService $recurringInvoiceService) public function __construct(Mailer $mailer, InvoiceRepository $invoiceRepo, ClientRepository $clientRepo, InvoiceService $invoiceService, RecurringInvoiceService $recurringInvoiceService)
{ {
parent::__construct(); //parent::__construct();
$this->mailer = $mailer; $this->mailer = $mailer;
$this->invoiceRepo = $invoiceRepo; $this->invoiceRepo = $invoiceRepo;

View File

@ -19,7 +19,7 @@ class PaymentApiController extends BaseAPIController
public function __construct(PaymentRepository $paymentRepo, ContactMailer $contactMailer) public function __construct(PaymentRepository $paymentRepo, ContactMailer $contactMailer)
{ {
parent::__construct(); //parent::__construct();
$this->paymentRepo = $paymentRepo; $this->paymentRepo = $paymentRepo;
$this->contactMailer = $contactMailer; $this->contactMailer = $contactMailer;

View File

@ -32,7 +32,7 @@ class PaymentController extends BaseController
{ {
public function __construct(PaymentRepository $paymentRepo, InvoiceRepository $invoiceRepo, AccountRepository $accountRepo, ContactMailer $contactMailer, PaymentService $paymentService) public function __construct(PaymentRepository $paymentRepo, InvoiceRepository $invoiceRepo, AccountRepository $accountRepo, ContactMailer $contactMailer, PaymentService $paymentService)
{ {
parent::__construct(); //parent::__construct();
$this->paymentRepo = $paymentRepo; $this->paymentRepo = $paymentRepo;
$this->invoiceRepo = $invoiceRepo; $this->invoiceRepo = $invoiceRepo;

View File

@ -22,7 +22,7 @@ class PaymentTermController extends BaseController
public function __construct(PaymentTermService $paymentTermService) public function __construct(PaymentTermService $paymentTermService)
{ {
parent::__construct(); //parent::__construct();
$this->paymentTermService = $paymentTermService; $this->paymentTermService = $paymentTermService;
} }

View File

@ -25,7 +25,7 @@ class ProductApiController extends BaseAPIController
public function __construct(ProductService $productService, ProductRepository $productRepo) public function __construct(ProductService $productService, ProductRepository $productRepo)
{ {
parent::__construct(); //parent::__construct();
$this->productService = $productService; $this->productService = $productService;
$this->productRepo = $productRepo; $this->productRepo = $productRepo;

View File

@ -21,7 +21,7 @@ class ProductController extends BaseController
public function __construct(ProductService $productService) public function __construct(ProductService $productService)
{ {
parent::__construct(); //parent::__construct();
$this->productService = $productService; $this->productService = $productService;
} }

View File

@ -15,7 +15,7 @@ class QuoteApiController extends BaseAPIController
public function __construct(InvoiceRepository $invoiceRepo) public function __construct(InvoiceRepository $invoiceRepo)
{ {
parent::__construct(); //parent::__construct();
$this->invoiceRepo = $invoiceRepo; $this->invoiceRepo = $invoiceRepo;
} }

View File

@ -36,7 +36,7 @@ class QuoteController extends BaseController
public function __construct(Mailer $mailer, InvoiceRepository $invoiceRepo, ClientRepository $clientRepo, InvoiceService $invoiceService) public function __construct(Mailer $mailer, InvoiceRepository $invoiceRepo, ClientRepository $clientRepo, InvoiceService $invoiceService)
{ {
parent::__construct(); //parent::__construct();
$this->mailer = $mailer; $this->mailer = $mailer;
$this->invoiceRepo = $invoiceRepo; $this->invoiceRepo = $invoiceRepo;

View File

@ -9,7 +9,7 @@ class RecurringInvoiceController extends BaseController
public function __construct(InvoiceRepository $invoiceRepo) public function __construct(InvoiceRepository $invoiceRepo)
{ {
parent::__construct(); //parent::__construct();
$this->invoiceRepo = $invoiceRepo; $this->invoiceRepo = $invoiceRepo;
} }

View File

@ -15,7 +15,7 @@ class TaskApiController extends BaseAPIController
public function __construct(TaskRepository $taskRepo) public function __construct(TaskRepository $taskRepo)
{ {
parent::__construct(); //parent::__construct();
$this->taskRepo = $taskRepo; $this->taskRepo = $taskRepo;
} }

View File

@ -25,7 +25,7 @@ class TaskController extends BaseController
public function __construct(TaskRepository $taskRepo, InvoiceRepository $invoiceRepo, TaskService $taskService) public function __construct(TaskRepository $taskRepo, InvoiceRepository $invoiceRepo, TaskService $taskService)
{ {
parent::__construct(); //parent::__construct();
$this->taskRepo = $taskRepo; $this->taskRepo = $taskRepo;
$this->invoiceRepo = $invoiceRepo; $this->invoiceRepo = $invoiceRepo;

View File

@ -16,7 +16,7 @@ class TaxRateApiController extends BaseAPIController
public function __construct(TaxRateService $taxRateService, TaxRateRepository $taxRateRepo) public function __construct(TaxRateService $taxRateService, TaxRateRepository $taxRateRepo)
{ {
parent::__construct(); //parent::__construct();
$this->taxRateService = $taxRateService; $this->taxRateService = $taxRateService;
$this->taxRateRepo = $taxRateRepo; $this->taxRateRepo = $taxRateRepo;

View File

@ -25,7 +25,7 @@ class TaxRateController extends BaseController
public function __construct(TaxRateService $taxRateService, TaxRateRepository $taxRateRepo) public function __construct(TaxRateService $taxRateService, TaxRateRepository $taxRateRepo)
{ {
parent::__construct(); //parent::__construct();
$this->taxRateService = $taxRateService; $this->taxRateService = $taxRateService;
$this->taxRateRepo = $taxRateRepo; $this->taxRateRepo = $taxRateRepo;

View File

@ -20,7 +20,7 @@ class TokenController extends BaseController
public function __construct(TokenService $tokenService) public function __construct(TokenService $tokenService)
{ {
parent::__construct(); //parent::__construct();
$this->tokenService = $tokenService; $this->tokenService = $tokenService;
} }

View File

@ -16,7 +16,7 @@ class UserApiController extends BaseAPIController
public function __construct(UserService $userService, UserRepository $userRepo) public function __construct(UserService $userService, UserRepository $userRepo)
{ {
parent::__construct(); //parent::__construct();
$this->userService = $userService; $this->userService = $userService;
$this->userRepo = $userRepo; $this->userRepo = $userRepo;

View File

@ -30,7 +30,7 @@ class UserController extends BaseController
public function __construct(AccountRepository $accountRepo, ContactMailer $contactMailer, UserMailer $userMailer, UserService $userService) public function __construct(AccountRepository $accountRepo, ContactMailer $contactMailer, UserMailer $userMailer, UserService $userService)
{ {
parent::__construct(); //parent::__construct();
$this->accountRepo = $accountRepo; $this->accountRepo = $accountRepo;
$this->contactMailer = $contactMailer; $this->contactMailer = $contactMailer;

View File

@ -16,7 +16,7 @@ class VendorApiController extends BaseAPIController
public function __construct(VendorRepository $vendorRepo) public function __construct(VendorRepository $vendorRepo)
{ {
parent::__construct(); //parent::__construct();
$this->vendorRepo = $vendorRepo; $this->vendorRepo = $vendorRepo;
} }

View File

@ -33,7 +33,7 @@ class VendorController extends BaseController
public function __construct(VendorRepository $vendorRepo, VendorService $vendorService) public function __construct(VendorRepository $vendorRepo, VendorService $vendorService)
{ {
parent::__construct(); //parent::__construct();
$this->vendorRepo = $vendorRepo; $this->vendorRepo = $vendorRepo;
$this->vendorService = $vendorService; $this->vendorService = $vendorService;

View File

@ -1,6 +1,5 @@
<?php <?php
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Application Routes | Application Routes
@ -66,16 +65,16 @@ Route::post('/hook/email_bounced', 'AppController@emailBounced');
Route::post('/hook/email_opened', 'AppController@emailOpened'); Route::post('/hook/email_opened', 'AppController@emailOpened');
// Laravel auth routes // Laravel auth routes
get('/signup', array('as' => 'signup', 'uses' => 'Auth\AuthController@getRegister')); Route::get('/signup', array('as' => 'signup', 'uses' => 'Auth\AuthController@getRegister'));
post('/signup', array('as' => 'signup', 'uses' => 'Auth\AuthController@postRegister')); Route::post('/signup', array('as' => 'signup', 'uses' => 'Auth\AuthController@postRegister'));
get('/login', array('as' => 'login', 'uses' => 'Auth\AuthController@getLoginWrapper')); Route::get('/login', array('as' => 'login', 'uses' => 'Auth\AuthController@getLoginWrapper'));
post('/login', array('as' => 'login', 'uses' => 'Auth\AuthController@postLoginWrapper')); Route::post('/login', array('as' => 'login', 'uses' => 'Auth\AuthController@postLoginWrapper'));
get('/logout', array('as' => 'logout', 'uses' => 'Auth\AuthController@getLogoutWrapper')); Route::get('/logout', array('as' => 'logout', 'uses' => 'Auth\AuthController@getLogoutWrapper'));
get('/forgot', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@getEmail')); Route::get('/forgot', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@getEmail'));
post('/forgot', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@postEmail')); Route::post('/forgot', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@postEmail'));
get('/password/reset/{token}', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@getReset')); Route::get('/password/reset/{token}', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@getReset'));
post('/password/reset', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@postReset')); Route::post('/password/reset', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@postReset'));
get('/user/confirm/{code}', 'UserController@confirm'); Route::get('/user/confirm/{code}', 'UserController@confirm');
if (Utils::isNinja()) { if (Utils::isNinja()) {
@ -194,8 +193,8 @@ Route::group(['middleware' => 'auth'], function() {
Route::get('api/credits/{client_id?}', array('as'=>'api.credits', 'uses'=>'CreditController@getDatatable')); Route::get('api/credits/{client_id?}', array('as'=>'api.credits', 'uses'=>'CreditController@getDatatable'));
Route::post('credits/bulk', 'CreditController@bulk'); Route::post('credits/bulk', 'CreditController@bulk');
get('/resend_confirmation', 'AccountController@resendConfirmation'); Route::get('/resend_confirmation', 'AccountController@resendConfirmation');
post('/update_setup', 'AppController@updateSetup'); Route::post('/update_setup', 'AppController@updateSetup');
// vendor // vendor

View File

@ -42,7 +42,7 @@ class EntityModel extends Eloquent
{ {
$className = get_called_class(); $className = get_called_class();
return $className::scope($publicId)->withTrashed()->pluck('id'); return $className::scope($publicId)->withTrashed()->value('id');
} }
public function getActivityKey() public function getActivityKey()

View File

@ -1,6 +1,6 @@
<?php namespace App\Ninja\Mailers; <?php namespace App\Ninja\Mailers;
use HTML; use Form;
use Utils; use Utils;
use Event; use Event;
use URL; use URL;
@ -246,9 +246,9 @@ class ContactMailer extends Mailer
'$quote' => $invoice->invoice_number, '$quote' => $invoice->invoice_number,
'$link' => $invitation->getLink(), '$link' => $invitation->getLink(),
'$viewLink' => $invitation->getLink(), '$viewLink' => $invitation->getLink(),
'$viewButton' => HTML::emailViewButton($invitation->getLink(), $invoice->getEntityType()), '$viewButton' => Form::emailViewButton($invitation->getLink(), $invoice->getEntityType()),
'$paymentLink' => $invitation->getLink('payment'), '$paymentLink' => $invitation->getLink('payment'),
'$paymentButton' => HTML::emailPaymentButton($invitation->getLink('payment')), '$paymentButton' => Form::emailPaymentButton($invitation->getLink('payment')),
'$customClient1' => $account->custom_client_label1, '$customClient1' => $account->custom_client_label1,
'$customClient2' => $account->custom_client_label2, '$customClient2' => $account->custom_client_label2,
'$customInvoice1' => $account->custom_invoice_text_label1, '$customInvoice1' => $account->custom_invoice_text_label1,
@ -260,7 +260,7 @@ class ContactMailer extends Mailer
$camelType = Gateway::getPaymentTypeName($type); $camelType = Gateway::getPaymentTypeName($type);
$type = Utils::toSnakeCase($camelType); $type = Utils::toSnakeCase($camelType);
$variables["\${$camelType}Link"] = $invitation->getLink() . "/{$type}"; $variables["\${$camelType}Link"] = $invitation->getLink() . "/{$type}";
$variables["\${$camelType}Button"] = HTML::emailPaymentButton($invitation->getLink('payment') . "/{$type}"); $variables["\${$camelType}Button"] = Form::emailPaymentButton($invitation->getLink('payment') . "/{$type}");
} }
$str = str_replace(array_keys($variables), array_values($variables), $template); $str = str_replace(array_keys($variables), array_values($variables), $template);

View File

@ -4,6 +4,7 @@ use Session;
use Auth; use Auth;
use Utils; use Utils;
use HTML; use HTML;
use Form;
use URL; use URL;
use Request; use Request;
use Validator; use Validator;
@ -18,18 +19,22 @@ class AppServiceProvider extends ServiceProvider {
*/ */
public function boot() public function boot()
{ {
HTML::macro('nav_link', function($url, $text, $url2 = '', $extra = '') { Form::macro('image_data', function($imagePath) {
return 'data:image/jpeg;base64,' . base64_encode(file_get_contents($imagePath));
});
Form::macro('nav_link', function($url, $text, $url2 = '', $extra = '') {
$class = ( Request::is($url) || Request::is($url.'/*') || Request::is($url2.'/*') ) ? ' class="active"' : ''; $class = ( Request::is($url) || Request::is($url.'/*') || Request::is($url2.'/*') ) ? ' class="active"' : '';
$title = ucwords(trans("texts.$text")) . Utils::getProLabel($text); $title = ucwords(trans("texts.$text")) . Utils::getProLabel($text);
return '<li'.$class.'><a href="'.URL::to($url).'" '.$extra.'>'.$title.'</a></li>'; return '<li'.$class.'><a href="'.URL::to($url).'" '.$extra.'>'.$title.'</a></li>';
}); });
HTML::macro('tab_link', function($url, $text, $active = false) { Form::macro('tab_link', function($url, $text, $active = false) {
$class = $active ? ' class="active"' : ''; $class = $active ? ' class="active"' : '';
return '<li'.$class.'><a href="'.URL::to($url).'" data-toggle="tab">'.$text.'</a></li>'; return '<li'.$class.'><a href="'.URL::to($url).'" data-toggle="tab">'.$text.'</a></li>';
}); });
HTML::macro('menu_link', function($type) { Form::macro('menu_link', function($type) {
$types = $type.'s'; $types = $type.'s';
$Type = ucfirst($type); $Type = ucfirst($type);
$Types = ucfirst($types); $Types = ucfirst($types);
@ -65,15 +70,11 @@ class AppServiceProvider extends ServiceProvider {
return $str; return $str;
}); });
HTML::macro('image_data', function($imagePath) { Form::macro('flatButton', function($label, $color) {
return 'data:image/jpeg;base64,' . base64_encode(file_get_contents($imagePath));
});
HTML::macro('flatButton', function($label, $color) {
return '<input type="button" value="' . trans("texts.{$label}") . '" style="background-color:' . $color . ';border:0 none;border-radius:5px;padding:12px 40px;margin:0 6px;cursor:hand;display:inline-block;font-size:14px;color:#fff;text-transform:none;font-weight:bold;"/>'; return '<input type="button" value="' . trans("texts.{$label}") . '" style="background-color:' . $color . ';border:0 none;border-radius:5px;padding:12px 40px;margin:0 6px;cursor:hand;display:inline-block;font-size:14px;color:#fff;text-transform:none;font-weight:bold;"/>';
}); });
HTML::macro('emailViewButton', function($link = '#', $entityType = ENTITY_INVOICE) { Form::macro('emailViewButton', function($link = '#', $entityType = ENTITY_INVOICE) {
return view('partials.email_button') return view('partials.email_button')
->with([ ->with([
'link' => $link, 'link' => $link,
@ -83,7 +84,7 @@ class AppServiceProvider extends ServiceProvider {
->render(); ->render();
}); });
HTML::macro('emailPaymentButton', function($link = '#') { Form::macro('emailPaymentButton', function($link = '#') {
return view('partials.email_button') return view('partials.email_button')
->with([ ->with([
'link' => $link, 'link' => $link,
@ -93,7 +94,7 @@ class AppServiceProvider extends ServiceProvider {
->render(); ->render();
}); });
HTML::macro('breadcrumbs', function($status = false) { Form::macro('breadcrumbs', function($status = false) {
$str = '<ol class="breadcrumb">'; $str = '<ol class="breadcrumb">';
// Get the breadcrumbs by exploding the current path. // Get the breadcrumbs by exploding the current path.

View File

@ -38,11 +38,11 @@ class ActivityService extends BaseService
'activity_type_id', 'activity_type_id',
function ($model) { function ($model) {
$data = [ $data = [
'client' => link_to('/clients/' . $model->client_public_id, Utils::getClientDisplayName($model)), 'client' => link_to('/clients/' . $model->client_public_id, Utils::getClientDisplayName($model))->toHtml(),
'user' => $model->is_system ? '<i>' . trans('texts.system') . '</i>' : Utils::getPersonDisplayName($model->user_first_name, $model->user_last_name, $model->user_email), 'user' => $model->is_system ? '<i>' . trans('texts.system') . '</i>' : Utils::getPersonDisplayName($model->user_first_name, $model->user_last_name, $model->user_email),
'invoice' => $model->invoice ? link_to('/invoices/' . $model->invoice_public_id, $model->is_recurring ? trans('texts.recurring_invoice') : $model->invoice) : null, 'invoice' => $model->invoice ? link_to('/invoices/' . $model->invoice_public_id, $model->is_recurring ? trans('texts.recurring_invoice') : $model->invoice)->toHtml() : null,
'quote' => $model->invoice ? link_to('/quotes/' . $model->invoice_public_id, $model->invoice) : null, 'quote' => $model->invoice ? link_to('/quotes/' . $model->invoice_public_id, $model->invoice)->toHtml() : null,
'contact' => $model->contact_id ? link_to('/clients/' . $model->client_public_id, Utils::getClientDisplayName($model)) : Utils::getPersonDisplayName($model->user_first_name, $model->user_last_name, $model->user_email), 'contact' => $model->contact_id ? link_to('/clients/' . $model->client_public_id, Utils::getClientDisplayName($model))->toHtml() : Utils::getPersonDisplayName($model->user_first_name, $model->user_last_name, $model->user_email),
'payment' => $model->payment ?: '', 'payment' => $model->payment ?: '',
'credit' => Utils::formatMoney($model->credit, $model->currency_id, $model->country_id) 'credit' => Utils::formatMoney($model->credit, $model->currency_id, $model->country_id)
]; ];

View File

@ -228,7 +228,7 @@ class BankAccountService extends BaseService
[ [
'bank_name', 'bank_name',
function ($model) { function ($model) {
return link_to("bank_accounts/{$model->public_id}/edit", $model->bank_name); return link_to("bank_accounts/{$model->public_id}/edit", $model->bank_name)->toHtml();
}, },
], ],
[ [

View File

@ -1,11 +1,11 @@
<?php namespace App\Services; <?php namespace App\Services;
use Illuminate\Foundation\Bus\DispatchesCommands; use Illuminate\Foundation\Bus\DispatchesJobs;
use App\Services\DatatableService; use App\Services\DatatableService;
class BaseService class BaseService
{ {
use DispatchesCommands; use DispatchesJobs;
protected function getRepo() protected function getRepo()
{ {

View File

@ -46,19 +46,19 @@ class ClientService extends BaseService
[ [
'name', 'name',
function ($model) { function ($model) {
return link_to("clients/{$model->public_id}", $model->name ?: ''); return link_to("clients/{$model->public_id}", $model->name ?: '')->toHtml();
} }
], ],
[ [
'first_name', 'first_name',
function ($model) { function ($model) {
return link_to("clients/{$model->public_id}", $model->first_name.' '.$model->last_name); return link_to("clients/{$model->public_id}", $model->first_name.' '.$model->last_name)->toHtml();
} }
], ],
[ [
'email', 'email',
function ($model) { function ($model) {
return link_to("clients/{$model->public_id}", $model->email ?: ''); return link_to("clients/{$model->public_id}", $model->email ?: '')->toHtml();
} }
], ],
[ [

View File

@ -40,7 +40,7 @@ class CreditService extends BaseService
[ [
'client_name', 'client_name',
function ($model) { function ($model) {
return $model->client_public_id ? link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model)) : ''; return $model->client_public_id ? link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model))->toHtml() : '';
}, },
! $hideClient ! $hideClient
], ],

View File

@ -1,5 +1,6 @@
<?php namespace App\Services; <?php namespace App\Services;
use HtmlString;
use Utils; use Utils;
use Datatable; use Datatable;

View File

@ -63,7 +63,7 @@ class ExpenseService extends BaseService
function ($model) function ($model)
{ {
if ($model->vendor_public_id) { if ($model->vendor_public_id) {
return link_to("vendors/{$model->vendor_public_id}", $model->vendor_name); return link_to("vendors/{$model->vendor_public_id}", $model->vendor_name)->toHtml();
} else { } else {
return ''; return '';
} }
@ -74,7 +74,7 @@ class ExpenseService extends BaseService
function ($model) function ($model)
{ {
if ($model->client_public_id) { if ($model->client_public_id) {
return link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model)); return link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model))->toHtml();
} else { } else {
return ''; return '';
} }
@ -83,7 +83,7 @@ class ExpenseService extends BaseService
[ [
'expense_date', 'expense_date',
function ($model) { function ($model) {
return link_to("expenses/{$model->public_id}/edit", Utils::fromSqlDate($model->expense_date)); return link_to("expenses/{$model->public_id}/edit", Utils::fromSqlDate($model->expense_date))->toHtml();
} }
], ],
[ [

View File

@ -117,13 +117,13 @@ class InvoiceService extends BaseService
[ [
'invoice_number', 'invoice_number',
function ($model) use ($entityType) { function ($model) use ($entityType) {
return link_to("{$entityType}s/{$model->public_id}/edit", $model->invoice_number, ['class' => Utils::getEntityRowClass($model)]); return link_to("{$entityType}s/{$model->public_id}/edit", $model->invoice_number, ['class' => Utils::getEntityRowClass($model)])->toHtml();
} }
], ],
[ [
'client_name', 'client_name',
function ($model) { function ($model) {
return link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model)); return link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model))->toHtml();
}, },
! $hideClient ! $hideClient
], ],
@ -160,7 +160,7 @@ class InvoiceService extends BaseService
[ [
'invoice_status_name', 'invoice_status_name',
function ($model) { function ($model) {
return $model->quote_invoice_id ? link_to("invoices/{$model->quote_invoice_id}/edit", trans('texts.converted')) : self::getStatusLabel($model); return $model->quote_invoice_id ? link_to("invoices/{$model->quote_invoice_id}/edit", trans('texts.converted'))->toHtml() : self::getStatusLabel($model);
} }
] ]
]; ];

View File

@ -295,13 +295,13 @@ class PaymentService extends BaseService
[ [
'invoice_number', 'invoice_number',
function ($model) { function ($model) {
return link_to("invoices/{$model->invoice_public_id}/edit", $model->invoice_number, ['class' => Utils::getEntityRowClass($model)]); return link_to("invoices/{$model->invoice_public_id}/edit", $model->invoice_number, ['class' => Utils::getEntityRowClass($model)])->toHtml();
} }
], ],
[ [
'client_name', 'client_name',
function ($model) { function ($model) {
return $model->client_public_id ? link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model)) : ''; return $model->client_public_id ? link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model))->toHtml() : '';
}, },
! $hideClient ! $hideClient
], ],

View File

@ -34,7 +34,7 @@ class PaymentTermService extends BaseService
[ [
'name', 'name',
function ($model) { function ($model) {
return link_to("payment_terms/{$model->public_id}/edit", $model->name); return link_to("payment_terms/{$model->public_id}/edit", $model->name)->toHtml();
} }
], ],
[ [

View File

@ -44,7 +44,7 @@ class ProductService extends BaseService
[ [
'product_key', 'product_key',
function ($model) { function ($model) {
return link_to('products/'.$model->public_id.'/edit', $model->product_key); return link_to('products/'.$model->public_id.'/edit', $model->product_key)->toHtml();
} }
], ],
[ [

View File

@ -28,13 +28,13 @@ class RecurringInvoiceService extends BaseService
[ [
'frequency', 'frequency',
function ($model) { function ($model) {
return link_to("invoices/{$model->public_id}", $model->frequency); return link_to("invoices/{$model->public_id}", $model->frequency)->toHtml();
} }
], ],
[ [
'client_name', 'client_name',
function ($model) { function ($model) {
return link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model)); return link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model))->toHtml();
}, },
! $hideClient ! $hideClient
], ],

View File

@ -42,14 +42,14 @@ class TaskService extends BaseService
[ [
'client_name', 'client_name',
function ($model) { function ($model) {
return $model->client_public_id ? link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model)) : ''; return $model->client_public_id ? link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model))->toHtml() : '';
}, },
! $hideClient ! $hideClient
], ],
[ [
'created_at', 'created_at',
function ($model) { function ($model) {
return link_to("tasks/{$model->public_id}/edit", Task::calcStartTime($model)); return link_to("tasks/{$model->public_id}/edit", Task::calcStartTime($model))->toHtml();
} }
], ],
[ [

View File

@ -41,7 +41,7 @@ class TaxRateService extends BaseService
[ [
'name', 'name',
function ($model) { function ($model) {
return link_to("tax_rates/{$model->public_id}/edit", $model->name); return link_to("tax_rates/{$model->public_id}/edit", $model->name)->toHtml();
} }
], ],
[ [

View File

@ -40,7 +40,7 @@ class TokenService extends BaseService
[ [
'name', 'name',
function ($model) { function ($model) {
return link_to("tokens/{$model->public_id}/edit", $model->name); return link_to("tokens/{$model->public_id}/edit", $model->name)->toHtml();
} }
], ],
[ [

View File

@ -40,7 +40,7 @@ class UserService extends BaseService
[ [
'first_name', 'first_name',
function ($model) { function ($model) {
return $model->public_id ? link_to('users/'.$model->public_id.'/edit', $model->first_name.' '.$model->last_name) : ($model->first_name.' '.$model->last_name); return $model->public_id ? link_to('users/'.$model->public_id.'/edit', $model->first_name.' '.$model->last_name)->toHtml() : ($model->first_name.' '.$model->last_name);
} }
], ],
[ [

View File

@ -46,7 +46,7 @@ class VendorService extends BaseService
[ [
'name', 'name',
function ($model) { function ($model) {
return link_to("vendors/{$model->public_id}", $model->name ?: ''); return link_to("vendors/{$model->public_id}", $model->name ?: '')->toHtml();
} }
], ],
[ [
@ -64,7 +64,7 @@ class VendorService extends BaseService
[ [
'email', 'email',
function ($model) { function ($model) {
return link_to("vendors/{$model->public_id}", $model->email ?: ''); return link_to("vendors/{$model->public_id}", $model->email ?: '')->toHtml();
} }
], ],
[ [

0
bootstrap/app.php Normal file → Executable file
View File

0
bootstrap/autoload.php Normal file → Executable file
View File

0
bootstrap/environment.php Normal file → Executable file
View File

View File

@ -15,11 +15,14 @@
"omnipay/2checkout": "dev-master#e9c079c2dde0d7ba461903b3b7bd5caf6dee1248", "omnipay/2checkout": "dev-master#e9c079c2dde0d7ba461903b3b7bd5caf6dee1248",
"omnipay/gocardless": "dev-master", "omnipay/gocardless": "dev-master",
"omnipay/stripe": "2.3.0", "omnipay/stripe": "2.3.0",
"laravel/framework": "5.1.*", "laravel/framework": "5.2.*",
"laravelcollective/html": "5.2.*",
"laravelcollective/bus": "5.2.*",
"symfony/css-selector": "~3.0",
"patricktalmadge/bootstrapper": "5.5.x", "patricktalmadge/bootstrapper": "5.5.x",
"anahkiasen/former": "4.0.*@dev", "anahkiasen/former": "4.0.*@dev",
"barryvdh/laravel-debugbar": "~2.0.2", "barryvdh/laravel-debugbar": "~2.0",
"chumper/datatable": "dev-develop#7fa47cb", "chumper/datatable": "dev-develop#04ef2bf",
"omnipay/omnipay": "~2.3.0", "omnipay/omnipay": "~2.3.0",
"intervention/image": "dev-master", "intervention/image": "dev-master",
"webpatser/laravel-countries": "dev-master", "webpatser/laravel-countries": "dev-master",
@ -35,7 +38,6 @@
"alfaproject/omnipay-skrill": "dev-master", "alfaproject/omnipay-skrill": "dev-master",
"omnipay/bitpay": "dev-master", "omnipay/bitpay": "dev-master",
"guzzlehttp/guzzle": "~6.0", "guzzlehttp/guzzle": "~6.0",
"laravelcollective/html": "~5.0",
"wildbit/laravel-postmark-provider": "2.0", "wildbit/laravel-postmark-provider": "2.0",
"Dwolla/omnipay-dwolla": "dev-master", "Dwolla/omnipay-dwolla": "dev-master",
"laravel/socialite": "~2.0", "laravel/socialite": "~2.0",
@ -71,7 +73,8 @@
"phpspec/phpspec": "~2.1", "phpspec/phpspec": "~2.1",
"codeception/codeception": "*", "codeception/codeception": "*",
"codeception/c3": "~2.0", "codeception/c3": "~2.0",
"fzaninotto/faker": "^1.5" "fzaninotto/faker": "^1.5",
"symfony/dom-crawler": "~3.0"
}, },
"autoload": { "autoload": {
"classmap": [ "classmap": [

967
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -17,6 +17,8 @@ return [
'debug' => env('APP_DEBUG', ''), 'debug' => env('APP_DEBUG', ''),
'env' => env('APP_ENV', 'production'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Application URL | Application URL
@ -115,12 +117,11 @@ return [
/* /*
* Laravel Framework Service Providers... * Laravel Framework Service Providers...
*/ */
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
'Illuminate\Auth\AuthServiceProvider', 'Illuminate\Auth\AuthServiceProvider',
'Illuminate\Bus\BusServiceProvider', 'Collective\Html\HtmlServiceProvider',
'Collective\Bus\BusServiceProvider',
'Illuminate\Cache\CacheServiceProvider', 'Illuminate\Cache\CacheServiceProvider',
'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider', 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
'Illuminate\Routing\ControllerServiceProvider',
'Illuminate\Cookie\CookieServiceProvider', 'Illuminate\Cookie\CookieServiceProvider',
'Illuminate\Database\DatabaseServiceProvider', 'Illuminate\Database\DatabaseServiceProvider',
'Illuminate\Encryption\EncryptionServiceProvider', 'Illuminate\Encryption\EncryptionServiceProvider',
@ -149,7 +150,6 @@ return [
'Intervention\Image\ImageServiceProvider', 'Intervention\Image\ImageServiceProvider',
'Webpatser\Countries\CountriesServiceProvider', 'Webpatser\Countries\CountriesServiceProvider',
'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider', 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
'Illuminate\Html\HtmlServiceProvider',
'Laravel\Socialite\SocialiteServiceProvider', 'Laravel\Socialite\SocialiteServiceProvider',
'Jlapp\Swaggervel\SwaggervelServiceProvider', 'Jlapp\Swaggervel\SwaggervelServiceProvider',
'Maatwebsite\Excel\ExcelServiceProvider', 'Maatwebsite\Excel\ExcelServiceProvider',
@ -158,7 +158,7 @@ return [
* Application Service Providers... * Application Service Providers...
*/ */
'App\Providers\AppServiceProvider', 'App\Providers\AppServiceProvider',
'App\Providers\BusServiceProvider', //'App\Providers\BusServiceProvider',
'App\Providers\ConfigServiceProvider', 'App\Providers\ConfigServiceProvider',
'App\Providers\EventServiceProvider', 'App\Providers\EventServiceProvider',
'App\Providers\RouteServiceProvider', 'App\Providers\RouteServiceProvider',

View File

@ -4,64 +4,104 @@ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Default Authentication Driver | Authentication Defaults
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This option controls the authentication driver that will be utilized. | This option controls the default authentication "guard" and password
| This driver manages the retrieval and authentication of the users | reset options for your application. You may change these defaults
| attempting to get access to protected areas of your application. | as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session", "token"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
| |
| Supported: "database", "eloquent" | Supported: "database", "eloquent"
| |
*/ */
'providers' => [
'users' => [
'driver' => 'eloquent', 'driver' => 'eloquent',
'model' => App\Models\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Authentication Model | Resetting Passwords
|--------------------------------------------------------------------------
|
| When using the "Eloquent" authentication driver, we need to know which
| Eloquent model should be used to retrieve your users. Of course, it
| is often just the "User" model but you may use whatever you like.
|
*/
'model' => 'App\Models\User',
/*
|--------------------------------------------------------------------------
| Authentication Table
|--------------------------------------------------------------------------
|
| When using the "Database" authentication driver, we need to know which
| table should be used to retrieve your users. We have chosen a basic
| default value but you may easily change it to any table you like.
|
*/
'table' => 'users',
/*
|--------------------------------------------------------------------------
| Password Reset Settings
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Here you may set the options for resetting passwords including the view | Here you may set the options for resetting passwords including the view
| that is your password reset e-mail. You can also set the name of the | that is your password reset e-mail. You may also set the name of the
| table that maintains all of the reset tokens for your application. | table that maintains all of the reset tokens for your application.
| |
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire time is the number of minutes that the reset token should be | The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so | considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed. | they have less time to be guessed. You may change this as needed.
| |
*/ */
'password' => [ 'passwords' => [
'email' => 'emails.password', 'users' => [
'provider' => 'users',
'email' => 'emails.password', //auth.emails.password
'table' => 'password_resets', 'table' => 'password_resets',
'expire' => 60, 'expire' => 60,
], ],
],
]; ];

View File

@ -51,6 +51,7 @@ class CurrenciesSeeder extends Seeder
['name' => 'Aruban Florin', 'code' => 'AWG', 'symbol' => 'Afl. ', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'], ['name' => 'Aruban Florin', 'code' => 'AWG', 'symbol' => 'Afl. ', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'],
['name' => 'Turkish Lira', 'code' => 'TRY', 'symbol' => 'TL ', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','], ['name' => 'Turkish Lira', 'code' => 'TRY', 'symbol' => 'TL ', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','],
['name' => 'Romanian New Leu', 'code' => 'RON', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['name' => 'Romanian New Leu', 'code' => 'RON', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
['name' => 'Croatian', 'code' => 'HKR', 'symbol' => 'kn', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','],
]; ];
foreach ($currencies as $currency) { foreach ($currencies as $currency) {

View File

@ -212,9 +212,9 @@
"0001", "0001",
"0001", "0001",
"{{ URL::to('/view/...') }}", "{{ URL::to('/view/...') }}",
'{!! HTML::flatButton('view_invoice', '#0b4d78') !!}', '{!! Form::flatButton('view_invoice', '#0b4d78') !!}',
"{{ URL::to('/payment/...') }}", "{{ URL::to('/payment/...') }}",
'{!! HTML::flatButton('pay_now', '#36c157') !!}', '{!! Form::flatButton('pay_now', '#36c157') !!}',
]; ];
// Add blanks for custom values // Add blanks for custom values
@ -227,7 +227,7 @@
{!! "vals.push('" . URL::to('/payment/...') . "');" !!} {!! "vals.push('" . URL::to('/payment/...') . "');" !!}
{!! "keys.push('" . \App\Models\Gateway::getPaymentTypeName($type).'Button' . "');" !!} {!! "keys.push('" . \App\Models\Gateway::getPaymentTypeName($type).'Button' . "');" !!}
{!! "vals.push('" . HTML::flatButton('pay_now', '#36c157') . "');" !!} {!! "vals.push('" . Form::flatButton('pay_now', '#36c157') . "');" !!}
@endforeach @endforeach
for (var i=0; i<keys.length; i++) { for (var i=0; i<keys.length; i++) {

View File

@ -174,16 +174,16 @@
@endif @endif
<ul class="nav nav-tabs nav-justified"> <ul class="nav nav-tabs nav-justified">
{!! HTML::tab_link('#activity', trans('texts.activity'), true) !!} {!! Form::tab_link('#activity', trans('texts.activity'), true) !!}
@if ($hasTasks) @if ($hasTasks)
{!! HTML::tab_link('#tasks', trans('texts.tasks')) !!} {!! Form::tab_link('#tasks', trans('texts.tasks')) !!}
@endif @endif
@if ($hasQuotes && Utils::isPro()) @if ($hasQuotes && Utils::isPro())
{!! HTML::tab_link('#quotes', trans('texts.quotes')) !!} {!! Form::tab_link('#quotes', trans('texts.quotes')) !!}
@endif @endif
{!! HTML::tab_link('#invoices', trans('texts.invoices')) !!} {!! Form::tab_link('#invoices', trans('texts.invoices')) !!}
{!! HTML::tab_link('#payments', trans('texts.payments')) !!} {!! Form::tab_link('#payments', trans('texts.payments')) !!}
{!! HTML::tab_link('#credits', trans('texts.credits')) !!} {!! Form::tab_link('#credits', trans('texts.credits')) !!}
</ul> </ul>
<div class="tab-content"> <div class="tab-content">

View File

@ -386,12 +386,12 @@
<div class="collapse navbar-collapse" id="navbar-collapse-1"> <div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav" style="font-weight: bold"> <ul class="nav navbar-nav" style="font-weight: bold">
{!! HTML::nav_link('dashboard', 'dashboard') !!} {!! Form::nav_link('dashboard', 'dashboard') !!}
{!! HTML::menu_link('client') !!} {!! Form::menu_link('client') !!}
{!! HTML::menu_link('task') !!} {!! Form::menu_link('task') !!}
{!! HTML::menu_link('expense') !!} {!! Form::menu_link('expense') !!}
{!! HTML::menu_link('invoice') !!} {!! Form::menu_link('invoice') !!}
{!! HTML::menu_link('payment') !!} {!! Form::menu_link('payment') !!}
</ul> </ul>
<div id="navbar-options"> <div id="navbar-options">
@ -535,7 +535,7 @@
@endif @endif
@if (!isset($showBreadcrumbs) || $showBreadcrumbs) @if (!isset($showBreadcrumbs) || $showBreadcrumbs)
{!! HTML::breadcrumbs(isset($entityStatus) ? $entityStatus : '') !!} {!! Form::breadcrumbs(isset($entityStatus) ? $entityStatus : '') !!}
@endif @endif
@yield('content') @yield('content')

View File

@ -954,7 +954,7 @@
@endif @endif
@if ($account->hasLogo()) @if ($account->hasLogo())
invoice.image = "{{ HTML::image_data($account->getLogoPath()) }}"; invoice.image = "{{ Form::image_data($account->getLogoPath()) }}";
invoice.imageWidth = {{ $account->getLogoWidth() }}; invoice.imageWidth = {{ $account->getLogoWidth() }};
invoice.imageHeight = {{ $account->getLogoHeight() }}; invoice.imageHeight = {{ $account->getLogoHeight() }};
@endif @endif

View File

@ -62,20 +62,20 @@
<script type="text/javascript"> <script type="text/javascript">
window.logoImages = {}; window.logoImages = {};
logoImages.imageLogo1 = "{{ HTML::image_data('images/report_logo1.jpg') }}"; logoImages.imageLogo1 = "{{ Form::image_data('images/report_logo1.jpg') }}";
logoImages.imageLogoWidth1 =120; logoImages.imageLogoWidth1 =120;
logoImages.imageLogoHeight1 = 40 logoImages.imageLogoHeight1 = 40
logoImages.imageLogo2 = "{{ HTML::image_data('images/report_logo2.jpg') }}"; logoImages.imageLogo2 = "{{ Form::image_data('images/report_logo2.jpg') }}";
logoImages.imageLogoWidth2 =325/2; logoImages.imageLogoWidth2 =325/2;
logoImages.imageLogoHeight2 = 81/2; logoImages.imageLogoHeight2 = 81/2;
logoImages.imageLogo3 = "{{ HTML::image_data('images/report_logo3.jpg') }}"; logoImages.imageLogo3 = "{{ Form::image_data('images/report_logo3.jpg') }}";
logoImages.imageLogoWidth3 =325/2; logoImages.imageLogoWidth3 =325/2;
logoImages.imageLogoHeight3 = 81/2; logoImages.imageLogoHeight3 = 81/2;
@if ($account->hasLogo()) @if ($account->hasLogo())
window.accountLogo = "{{ HTML::image_data($account->getLogoPath()) }}"; window.accountLogo = "{{ Form::image_data($account->getLogoPath()) }}";
if (window.invoice) { if (window.invoice) {
invoice.image = window.accountLogo; invoice.image = window.accountLogo;
invoice.imageWidth = {{ $account->getLogoWidth() }}; invoice.imageWidth = {{ $account->getLogoWidth() }};

View File

@ -142,7 +142,7 @@
@endif @endif
<ul class="nav nav-tabs nav-justified"> <ul class="nav nav-tabs nav-justified">
{!! HTML::tab_link('#expenses', trans('texts.expenses')) !!} {!! Form::tab_link('#expenses', trans('texts.expenses')) !!}
</ul> </ul>
<div class="tab-content"> <div class="tab-content">