1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-22 09:21:34 +02:00
invoiceninja/resources/views/accounts/products.blade.php

56 lines
1.9 KiB
PHP
Raw Normal View History

2015-03-16 22:45:25 +01:00
@extends('accounts.nav')
@section('content')
@parent
2015-04-20 16:34:23 +02:00
{!! Former::open()->addClass('warn-on-exit') !!}
2015-03-16 22:45:25 +01:00
{{ Former::populateField('fill_products', intval($account->fill_products)) }}
{{ Former::populateField('update_products', intval($account->update_products)) }}
2015-04-01 21:57:02 +02:00
{!! Former::legend(trans('texts.product_library')) !!}
2015-04-20 16:34:23 +02:00
<div class="panel panel-default">
<div class="panel-body">
{!! Former::checkbox('fill_products')->text(trans('texts.fill_products_help')) !!}
{!! Former::checkbox('update_products')->text(trans('texts.update_products_help')) !!}
&nbsp;
{!! Former::actions( Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) ) !!}
{!! Former::close() !!}
</div>
</div>
2015-03-16 22:45:25 +01:00
2015-04-01 21:57:02 +02:00
{!! Button::success(trans('texts.create_product'))
->asLinkTo('/products/create')
->withAttributes(['class' => 'pull-right'])
->appendIcon(Icon::create('plus-sign')) !!}
2015-03-16 22:45:25 +01:00
2015-04-01 21:57:02 +02:00
{!! Datatable::table()
2015-03-16 22:45:25 +01:00
->addColumn(
trans('texts.product'),
trans('texts.description'),
trans('texts.unit_cost'),
trans('texts.action'))
->setUrl(url('api/products/'))
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('bAutoWidth', false)
->setOptions('aoColumns', [[ "sWidth"=> "20%" ], [ "sWidth"=> "45%" ], ["sWidth"=> "20%"], ["sWidth"=> "15%" ]])
->setOptions('aoColumnDefs', [['bSortable'=>false, 'aTargets'=>[3]]])
2015-04-01 21:57:02 +02:00
->render('datatable') !!}
2015-03-16 22:45:25 +01:00
<script>
window.onDatatableReady = function() {
$('tbody tr').mouseover(function() {
$(this).closest('tr').find('.tr-action').css('visibility','visible');
}).mouseout(function() {
$dropdown = $(this).closest('tr').find('.tr-action');
if (!$dropdown.hasClass('open')) {
$dropdown.css('visibility','hidden');
}
});
}
</script>
@stop