mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for links when public/ is in URL
This commit is contained in:
parent
cd2c992158
commit
b6fa4620b9
@ -9,6 +9,7 @@ use Session;
|
|||||||
use Utils;
|
use Utils;
|
||||||
use Validator;
|
use Validator;
|
||||||
use View;
|
use View;
|
||||||
|
use URL;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
use Cache;
|
use Cache;
|
||||||
use Response;
|
use Response;
|
||||||
@ -234,7 +235,7 @@ class AccountController extends BaseController
|
|||||||
{
|
{
|
||||||
$oauthLoginUrls = [];
|
$oauthLoginUrls = [];
|
||||||
foreach (AuthService::$providers as $provider) {
|
foreach (AuthService::$providers as $provider) {
|
||||||
$oauthLoginUrls[] = ['label' => $provider, 'url' => '/auth/'.strtolower($provider)];
|
$oauthLoginUrls[] = ['label' => $provider, 'url' => URL::to('/auth/'.strtolower($provider))];
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
@ -112,10 +112,10 @@ class ClientController extends BaseController
|
|||||||
|
|
||||||
$actionLinks = [];
|
$actionLinks = [];
|
||||||
if(Task::canCreate()){
|
if(Task::canCreate()){
|
||||||
$actionLinks[] = ['label' => trans('texts.new_task'), 'url' => '/tasks/create/'.$client->public_id];
|
$actionLinks[] = ['label' => trans('texts.new_task'), 'url' => URL::to('/tasks/create/'.$client->public_id)];
|
||||||
}
|
}
|
||||||
if (Utils::isPro() && Invoice::canCreate()) {
|
if (Utils::isPro() && Invoice::canCreate()) {
|
||||||
$actionLinks[] = ['label' => trans('texts.new_quote'), 'url' => '/quotes/create/'.$client->public_id];
|
$actionLinks[] = ['label' => trans('texts.new_quote'), 'url' => URL::to('/quotes/create/'.$client->public_id)];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($actionLinks)){
|
if(!empty($actionLinks)){
|
||||||
@ -123,15 +123,15 @@ class ClientController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(Payment::canCreate()){
|
if(Payment::canCreate()){
|
||||||
$actionLinks[] = ['label' => trans('texts.enter_payment'), 'url' => '/payments/create/'.$client->public_id];
|
$actionLinks[] = ['label' => trans('texts.enter_payment'), 'url' => URL::to('/payments/create/'.$client->public_id)];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Credit::canCreate()){
|
if(Credit::canCreate()){
|
||||||
$actionLinks[] = ['label' => trans('texts.enter_credit'), 'url' => '/credits/create/'.$client->public_id];
|
$actionLinks[] = ['label' => trans('texts.enter_credit'), 'url' => URL::to('/credits/create/'.$client->public_id)];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Expense::canCreate()){
|
if(Expense::canCreate()){
|
||||||
$actionLinks[] = ['label' => trans('texts.enter_expense'), 'url' => '/expenses/create/0/'.$client->public_id];
|
$actionLinks[] = ['label' => trans('texts.enter_expense'), 'url' => URL::to('/expenses/create/0/'.$client->public_id)];
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
|
@ -107,7 +107,7 @@ class VendorController extends BaseController
|
|||||||
Utils::trackViewed($vendor->getDisplayName(), 'vendor');
|
Utils::trackViewed($vendor->getDisplayName(), 'vendor');
|
||||||
|
|
||||||
$actionLinks = [
|
$actionLinks = [
|
||||||
['label' => trans('texts.new_vendor'), 'url' => '/vendors/create/' . $vendor->public_id]
|
['label' => trans('texts.new_vendor'), 'url' => URL::to('/vendors/create/' . $vendor->public_id)]
|
||||||
];
|
];
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user