L5 Syntax Changes and Namespacing

This commit is contained in:
Jeramy Simpson 2015-03-26 16:24:02 +10:00
parent 7c78753a2d
commit 1080d9e2f6
16 changed files with 224 additions and 137 deletions

View File

@ -1,10 +1,27 @@
<?php namespace App\Http\Controllers;
use Auth;
use Confide;
use Input;
use Redirect;
use Session;
use Utils;
use View;
use App\Models\Account;
use App\Models\Country;
use App\Models\Currency;
use App\Models\DateFormat;
use App\Models\DatetimeFormat;
use App\Models\Language;
use App\Models\Size;
use App\Models\Timezone;
use App\Models\Industry;
use App\Ninja\Repositories\AccountRepository;
use App\Ninja\Mailers\UserMailer;
use App\Ninja\Mailers\ContactMailer;
class AccountController extends \BaseController
class AccountController extends BaseController
{
protected $accountRepo;
protected $userMailer;
@ -103,6 +120,7 @@ class AccountController extends \BaseController
public function showSection($section = ACCOUNT_DETAILS, $subSection = false)
{
if ($section == ACCOUNT_DETAILS) {
/* Update Remember Function
$data = [
'account' => Account::with('users')->findOrFail(Auth::user()->account_id),
'countries' => Country::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(),
@ -115,6 +133,19 @@ class AccountController extends \BaseController
'languages' => Language::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(),
'showUser' => Auth::user()->id === Auth::user()->account->users()->first()->id,
];
*/
$data = [
'account' => Account::with('users')->findOrFail(Auth::user()->account_id),
'countries' => Country::orderBy('name')->get(),
'sizes' => Size::orderBy('id')->get(),
'industries' => Industry::orderBy('name')->get(),
'timezones' => Timezone::orderBy('location')->get(),
'dateFormats' => DateFormat::get(),
'datetimeFormats' => DatetimeFormat::get(),
'currencies' => Currency::orderBy('name')->get(),
'languages' => Language::orderBy('name')->get(),
'showUser' => Auth::user()->id === Auth::user()->account->users()->first()->id,
];
return View::make('accounts.details', $data);
} elseif ($section == ACCOUNT_PAYMENTS) {

View File

@ -1,24 +1,24 @@
<?php namespace App\Http\Controllers;
/*
|--------------------------------------------------------------------------
| Confide Controller Template
|--------------------------------------------------------------------------
|
| This is the default Confide controller template for controlling user
| authentication. Feel free to change to your needs.
|
*/
use Auth;
use Datatable;
use DB;
use Input;
use Redirect;
use Session;
use View;
use App\Models\Gateway;
use App\Ninja\Repositories\AccountRepository;
class AccountGatewayController extends BaseController
{
public function getDatatable()
{
$query = \DB::table('account_gateways')
$query = DB::table('account_gateways')
->join('gateways', 'gateways.id', '=', 'account_gateways.gateway_id')
->where('account_gateways.deleted_at', '=', null)
->where('account_gateways.account_id', '=', \Auth::user()->account_id)
->where('account_gateways.account_id', '=', Auth::user()->account_id)
->select('account_gateways.public_id', 'gateways.name', 'account_gateways.deleted_at');
return Datatable::query($query)
@ -95,8 +95,9 @@ class AccountGatewayController extends BaseController
$selectedCards = $accountGateway ? $accountGateway->accepted_credit_cards : 0;
$account = Auth::user()->account;
$recommendedGateways = Gateway::remember(DEFAULT_QUERY_CACHE)
->where('recommended', '=', '1')
// $recommendedGateways = Gateway::remember(DEFAULT_QUERY_CACHE)
// ->where('recommended', '=', '1')
$recommendedGateways = Gateway::where('recommended', '=', '1')
->orderBy('sort_order')
->get();
$recommendedGatewayArray = array();

View File

@ -1,8 +1,18 @@
<?php
<?php namespace App\Http\Controllers;
use Auth;
use Utils;
use View;
use App\Models\Client;
use App\Models\Size;
use App\Models\PaymentTerm;
use App\Models\Industry;
use App\Models\Currency;
use App\Models\Country;
use App\Ninja\Repositories\ClientRepository;
class ClientController extends \BaseController
class ClientController extends BaseController
{
protected $clientRepo;
@ -158,6 +168,7 @@ class ClientController extends \BaseController
private static function getViewModel()
{
/* Remember function no longer works
return [
'sizes' => Size::remember(DEFAULT_QUERY_CACHE)->orderBy('id')->get(),
'paymentTerms' => PaymentTerm::remember(DEFAULT_QUERY_CACHE)->orderBy('num_days')->get(['name', 'num_days']),
@ -167,6 +178,16 @@ class ClientController extends \BaseController
'customLabel1' => Auth::user()->account->custom_client_label1,
'customLabel2' => Auth::user()->account->custom_client_label2,
];
*/
return [
'sizes' => Size::orderBy('id')->get(),
'paymentTerms' => PaymentTerm::orderBy('num_days')->get(['name', 'num_days']),
'industries' => Industry::orderBy('name')->get(),
'currencies' => Currency::orderBy('name')->get(),
'countries' => Country::orderBy('name')->get(),
'customLabel1' => Auth::user()->account->custom_client_label1,
'customLabel2' => Auth::user()->account->custom_client_label2,
];
}
/**

View File

@ -1,8 +1,15 @@
<?php namespace App\Http\Controllers;
use Datatable;
use Input;
use Redirect;
use Session;
use Utils;
use View;
use App\Ninja\Repositories\CreditRepository;
class CreditController extends \BaseController
class CreditController extends BaseController
{
protected $creditRepo;

View File

@ -1,11 +1,18 @@
<?php namespace App\Http\Controllers;
use Auth;
use DB;
use View;
use App\Models\Activity;
use App\Models\Invoice;
class DashboardController extends \BaseController
class DashboardController extends BaseController
{
public function index()
{
// For Debuging : Need to remove when it is not longer needed.
// Auth::login(\App\Models\User::first());
// dd(Auth::user());
// total_income, billed_clients, invoice_sent and active_clients
$select = DB::raw('COUNT(DISTINCT CASE WHEN invoices.id IS NOT NULL THEN clients.id ELSE null END) billed_clients,
SUM(CASE WHEN invoices.invoice_status_id >= '.INVOICE_STATUS_SENT.' THEN 1 ELSE 0 END) invoices_sent,

View File

@ -1,8 +1,11 @@
<?php namespace App\Http\Controllers;
use Auth;
use Session;
use Utils;
use View;
use App\Models\Invoice;
use App\Ninja\Mailers\ContactMailer as Mailer;
use App\Ninja\Repositories\InvoiceRepository;
use App\Ninja\Repositories\ClientRepository;
@ -399,11 +402,13 @@ class InvoiceController extends BaseController
$url = URL::to('clients/'.$client->public_id);
Utils::trackViewed($client->getDisplayName(), ENTITY_CLIENT, $url);
}
/*
This causes an error message. Commenting out. will return later.
if (!empty(Input::get('pdfupload')) && strpos(Input::get('pdfupload'), 'data:application/pdf;base64,') === 0) {
$this->storePDF(Input::get('pdfupload'), $invoice->id);
}
*/
if ($action == 'clone') {
return $this->cloneInvoice($publicId);
} elseif ($action == 'convert') {

View File

@ -1,11 +1,18 @@
<?php namespace App\Http\Controllers;
use Ninja\Repositories\PaymentRepository;
use Ninja\Repositories\InvoiceRepository;
use Ninja\Repositories\AccountRepository;
use Ninja\Mailers\ContactMailer;
use Datatable;
use Input;
use Redirect;
use Session;
use Utils;
use View;
class PaymentController extends \BaseController
use App\Ninja\Repositories\PaymentRepository;
use App\Ninja\Repositories\InvoiceRepository;
use App\Ninja\Repositories\AccountRepository;
use App\Ninja\Mailers\ContactMailer;
class PaymentController extends BaseController
{
protected $creditRepo;

View File

@ -1,12 +1,16 @@
<?php namespace App\Http\Controllers;
use Auth;
use Input;
use Redirect;
use Utils;
use View;
use App\Ninja\Mailers\ContactMailer as Mailer;
use App\Ninja\Repositories\InvoiceRepository;
use App\Ninja\Repositories\ClientRepository;
use App\Ninja\Repositories\TaxRateRepository;
class QuoteController extends \BaseController
class QuoteController extends BaseController
{
protected $mailer;
protected $invoiceRepo;

View File

@ -263,6 +263,7 @@ Client::deleting(function ($client) {
Activity::archiveClient($client);
});
Client::restoring(function ($client) {
/*Client::restoring(function ($client) {
Activity::restoreClient($client);
});
*/

View File

@ -1,5 +1,7 @@
<?php namespace App\Models;
use Eloquent;
class Country extends Eloquent
{
public $timestamps = false;

View File

@ -1,6 +1,7 @@
<?php namespace App\Models;
use Eloquent;
use Omnipay;
class Gateway extends Eloquent
{
@ -9,7 +10,7 @@ class Gateway extends Eloquent
public function paymentlibrary()
{
return $this->belongsTo('PaymentLibrary', 'payment_library_id');
return $this->belongsTo('\App\Models\PaymentLibrary', 'payment_library_id');
}
public function getLogoUrl()

View File

@ -2,44 +2,44 @@
<div class="row">
<div class="col-md-6">
{{ Former::legend('Organization') }}
{{ Former::text('name') }}
{{ Former::text('id_number') }}
{{ Former::text('vat_number') }}
{{ Former::text('work_phone')->label('Phone') }}
{{ Former::textarea('notes') }}
{!! Former::legend('Organization') !!}
{!! Former::text('name') !!}
{!! Former::text('id_number') !!}
{!! Former::text('vat_number') !!}
{!! Former::text('work_phone')->label('Phone') !!}
{!! Former::textarea('notes') !!}
{{ Former::legend('Address') }}
{{ Former::text('address1')->label('Street') }}
{{ Former::text('address2')->label('Apt/Floor') }}
{{ Former::text('city') }}
{{ Former::text('state') }}
{{ Former::text('postal_code') }}
{{ Former::select('country_id')->addOption('','')->label('Country')
->fromQuery($countries, 'name', 'id') }}
{!! Former::legend('Address') !!}
{!! Former::text('address1')->label('Street') !!}
{!! Former::text('address2')->label('Apt/Floor') !!}
{!! Former::text('city') !!}
{!! Former::text('state') !!}
{!! Former::text('postal_code') !!}
{!! Former::select('country_id')->addOption('','')->label('Country')
->fromQuery($countries, 'name', 'id') !!}
</div>
<div class="col-md-6">
{{ Former::legend('Contacts') }}
{!! Former::legend('Contacts') !!}
<div data-bind='template: { foreach: contacts,
beforeRemove: hideContact,
afterAdd: showContact }'>
{{ Former::hidden('public_id')->data_bind("value: public_id, valueUpdate: 'afterkeydown'") }}
{{ Former::text('first_name')->data_bind("value: first_name, valueUpdate: 'afterkeydown'") }}
{{ Former::text('last_name')->data_bind("value: last_name, valueUpdate: 'afterkeydown'") }}
{{ Former::text('email')->data_bind("value: email, valueUpdate: 'afterkeydown'") }}
{{ Former::text('phone')->data_bind("value: phone, valueUpdate: 'afterkeydown'") }}
{!! Former::hidden('public_id')->data_bind("value: public_id, valueUpdate: 'afterkeydown'") !!}
{!! Former::text('first_name')->data_bind("value: first_name, valueUpdate: 'afterkeydown'") !!}
{!! Former::text('last_name')->data_bind("value: last_name, valueUpdate: 'afterkeydown'") !!}
{!! Former::text('email')->data_bind("value: email, valueUpdate: 'afterkeydown'") !!}
{!! Former::text('phone')->data_bind("value: phone, valueUpdate: 'afterkeydown'") !!}
<div class="form-group">
<div class="col-lg-8 col-lg-offset-4">
<span data-bind="visible: $parent.contacts().length > 1">
{{ link_to('#', 'Remove contact', array('data-bind'=>'click: $parent.removeContact')) }}
{!! link_to('#', 'Remove contact', array('data-bind'=>'click: $parent.removeContact')) !!}
</span>
<span data-bind="visible: $index() === ($parent.contacts().length - 1)" class="pull-right">
{{ link_to('#', 'Add contact', array('onclick'=>'return addContact()')) }}
{!! link_to('#', 'Add contact', array('onclick'=>'return addContact()')) !!}
</span>
</div>
</div>
@ -50,7 +50,7 @@
</div>
{{ Former::hidden('data')->data_bind("value: ko.toJSON(model)") }}
{!! Former::hidden('data')->data_bind("value: ko.toJSON(model)") !!}
<script type="text/javascript">

View File

@ -9,86 +9,86 @@
<div class="row">
<!--<h3>{{ $title }} Client</h3>-->
{{ Former::open($url)->addClass('col-md-12 warn-on-exit')->method($method)->rules(array(
{!! Former::open($url)->addClass('col-md-12 warn-on-exit')->method($method)->rules(array(
'email' => 'email|required'
)); }}
)); !!}
@if ($client)
{{ Former::populate($client) }}
{!! Former::populate($client) !!}
@endif
<div class="row">
<div class="col-md-6">
{{ Former::legend('organization') }}
{{ Former::text('name')->data_bind("attr { placeholder: placeholderName }") }}
{{ Former::text('id_number') }}
{{ Former::text('vat_number') }}
{{ Former::text('website') }}
{{ Former::text('work_phone') }}
{!! Former::legend('organization') !!}
{!! Former::text('name')->data_bind("attr { placeholder: placeholderName }") !!}
{!! Former::text('id_number') !!}
{!! Former::text('vat_number') !!}
{!! Former::text('website') !!}
{!! Former::text('work_phone') !!}
@if (Auth::user()->isPro())
@if ($customLabel1)
{{ Former::text('custom_value1')->label($customLabel1) }}
{!! Former::text('custom_value1')->label($customLabel1) !!}
@endif
@if ($customLabel2)
{{ Former::text('custom_value2')->label($customLabel2) }}
{!! Former::text('custom_value2')->label($customLabel2) !!}
@endif
@endif
{{ Former::legend('address') }}
{{ Former::text('address1') }}
{{ Former::text('address2') }}
{{ Former::text('city') }}
{{ Former::text('state') }}
{{ Former::text('postal_code') }}
{{ Former::select('country_id')->addOption('','')
->fromQuery($countries, 'name', 'id') }}
{!! Former::legend('address') !!}
{!! Former::text('address1') !!}
{!! Former::text('address2') !!}
{!! Former::text('city') !!}
{!! Former::text('state') !!}
{!! Former::text('postal_code') !!}
{!! Former::select('country_id')->addOption('','')
->fromQuery($countries, 'name', 'id') !!}
</div>
<div class="col-md-6">
{{ Former::legend('contacts') }}
{!! Former::legend('contacts') !!}
<div data-bind='template: { foreach: contacts,
beforeRemove: hideContact,
afterAdd: showContact }'>
{{ Former::hidden('public_id')->data_bind("value: public_id, valueUpdate: 'afterkeydown'") }}
{{ Former::text('first_name')->data_bind("value: first_name, valueUpdate: 'afterkeydown'") }}
{{ Former::text('last_name')->data_bind("value: last_name, valueUpdate: 'afterkeydown'") }}
{{ Former::text('email')->data_bind('value: email, valueUpdate: \'afterkeydown\', attr: {id:\'email\'+$index()}') }}
{{ Former::text('phone')->data_bind("value: phone, valueUpdate: 'afterkeydown'") }}
{!! Former::hidden('public_id')->data_bind("value: public_id, valueUpdate: 'afterkeydown'") !!}
{!! Former::text('first_name')->data_bind("value: first_name, valueUpdate: 'afterkeydown'") !!}
{!! Former::text('last_name')->data_bind("value: last_name, valueUpdate: 'afterkeydown'") !!}
{!! Former::text('email')->data_bind('value: email, valueUpdate: \'afterkeydown\', attr: {id:\'email\'+$index()}') !!}
{!! Former::text('phone')->data_bind("value: phone, valueUpdate: 'afterkeydown'") !!}
<div class="form-group">
<div class="col-lg-8 col-lg-offset-4 bold">
<span class="redlink bold" data-bind="visible: $parent.contacts().length > 1">
{{ link_to('#', trans('texts.remove_contact').' -', array('data-bind'=>'click: $parent.removeContact')) }}
{!! link_to('#', trans('texts.remove_contact').' -', array('data-bind'=>'click: $parent.removeContact')) !!}
</span>
<span data-bind="visible: $index() === ($parent.contacts().length - 1)" class="pull-right greenlink bold">
{{ link_to('#', trans('texts.add_contact').' +', array('onclick'=>'return addContact()')) }}
{!! link_to('#', trans('texts.add_contact').' +', array('onclick'=>'return addContact()')) !!}
</span>
</div>
</div>
</div>
{{ Former::legend('additional_info') }}
{{ Former::select('payment_terms')->addOption('','')
->fromQuery($paymentTerms, 'name', 'num_days') }}
{{ Former::select('currency_id')->addOption('','')
->fromQuery($currencies, 'name', 'id') }}
{{ Former::select('size_id')->addOption('','')
->fromQuery($sizes, 'name', 'id') }}
{{ Former::select('industry_id')->addOption('','')
->fromQuery($industries, 'name', 'id') }}
{{ Former::textarea('private_notes') }}
{!! Former::legend('additional_info') !!}
{!! Former::select('payment_terms')->addOption('','')
->fromQuery($paymentTerms, 'name', 'num_days') !!}
{!! Former::select('currency_id')->addOption('','')
->fromQuery($currencies, 'name', 'id') !!}
{!! Former::select('size_id')->addOption('','')
->fromQuery($sizes, 'name', 'id') !!}
{!! Former::select('industry_id')->addOption('','')
->fromQuery($industries, 'name', 'id') !!}
{!! Former::textarea('private_notes') !!}
</div>
</div>
{{ Former::hidden('data')->data_bind("value: ko.toJSON(model)") }}
{!! Former::hidden('data')->data_bind("value: ko.toJSON(model)") !!}
<script type="text/javascript">
@ -159,10 +159,10 @@
</script>
<center class="buttons">
{{ Button::lg_primary_submit_success(trans('texts.save'))->append_with_icon('floppy-disk') }}
{{ Button::lg_default_link('clients/' . ($client ? $client->public_id : ''), trans('texts.cancel'))->append_with_icon('remove-circle'); }}
{!! Button::primary(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')) !!}
</center>
{{ Former::close() }}
{!! Former::close() !!}
</div>
@stop

View File

@ -4,10 +4,10 @@
<div class="pull-right">
{{ Former::open('clients/bulk')->addClass('mainForm') }}
{!! Former::open('clients/bulk')->addClass('mainForm') !!}
<div style="display:none">
{{ Former::text('action') }}
{{ Former::text('id')->value($client->public_id) }}
{!! Former::text('action') !!}
{!! Former::text('id')->value($client->public_id) !!}
</div>
@if ($gatewayLink)
@ -26,11 +26,11 @@
[trans('texts.delete_client'), "javascript:onDeleteClick()"],
]
)
, ['id'=>'normalDropDown'])->split(); }}
, ['id'=>'normalDropDown'])->split() }}
{{ DropdownButton::primary(trans('texts.create_invoice'), Navigation::links($actionLinks), ['id'=>'primaryDropDown'])->split(); }}
{{ DropdownButton::primary(trans('texts.create_invoice'), Navigation::links($actionLinks), ['id'=>'primaryDropDown'])->split() }}
@endif
{{ Former::close() }}
{!! Former::close() !!}
</div>
@ -38,7 +38,7 @@
<h2>{{ $client->getDisplayName() }}</h2>
@if ($client->last_login > 0)
<h3 style="margin-top:0px"><small>
{{ trans('texts.last_logged_in') }} {{ Utils::timestampToDateTimeString(strtotime($client->last_login)); }}
{{ trans('texts.last_logged_in') }} {{ Utils::timestampToDateTimeString(strtotime($client->last_login)) }}
</small></h3>
@endif
@ -69,16 +69,16 @@
<table class="table" style="width:300px">
<tr>
<td><small>{{ trans('texts.paid_to_date') }}</small></td>
<td style="text-align: right">{{ Utils::formatMoney($client->paid_to_date, $client->currency_id); }}</td>
<td style="text-align: right">{{ Utils::formatMoney($client->paid_to_date, $client->currency_id) }}</td>
</tr>
<tr>
<td><small>{{ trans('texts.balance') }}</small></td>
<td style="text-align: right">{{ Utils::formatMoney($client->balance, $client->currency_id); }}</td>
<td style="text-align: right">{{ Utils::formatMoney($client->balance, $client->currency_id) }}</td>
</tr>
@if ($credit > 0)
<tr>
<td><small>{{ trans('texts.credit') }}</small></td>
<td style="text-align: right">{{ Utils::formatMoney($credit, $client->currency_id); }}</td>
<td style="text-align: right">{{ Utils::formatMoney($credit, $client->currency_id) }}</td>
</tr>
@endif
</table>
@ -90,20 +90,20 @@
<p>&nbsp;</p>
<ul class="nav nav-tabs nav-justified">
{{ HTML::tab_link('#activity', trans('texts.activity'), true) }}
{!! HTML::tab_link('#activity', trans('texts.activity'), true) !!}
@if (Utils::isPro())
{{ HTML::tab_link('#quotes', trans('texts.quotes')) }}
{!! HTML::tab_link('#quotes', trans('texts.quotes')) !!}
@endif
{{ HTML::tab_link('#invoices', trans('texts.invoices')) }}
{{ HTML::tab_link('#payments', trans('texts.payments')) }}
{{ HTML::tab_link('#credits', trans('texts.credits')) }}
{!! HTML::tab_link('#invoices', trans('texts.invoices')) !!}
{!! HTML::tab_link('#payments', trans('texts.payments')) !!}
{!! HTML::tab_link('#credits', trans('texts.credits')) !!}
</ul>
<div class="tab-content">
<div class="tab-pane active" id="activity">
{{ Datatable::table()
{!! Datatable::table()
->addColumn(
trans('texts.date'),
trans('texts.message'),
@ -113,14 +113,14 @@
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('aaSorting', [['0', 'desc']])
->render('datatable') }}
->render('datatable') !!}
</div>
@if (Utils::isPro())
<div class="tab-pane" id="quotes">
{{ Datatable::table()
{!! Datatable::table()
->addColumn(
trans('texts.quote_number'),
trans('texts.quote_date'),
@ -131,7 +131,7 @@
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('aaSorting', [['0', 'desc']])
->render('datatable') }}
->render('datatable') !!}
</div>
@endif
@ -139,7 +139,7 @@
<div class="tab-pane" id="invoices">
@if ($hasRecurringInvoices)
{{ Datatable::table()
{!! Datatable::table()
->addColumn(
trans('texts.frequency_id'),
trans('texts.start_date'),
@ -149,10 +149,10 @@
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('aaSorting', [['0', 'asc']])
->render('datatable') }}
->render('datatable') !!}
@endif
{{ Datatable::table()
{!! Datatable::table()
->addColumn(
trans('texts.invoice_number'),
trans('texts.invoice_date'),
@ -164,12 +164,12 @@
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('aaSorting', [['0', 'asc']])
->render('datatable') }}
->render('datatable') !!}
</div>
<div class="tab-pane" id="payments">
{{ Datatable::table()
{!! Datatable::table()
->addColumn(
trans('texts.invoice'),
trans('texts.transaction_reference'),
@ -180,12 +180,12 @@
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('aaSorting', [['0', 'asc']])
->render('datatable') }}
->render('datatable') !!}
</div>
<div class="tab-pane" id="credits">
{{ Datatable::table()
{!! Datatable::table()
->addColumn(
trans('texts.credit_amount'),
trans('texts.credit_balance'),
@ -195,7 +195,7 @@
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('aaSorting', [['0', 'asc']])
->render('datatable') }}
->render('datatable') !!}
</div>
</div>

View File

@ -89,15 +89,15 @@
</div>
</button>
<ul class="dropdown-menu" role="menu">
<li>{{ link_to('company/details', uctrans('texts.company_details')) }}</li>
<li>{{ link_to('company/payments', uctrans('texts.online_payments')) }}</li>
<li>{{ link_to('company/products', uctrans('texts.product_library')) }}</li>
<li>{{ link_to('company/notifications', uctrans('texts.notifications')) }}</li>
<li>{{ link_to('company/import_export', uctrans('texts.import_export')) }}</li>
<li>{!! link_to('company/details', uctrans('texts.company_details')) !!}</li>
<li>{!! link_to('company/payments', uctrans('texts.online_payments')) !!}</li>
<li>{!! link_to('company/products', uctrans('texts.product_library')) !!}</li>
<li>{!! link_to('company/notifications', uctrans('texts.notifications')) !!}</li>
<li>{!! link_to('company/import_export', uctrans('texts.import_export')) !!}</li>
<li><a href="{{ url('company/advanced_settings/invoice_settings') }}">{{ uctrans('texts.advanced_settings') . Utils::getProLabel(ACCOUNT_ADVANCED_SETTINGS) }}</a></li>
<li class="divider"></li>
<li>{{ link_to('#', trans('texts.logout'), array('onclick'=>'logout()')) }}</li>
<li>{!! link_to('#', trans('texts.logout'), array('onclick'=>'logout()')) !!}</li>
</ul>
</div>

View File

@ -2,21 +2,21 @@
@section('content')
{{ Former::open($entityType . 's/bulk')->addClass('listForm') }}
{!! Former::open($entityType . 's/bulk')->addClass('listForm') !!}
<div style="display:none">
{{ Former::text('action') }}
{{ Former::text('statusId') }}
{{ Former::text('id') }}
{!! Former::text('action') !!}
{!! Former::text('statusId') !!}
{!! Former::text('id') !!}
</div>
{{ DropdownButton::normal(trans('texts.archive'),
{!! DropdownButton::normal(trans('texts.archive'),
Navigation::links(
array(
array(trans('texts.archive_'.$entityType), "javascript:submitForm('archive')"),
array(trans('texts.delete_'.$entityType), "javascript:submitForm('delete')"),
)
)
, array('id'=>'archive'))->split(); }}
, array('id'=>'archive'))->split() !!}
&nbsp;<label for="trashed" style="font-weight:normal; margin-left: 10px;">
<input id="trashed" type="checkbox" onclick="setTrashVisible()"
@ -25,25 +25,25 @@
<div id="top_right_buttons" class="pull-right">
<input id="tableFilter" type="text" style="width:140px;margin-right:17px" class="form-control pull-left" placeholder="{{ trans('texts.filter') }}"/>
{{ Button::success_link(URL::to($entityType . 's/create'), trans("texts.new_$entityType"), array('class' => 'pull-right'))->append_with_icon('plus-sign'); }}
{!! Button::normal(trans("texts.new_$entityType"))->asLinkTo(URL::to($entityType . 's/create'))->withAttributes(array('class' => 'pull-right'))->appendIcon(Icon::create('plus-sign')) !!}
</div>
@if (isset($secEntityType))
{{ Datatable::table()
{!! Datatable::table()
->addColumn($secColumns)
->setUrl(route('api.' . $secEntityType . 's'))
->setOptions('sPaginationType', 'bootstrap')
->render('datatable') }}
->render('datatable') !!}
@endif
{{ Datatable::table()
{!! Datatable::table()
->addColumn($columns)
->setUrl(route('api.' . $entityType . 's'))
->setOptions('sPaginationType', 'bootstrap')
->render('datatable') }}
->render('datatable') !!}
{{ Former::close() }}
{!! Former::close() !!}
<script type="text/javascript">