1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-24 10:21:35 +02:00
invoiceninja/app/views/accounts/products.blade.php

50 lines
1.7 KiB
PHP
Raw Normal View History

2014-04-23 22:30:54 +02:00
@extends('accounts.nav')
@section('content')
@parent
{{ Former::open()->addClass('col-md-10 col-md-offset-1 warn-on-exit') }}
{{ Former::populateField('fill_products', intval($account->fill_products)) }}
{{ Former::populateField('update_products', intval($account->update_products)) }}
2014-04-24 12:24:51 +02:00
{{ Former::legend('product_library') }}
2014-04-23 22:30:54 +02:00
{{ Former::checkbox('fill_products')->text(trans('texts.fill_products_help')) }}
{{ Former::checkbox('update_products')->text(trans('texts.update_products_help')) }}
2014-04-24 12:24:51 +02:00
 
2014-04-23 22:30:54 +02:00
{{ Former::actions( Button::lg_success_submit(trans('texts.save'))->append_with_icon('floppy-disk') ) }}
{{ Former::close() }}
2014-04-23 23:48:09 +02:00
{{ Button::success_link(URL::to('products/create'), trans("texts.create_product"), array('class' => 'pull-right'))->append_with_icon('plus-sign') }}
2014-04-23 22:30:54 +02:00
{{ Datatable::table()
->addColumn(
trans('texts.product'),
trans('texts.description'),
trans('texts.unit_cost'),
trans('texts.action'))
->setUrl(url('api/products/'))
->setOptions('sPaginationType', 'bootstrap')
2014-04-24 00:04:21 +02:00
->setOptions('bFilter', false)
->setOptions('bAutoWidth', false)
->setOptions('aoColumns', [[ "sWidth"=> "20%" ], [ "sWidth"=> "45%" ], ["sWidth"=> "20%"], ["sWidth"=> "15%" ]])
2014-04-23 22:30:54 +02:00
->render('datatable') }}
<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