mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Update Syntax for L5
Also changes script.blade.php to pull the currency info from the cache in a L5 format.
This commit is contained in:
parent
c6d8b6f8e1
commit
567f26a28b
@ -10,7 +10,7 @@
|
||||
<div class="in-bold">
|
||||
@if (count($paidToDate))
|
||||
@foreach ($paidToDate as $item)
|
||||
{{ Utils::formatMoney($item->value, $item->currency_id); }}<br/>
|
||||
{{ Utils::formatMoney($item->value, $item->currency_id) }}<br/>
|
||||
@endforeach
|
||||
@else
|
||||
{{ Utils::formatMoney(0) }}
|
||||
@ -147,7 +147,7 @@
|
||||
<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/>
|
||||
{{ Utils::formatMoney($item->invoice_avg, $item->currency_id) }}<br/>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
@ -44,22 +44,22 @@
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbar-collapse-1">
|
||||
<ul class="nav navbar-nav" style="font-weight: bold">
|
||||
{{ HTML::nav_link('dashboard', 'dashboard') }}
|
||||
{{ HTML::menu_link('client') }}
|
||||
{!! HTML::nav_link('dashboard', 'dashboard') !!}
|
||||
{!! HTML::menu_link('client') !!}
|
||||
@if (Utils::isPro())
|
||||
{{ HTML::menu_link('quote') }}
|
||||
{!! HTML::menu_link('quote') !!}
|
||||
@endif
|
||||
{{ HTML::menu_link('invoice') }}
|
||||
{{ HTML::menu_link('payment') }}
|
||||
{{ HTML::menu_link('credit') }}
|
||||
{!! HTML::menu_link('invoice') !!}
|
||||
{!! HTML::menu_link('payment') !!}
|
||||
{!! HTML::menu_link('credit') !!}
|
||||
</ul>
|
||||
|
||||
<div class="navbar-form navbar-right">
|
||||
@if (Auth::check())
|
||||
@if (!Auth::user()->registered)
|
||||
{{ Button::sm_success_primary(trans('texts.sign_up'), array('id' => 'signUpButton', 'data-toggle'=>'modal', 'data-target'=>'#signUpModal')) }}
|
||||
{!! Button::sm_success_primary(trans('texts.sign_up'), array('id' => 'signUpButton', 'data-toggle'=>'modal', 'data-target'=>'#signUpModal')) !!}
|
||||
@elseif (!Auth::user()->isPro())
|
||||
{{ Button::sm_success_primary(trans('texts.go_pro'), array('id' => 'proPlanButton', 'data-toggle'=>'modal', 'data-target'=>'#proPlanModal')) }}
|
||||
{!! Button::sm_success_primary(trans('texts.go_pro'), array('id' => 'proPlanButton', 'data-toggle'=>'modal', 'data-target'=>'#proPlanModal')) !!}
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@ -151,7 +151,7 @@
|
||||
<div class="container">
|
||||
|
||||
@if (!isset($showBreadcrumbs) || $showBreadcrumbs)
|
||||
{{ HTML::breadcrumbs() }}
|
||||
{!! HTML::breadcrumbs() !!}
|
||||
@endif
|
||||
|
||||
@if (Session::has('warning'))
|
||||
@ -180,10 +180,10 @@
|
||||
<div class="footer" style="padding-top: 32px">
|
||||
@if (false)
|
||||
<div class="pull-right">
|
||||
{{ Former::open('user/setTheme')->addClass('themeForm') }}
|
||||
{!! Former::open('user/setTheme')->addClass('themeForm') !!}
|
||||
<div style="display:none">
|
||||
{{ Former::text('theme_id') }}
|
||||
{{ Former::text('path')->value(Request::url()) }}
|
||||
{!! Former::text('theme_id') !!}
|
||||
{!! Former::text('path')->value(Request::url()) !!}
|
||||
</div>
|
||||
<div class="btn-group tr-action dropup">
|
||||
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
@ -196,7 +196,7 @@
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
{{ Former::close() }}
|
||||
{!! Former::close() !!}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@ -221,25 +221,25 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice
|
||||
<div style="background-color: #fff; padding-right:20px" id="signUpDiv" onkeyup="validateSignUp()" onclick="validateSignUp()" onkeydown="checkForEnter(event)">
|
||||
<br/>
|
||||
|
||||
{{ Former::open('signup/submit')->addClass('signUpForm') }}
|
||||
{!! Former::open('signup/submit')->addClass('signUpForm') !!}
|
||||
|
||||
@if (Auth::check())
|
||||
{{ Former::populateField('new_first_name', Auth::user()->first_name); }}
|
||||
{{ Former::populateField('new_last_name', Auth::user()->last_name); }}
|
||||
{{ Former::populateField('new_email', Auth::user()->email); }}
|
||||
{!! Former::populateField('new_first_name', Auth::user()->first_name) !!}
|
||||
{!! Former::populateField('new_last_name', Auth::user()->last_name) !!}
|
||||
{!! Former::populateField('new_email', Auth::user()->email) !!}
|
||||
@endif
|
||||
|
||||
<div style="display:none">
|
||||
{{ Former::text('path')->value(Request::path()) }}
|
||||
{{ Former::text('go_pro') }}
|
||||
{!! Former::text('path')->value(Request::path()) !!}
|
||||
{!! Former::text('go_pro') !!}
|
||||
</div>
|
||||
|
||||
{{ Former::text('new_first_name')->label(trans('texts.first_name')) }}
|
||||
{{ Former::text('new_last_name')->label(trans('texts.last_name')) }}
|
||||
{{ Former::text('new_email')->label(trans('texts.email')) }}
|
||||
{{ Former::password('new_password')->label(trans('texts.password')) }}
|
||||
{{ Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => '<a href="'.URL::to('terms').'" target="_blank">'.trans('texts.terms_of_service').'</a>'])) }}
|
||||
{{ Former::close() }}
|
||||
{!! Former::text('new_first_name')->label(trans('texts.first_name')) !!}
|
||||
{!! Former::text('new_last_name')->label(trans('texts.last_name')) !!}
|
||||
{!! Former::text('new_email')->label(trans('texts.email')) !!}
|
||||
{!! Former::password('new_password')->label(trans('texts.password')) !!}
|
||||
{!! Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => '<a href="'.URL::to('terms').'" target="_blank">'.trans('texts.terms_of_service').'</a>'])) !!}
|
||||
{!! Former::close() !!}
|
||||
|
||||
<center><div id="errorTaken" style="display:none"> <br/>{{ trans('texts.email_taken') }}</div></center>
|
||||
<br/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
var currencies = {{ Currency::remember(120)->get(); }};
|
||||
var currencies = {{ \Cache::pull('currency') }};
|
||||
var currencyMap = {};
|
||||
for (var i=0; i<currencies.length; i++) {
|
||||
var currency = currencies[i];
|
||||
@ -18,7 +18,7 @@
|
||||
}
|
||||
function formatMoney(value, currency_id, hide_symbol) {
|
||||
value = NINJA.parseFloat(value);
|
||||
if (!currency_id) currency_id = {{ Session::get(SESSION_CURRENCY, DEFAULT_CURRENCY); }};
|
||||
if (!currency_id) currency_id = {{ Session::get(SESSION_CURRENCY, DEFAULT_CURRENCY) }};
|
||||
var currency = currencyMap[currency_id];
|
||||
return accounting.formatMoney(value, hide_symbol ? '' : currency.symbol, currency.precision, currency.thousand_separator, currency.decimal_separator);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user