Merge branch 'master' of github.com:paralin/invoice-ninja

This commit is contained in:
Christian Stewart 2015-05-21 16:59:01 -07:00
commit ed283b9bad
32 changed files with 189 additions and 142 deletions

View File

@ -1,5 +1,6 @@
<?php namespace App\Http\Controllers;
use Request;
use Redirect;
use Auth;
use View;
@ -8,6 +9,7 @@ use Session;
use App\Models\Account;
use App\Libraries\Utils;
use App\Ninja\Mailers\Mailer;
use Symfony\Component\Security\Core\Util\StringUtils;
class HomeController extends BaseController
{
@ -76,4 +78,9 @@ class HomeController extends BaseController
{
return Utils::logError(Input::get('error'), 'JavaScript');
}
public function keepAlive()
{
return RESULT_SUCCESS;
}
}

View File

@ -483,7 +483,7 @@ class PaymentController extends BaseController
$license->save();
}
return $productId == PRODUCT_INVOICE_DESIGNS ? $_ENV['INVOICE_DESIGNS'] : 'valid';
return $productId == PRODUCT_INVOICE_DESIGNS ? file_get_contents(storage_path() . '/invoice_designs.txt') : 'valid';
} else {
return 'invalid';
}

View File

@ -16,13 +16,14 @@ class ReportController extends BaseController
public function d3()
{
$message = '';
$fileName = storage_path() . '/dataviz_sample.txt';
if (Auth::user()->account->isPro()) {
$account = Account::where('id', '=', Auth::user()->account->id)->with(['clients.invoices.invoice_items', 'clients.contacts'])->first();
$account = $account->hideFieldsForViz();
$clients = $account->clients->toJson();
} elseif (isset($_ENV['DATA_VIZ_SAMPLE'])) {
$clients = $_ENV['DATA_VIZ_SAMPLE'];
} elseif (file_exists($fileName)) {
$clients = file_get_contents($fileName);
$message = trans('texts.sample_data');
} else {
$clients = '[]';

View File

@ -138,10 +138,6 @@ class StartupCheck
$design->save();
}
if (!Utils::isNinjaProd()) {
Cache::forget('invoice_designs_cache_'.Auth::user()->maxInvoiceDesignId());
}
Session::flash('message', trans('texts.bought_designs'));
}
} elseif ($productId == PRODUCT_WHITE_LABEL) {

View File

@ -85,6 +85,7 @@ Route::group(['middleware' => 'auth'], function() {
Route::get('view_archive/{entity_type}/{visible}', 'AccountController@setTrashVisible');
Route::get('hide_message', 'HomeController@hideMessage');
Route::get('force_inline_pdf', 'UserController@forcePDFJS');
Route::get('keep_alive', 'HomeController@keepAlive');
Route::get('api/users', array('as'=>'api.users', 'uses'=>'UserController@getDatatable'));
Route::resource('users', 'UserController');

View File

@ -31,9 +31,12 @@ class Invitation extends EntityModel
{
$this->load('account');
$url = SITE_URL;
if ($this->account->subdomain) {
$url = str_replace('://www.', "://{$this->account->subdomain}.", $url);
$parsedUrl = parse_url($url);
$host = explode('.', $parsedUrl['host']);
$subdomain = $host[0];
$url = str_replace("://{$subdomain}.", "://{$this->account->subdomain}.", $url);
}
return "{$url}/view/{$this->invitation_key}";

View File

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

View File

@ -33070,24 +33070,28 @@ function truncate(str, length) {
}
function GetPdfMake(invoice, javascript, callback) {
var account = invoice.account;
var baseDD = {
pageMargins: [40, 40, 40, 40]
};
eval(javascript);
dd = _.extend(dd, baseDD);
/*
var fonts = {
Roboto: {
normal: 'Roboto-Regular.ttf',
bold: 'Roboto-Medium.ttf',
italics: 'Roboto-Italic.ttf',
bolditalics: 'Roboto-Italic.ttf'
},
};
*/
/*
var fonts = {
Roboto: {
normal: 'Roboto-Regular.ttf',
bold: 'Roboto-Medium.ttf',
italics: 'Roboto-Italic.ttf',
bolditalics: 'Roboto-Italic.ttf'
},
};
*/
doc = pdfMake.createPdf(dd);
doc.save = function(fileName) {
this.download(fileName);
};
return doc;
doc = pdfMake.createPdf(dd);
doc.save = function(fileName) {
this.download(fileName);
};
return doc;
}
function notesAndTerms(invoice)
{
@ -33105,13 +33109,17 @@ function notesAndTerms(invoice)
}
function invoiceLines(invoice) {
var grid =
[[{text: invoiceLabels.item, style: 'tableHeader'},
{text: invoiceLabels.description, style: 'tableHeader'},
{text: invoiceLabels.unit_cost, style: 'tableHeader'},
{text: invoiceLabels.quantity, style: 'tableHeader'},
{text: invoice.has_taxes?invoiceLabels.tax:'', style: 'tableHeader'},
{text: invoiceLabels.line_total, style: 'tableHeader'}]];
var grid = [
[
{text: invoiceLabels.item, style: 'tableHeader'},
{text: invoiceLabels.description, style: 'tableHeader'},
{text: invoiceLabels.unit_cost, style: 'tableHeader'},
{text: invoiceLabels.quantity, style: 'tableHeader'},
{text: invoice.has_taxes?invoiceLabels.tax:'', style: 'tableHeader'},
{text: invoiceLabels.line_total, style: 'tableHeader'}
]
];
var total = 0;
var shownItem = false;
var currencyId = invoice && invoice.client ? invoice.client.currency_id : 1;
@ -33131,37 +33139,37 @@ function invoiceLines(invoice) {
tax = parseFloat(item.tax_rate);
}
// show at most one blank line
if (shownItem && (!cost || cost == '0.00') && !notes && !productKey) {
continue;
}
shownItem = true;
// show at most one blank line
if (shownItem && (!cost || cost == '0.00') && !notes && !productKey) {
continue;
}
shownItem = true;
// process date variables
if (invoice.is_recurring) {
notes = processVariables(notes);
productKey = processVariables(productKey);
}
// process date variables
if (invoice.is_recurring) {
notes = processVariables(notes);
productKey = processVariables(productKey);
}
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
if (tax) {
lineTotal += lineTotal * tax / 100;
}
if (lineTotal) {
total += lineTotal;
}
lineTotal = formatMoney(lineTotal, currencyId);
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
if (tax) {
lineTotal += lineTotal * tax / 100;
}
if (lineTotal) {
total += lineTotal;
}
lineTotal = formatMoney(lineTotal, currencyId);
rowStyle = i%2===0?'odd':'even';
rowStyle = i%2===0?'odd':'even';
row[0] = {style:["productKey", rowStyle], text:productKey};
row[1] = {style:["notes", rowStyle], text:notes};
row[2] = {style:["cost", rowStyle], text:cost};
row[3] = {style:["quantity", rowStyle], text:qty};
row[4] = {style:["tax", rowStyle], text:""+tax};
row[5] = {style:["lineTotal", rowStyle], text:lineTotal};
row[0] = {style:["productKey", rowStyle], text:productKey};
row[1] = {style:["notes", rowStyle], text:notes};
row[2] = {style:["cost", rowStyle], text:cost};
row[3] = {style:["quantity", rowStyle], text:qty};
row[4] = {style:["tax", rowStyle], text:""+tax};
row[5] = {style:["lineTotal", rowStyle], text:lineTotal};
grid.push(row);
grid.push(row);
}
return grid;
}
@ -33173,8 +33181,9 @@ function subtotals(invoice)
}
var data = [
[invoiceLabels.subtotal, formatMoney(invoice.subtotal_amount, invoice.client.currency_id)],
[invoiceLabels.subtotal, formatMoney(invoice.subtotal_amount, invoice.client.currency_id)],
];
if(invoice.discount_amount != 0) {
data.push([invoiceLabels.discount, formatMoney(invoice.discount_amount, invoice.client.currency_id)]);
}
@ -33254,6 +33263,7 @@ function clientDetails(invoice) {
if (!client) {
return;
}
var fields = [
getClientDisplayName(client),
client.id_number,

View File

@ -1,23 +1,27 @@
function GetPdfMake(invoice, javascript, callback) {
var account = invoice.account;
var baseDD = {
pageMargins: [40, 40, 40, 40]
};
eval(javascript);
dd = _.extend(dd, baseDD);
/*
var fonts = {
Roboto: {
normal: 'Roboto-Regular.ttf',
bold: 'Roboto-Medium.ttf',
italics: 'Roboto-Italic.ttf',
bolditalics: 'Roboto-Italic.ttf'
},
};
*/
/*
var fonts = {
Roboto: {
normal: 'Roboto-Regular.ttf',
bold: 'Roboto-Medium.ttf',
italics: 'Roboto-Italic.ttf',
bolditalics: 'Roboto-Italic.ttf'
},
};
*/
doc = pdfMake.createPdf(dd);
doc.save = function(fileName) {
this.download(fileName);
};
return doc;
doc = pdfMake.createPdf(dd);
doc.save = function(fileName) {
this.download(fileName);
};
return doc;
}
function notesAndTerms(invoice)
{
@ -35,13 +39,17 @@ function notesAndTerms(invoice)
}
function invoiceLines(invoice) {
var grid =
[[{text: invoiceLabels.item, style: 'tableHeader'},
{text: invoiceLabels.description, style: 'tableHeader'},
{text: invoiceLabels.unit_cost, style: 'tableHeader'},
{text: invoiceLabels.quantity, style: 'tableHeader'},
{text: invoice.has_taxes?invoiceLabels.tax:'', style: 'tableHeader'},
{text: invoiceLabels.line_total, style: 'tableHeader'}]];
var grid = [
[
{text: invoiceLabels.item, style: 'tableHeader'},
{text: invoiceLabels.description, style: 'tableHeader'},
{text: invoiceLabels.unit_cost, style: 'tableHeader'},
{text: invoiceLabels.quantity, style: 'tableHeader'},
{text: invoice.has_taxes?invoiceLabels.tax:'', style: 'tableHeader'},
{text: invoiceLabels.line_total, style: 'tableHeader'}
]
];
var total = 0;
var shownItem = false;
var currencyId = invoice && invoice.client ? invoice.client.currency_id : 1;
@ -61,37 +69,37 @@ function invoiceLines(invoice) {
tax = parseFloat(item.tax_rate);
}
// show at most one blank line
if (shownItem && (!cost || cost == '0.00') && !notes && !productKey) {
continue;
}
shownItem = true;
// show at most one blank line
if (shownItem && (!cost || cost == '0.00') && !notes && !productKey) {
continue;
}
shownItem = true;
// process date variables
if (invoice.is_recurring) {
notes = processVariables(notes);
productKey = processVariables(productKey);
}
// process date variables
if (invoice.is_recurring) {
notes = processVariables(notes);
productKey = processVariables(productKey);
}
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
if (tax) {
lineTotal += lineTotal * tax / 100;
}
if (lineTotal) {
total += lineTotal;
}
lineTotal = formatMoney(lineTotal, currencyId);
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
if (tax) {
lineTotal += lineTotal * tax / 100;
}
if (lineTotal) {
total += lineTotal;
}
lineTotal = formatMoney(lineTotal, currencyId);
rowStyle = i%2===0?'odd':'even';
rowStyle = i%2===0?'odd':'even';
row[0] = {style:["productKey", rowStyle], text:productKey};
row[1] = {style:["notes", rowStyle], text:notes};
row[2] = {style:["cost", rowStyle], text:cost};
row[3] = {style:["quantity", rowStyle], text:qty};
row[4] = {style:["tax", rowStyle], text:""+tax};
row[5] = {style:["lineTotal", rowStyle], text:lineTotal};
row[0] = {style:["productKey", rowStyle], text:productKey};
row[1] = {style:["notes", rowStyle], text:notes};
row[2] = {style:["cost", rowStyle], text:cost};
row[3] = {style:["quantity", rowStyle], text:qty};
row[4] = {style:["tax", rowStyle], text:""+tax};
row[5] = {style:["lineTotal", rowStyle], text:lineTotal};
grid.push(row);
grid.push(row);
}
return grid;
}
@ -103,8 +111,9 @@ function subtotals(invoice)
}
var data = [
[invoiceLabels.subtotal, formatMoney(invoice.subtotal_amount, invoice.client.currency_id)],
[invoiceLabels.subtotal, formatMoney(invoice.subtotal_amount, invoice.client.currency_id)],
];
if(invoice.discount_amount != 0) {
data.push([invoiceLabels.discount, formatMoney(invoice.discount_amount, invoice.client.currency_id)]);
}
@ -184,6 +193,7 @@ function clientDetails(invoice) {
if (!client) {
return;
}
var fields = [
getClientDisplayName(client),
client.id_number,

12
public/js/pdfmake.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -25,7 +25,6 @@ var dd = {
fontSize: 11
},
{
style: 'tableExample',
table: {
headerRows: 1,
widths: ['auto', 'auto', '*'],
@ -45,14 +44,11 @@ var dd = {
return (i === 0 || i === node.table.body.length) ? .5 : 0;
},
vLineWidth: function (i, node) {
return 0;//(i === 0 || i === node.table.widths.length) ? 2 : 1;
return 0;
},
hLineColor: function (i, node) {
return '#D8D8D8';//(i === 0 || i === node.table.body.length) ? 'black' : 'gray';
return '#D8D8D8';
},
/*vLineColor: function (i, node) {
return (i === 0 || i === node.table.widths.length) ? 'black' : 'gray';
},*/
paddingLeft: function(i, node) { return 8; },
paddingRight: function(i, node) { return 8; },
paddingTop: function(i, node) { return 4; },
@ -187,6 +183,5 @@ var dd = {
fontSize: 10,
margin: [0, 10, 0, 4]
}
},
pageMargins: [40, 40, 40, 40]
}
};

View File

@ -88,7 +88,7 @@
{!! Former::actions(
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
$countGateways > 0 ? Button::normal(trans('texts.cancel'))->large()->asLinkTo('/company/payments')->appendIcon(Icon::create('remove-circle')) : false) !!}
$countGateways > 0 ? Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/company/payments'))->appendIcon(Icon::create('remove-circle')) : false) !!}
{!! Former::close() !!}

View File

@ -91,7 +91,7 @@
@if (Auth::user()->confirmed)
{!! Former::actions( Button::primary(trans('texts.change_password'))->small()->withAttributes(['onclick'=>'showChangePassword()'])) !!}
@elseif (Auth::user()->registered)
{!! Former::actions( Button::primary(trans('texts.resend_confirmation'))->asLinkTo('/resend_confirmation')->small() ) !!}
{!! Former::actions( Button::primary(trans('texts.resend_confirmation'))->asLinkTo(URL::to('/resend_confirmation'))->small() ) !!}
@endif
</div>
</div>

View File

@ -47,7 +47,7 @@
{!! Former::actions(
Button::success(trans('texts.import'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
Button::normal(trans('texts.cancel'))->large()->asLinkTo('/company/import_export')->appendIcon(Icon::create('remove-circle'))) !!}
Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/company/import_export'))->appendIcon(Icon::create('remove-circle'))) !!}
{!! Former::close() !!}
<script type="text/javascript">

View File

@ -7,7 +7,7 @@
<script src="{!! asset('js/compatibility.js') !!}" type="text/javascript"></script>
@if (Auth::user()->account->utf8_invoices)
<script src="{{ asset('vendor/pdfmake/build/pdfmake.min.js') }}" type="text/javascript"></script>
<script src="{{ asset('js/pdfmake.min.js') }}" type="text/javascript"></script>
<script src="{{ asset('js/vfs_fonts.js') }}" type="text/javascript"></script>
@endif

View File

@ -13,7 +13,7 @@
@if ($showAdd)
{!! Button::primary(trans('texts.add_gateway'))
->asLinkTo('/gateways/create')
->asLinkTo(URL::to('/gateways/create'))
->withAttributes(['class' => 'pull-right'])
->appendIcon(Icon::create('plus-sign')) !!}
@endif

View File

@ -28,7 +28,7 @@
{!! Former::actions(
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
Button::normal(trans('texts.cancel'))->large()->asLinkTo('/company/products')->appendIcon(Icon::create('remove-circle'))
Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/company/products'))->appendIcon(Icon::create('remove-circle'))
) !!}
{!! Former::close() !!}

View File

@ -23,7 +23,7 @@
</div>
{!! Button::primary(trans('texts.create_product'))
->asLinkTo('/products/create')
->asLinkTo(URL::to('/products/create'))
->withAttributes(['class' => 'pull-right'])
->appendIcon(Icon::create('plus-sign')) !!}

View File

@ -25,7 +25,7 @@
{!! Former::actions(
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
Button::normal(trans('texts.cancel'))->asLinkTo('/company/advanced_settings/token_management')->appendIcon(Icon::create('remove-circle'))->large()
Button::normal(trans('texts.cancel'))->asLinkTo(URL::to('/company/advanced_settings/token_management'))->appendIcon(Icon::create('remove-circle'))->large()
) !!}
{!! Former::close() !!}

View File

@ -18,7 +18,7 @@
{!! Button::normal(trans('texts.zapier'))->asLinkTo(ZAPIER_URL)->withAttributes(['target' => '_blank']) !!}
@endif
@if (Utils::isPro())
{!! Button::primary(trans('texts.add_token'))->asLinkTo('/tokens/create')->appendIcon(Icon::create('plus-sign')) !!}
{!! Button::primary(trans('texts.add_token'))->asLinkTo(URL::to('/tokens/create'))->appendIcon(Icon::create('plus-sign')) !!}
@endif
</div>

View File

@ -13,9 +13,9 @@
<div class="pull-right">
{!! Button::normal(trans('texts.api_tokens'))->asLinkTo('/company/advanced_settings/token_management')->appendIcon(Icon::create('cloud')) !!}
{!! Button::normal(trans('texts.api_tokens'))->asLinkTo(URL::to('/company/advanced_settings/token_management'))->appendIcon(Icon::create('cloud')) !!}
@if (Utils::isPro())
{!! Button::primary(trans('texts.add_user'))->asLinkTo('/users/create')->appendIcon(Icon::create('plus-sign')) !!}
{!! Button::primary(trans('texts.add_user'))->asLinkTo(URL::to('/users/create'))->appendIcon(Icon::create('plus-sign')) !!}
@endif
</div>

View File

@ -185,7 +185,7 @@
<center class="buttons">
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo('/clients/' . ($client ? $client->public_id : ''))->appendIcon(Icon::create('remove-circle')) !!}
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/clients/' . ($client ? $client->public_id : '')))->appendIcon(Icon::create('remove-circle')) !!}
</center>
{!! Former::close() !!}

View File

@ -28,7 +28,7 @@
<center class="buttons">
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo('/credits')->appendIcon(Icon::create('remove-circle')) !!}
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/credits'))->appendIcon(Icon::create('remove-circle')) !!}
</center>
{!! Former::close() !!}

View File

@ -211,7 +211,18 @@
}
$(function() {
// keep the token cookie valid to prevent token mismatch errors
function keepAlive() {
window.setTimeout(function() {
$.get('{{ URL::to('/keep_alive') }}', function(data) {
keepAlive();
})
}, 1000 * 60 * 60);
}
$(function() {
keepAlive();
window.setTimeout(function() {
$(".alert-hide").fadeOut(500);
}, 2000);

View File

@ -7,7 +7,7 @@
<script src="{{ asset('js/compatibility.js') }}" type="text/javascript"></script>
@if (Auth::user()->account->utf8_invoices)
<script src="{{ asset('vendor/pdfmake/build/pdfmake.min.js') }}" type="text/javascript"></script>
<script src="{{ asset('js/pdfmake.min.js') }}" type="text/javascript"></script>
<script src="{{ asset('js/vfs_fonts.js') }}" type="text/javascript"></script>
@endif

View File

@ -7,7 +7,7 @@
<script src="{{ asset('js/compatibility.js') }}" type="text/javascript"></script>
@if (Auth::user()->account->utf8_invoices)
<script src="{{ asset('vendor/pdfmake/build/pdfmake.min.js') }}" type="text/javascript"></script>
<script src="{{ asset('js/pdfmake.min.js') }}" type="text/javascript"></script>
<script src="{{ asset('js/vfs_fonts.js') }}" type="text/javascript"></script>
@endif
@ -53,7 +53,7 @@
{!! Former::open()->addClass('form-inline')->onchange('refreshPDF()') !!}
{!! Former::select('version')->options($versionsSelect)->label(trans('select_version'))->style('background-color: white !important') !!}
{!! Button::primary(trans('texts.edit_' . $invoice->getEntityType()))->asLinkTo('/' . $invoice->getEntityType() . 's/' . $invoice->public_id . '/edit')->withAttributes(array('class' => 'pull-right')) !!}
{!! Button::primary(trans('texts.edit_' . $invoice->getEntityType()))->asLinkTo(URL::to('/' . $invoice->getEntityType() . 's/' . $invoice->public_id . '/edit'))->withAttributes(array('class' => 'pull-right')) !!}
{!! Former::close() !!}
<br/>&nbsp;<br/>

View File

@ -9,7 +9,7 @@
<script src="{{ asset('js/compatibility.js') }}" type="text/javascript"></script>
@if ($invoice->client->account->utf8_invoices)
<script src="{{ asset('vendor/pdfmake/build/pdfmake.min.js') }}" type="text/javascript"></script>
<script src="{{ asset('js/pdfmake.min.js') }}" type="text/javascript"></script>
<script src="{{ asset('js/vfs_fonts.js') }}" type="text/javascript"></script>
@endif
@ -29,14 +29,14 @@
@if ($invoice->is_quote)
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}&nbsp;&nbsp;
@if (!$isConverted)
{!! Button::success(trans('texts.approve'))->asLinkTo('/approve/' . $invitation->invitation_key)->large() !!}
{!! Button::success(trans('texts.approve'))->asLinkTo(URL::to('/approve/' . $invitation->invitation_key))->large() !!}
@endif
@elseif ($invoice->client->account->isGatewayConfigured() && !$invoice->isPaid() && !$invoice->is_recurring)
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}&nbsp;&nbsp;
@if (count($paymentTypes) > 1)
{!! DropdownButton::success(trans('texts.pay_now'))->withContents($paymentTypes)->large() !!}
@else
{!! Button::success(trans('texts.pay_now'))->asLinkTo('/payment/' . $invitation->invitation_key)->large() !!}
{!! Button::success(trans('texts.pay_now'))->asLinkTo(URL::to('/payment/' . $invitation->invitation_key))->large() !!}
@endif
@else
{!! Button::normal('Download PDF')->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}

View File

@ -21,7 +21,7 @@
<div id="top_right_buttons" class="pull-right">
<input id="tableFilter" type="text" style="width:140px;margin-right:17px;background-color: white !important" class="form-control pull-left" placeholder="{{ trans('texts.filter') }}"/>
{!! Button::primary(trans("texts.new_$entityType"))->asLinkTo("/{$entityType}s/create")->withAttributes(array('class' => 'pull-right'))->appendIcon(Icon::create('plus-sign')) !!}
{!! Button::primary(trans("texts.new_$entityType"))->asLinkTo(URL::to("/{$entityType}s/create"))->withAttributes(array('class' => 'pull-right'))->appendIcon(Icon::create('plus-sign')) !!}
</div>

View File

@ -39,7 +39,7 @@
<center class="buttons">
{!! Button::success(trans('texts.save'))->appendIcon(Icon::create('floppy-disk'))->submit()->large() !!}
{!! Button::withValue(trans('texts.cancel'))->appendIcon(Icon::create('remove-circle'))->asLinkTo('/payments')->large() !!}
{!! Button::withValue(trans('texts.cancel'))->appendIcon(Icon::create('remove-circle'))->asLinkTo(URL::to('/payments'))->large() !!}
</center>
{!! Former::close() !!}

View File

@ -12,7 +12,7 @@
{!! Button::primary(trans('texts.data_visualizations'))
->asLinkTo('/company/advanced_settings/data_visualizations')
->asLinkTo(URL::to('/company/advanced_settings/data_visualizations'))
->withAttributes(['class' => 'pull-right'])
->appendIcon(Icon::create('globe')) !!}

View File

@ -29,7 +29,7 @@
{!! Former::actions(
Button::success(trans($user && $user->confirmed ? 'texts.save' : 'texts.send_invite'))->submit()->large()->appendIcon(Icon::create($user && $user->confirmed ? 'floppy-disk' : 'send')),
Button::normal(trans('texts.cancel'))->asLinkTo('/company/advanced_settings/user_management')->appendIcon(Icon::create('remove-circle'))->large()
Button::normal(trans('texts.cancel'))->asLinkTo(URL::to('/company/advanced_settings/user_management'))->appendIcon(Icon::create('remove-circle'))->large()
)!!}
{!! Former::close() !!}