<?php
namespace %<NAMESPACE>%;

use %<DATA_MODEL_CLASS_NAME>% as %<DATA_MODEL_CLASS_ALIAS>%;

use Jet\Tr;
use Jet\MVC_View;
use Jet\UI;

/**
 * @var MVC_View $this
 * @var Listing $listing
 */
$listing = $this->getRaw( 'listing' );
$grid = $listing->getGrid();
$filter_form = $listing->getFilterForm();

$router = $this->getController()->getControllerRouter();

$grid->getColumn( '_edit_' )->addCustomCssStyle( 'width:200px;' );
$grid->getColumn( '%<ID_PROPERTY>%' )->addCustomCssStyle( 'width:120px;' );

?>

<?=$filter_form->start()?>
<div class="row toolbar">
	<?php if( ( $add_uri = $router->action('add')->URI() ) ): ?>
		<div class="col-md-2 col-sm-12">
			<?=UI::button_create( Tr::_( '%<TXT_BTN_NEW>%' ) )->setUrl( $add_uri )?>
		</div>
	<?php endif; ?>

	<div class="col-md-3 col-sm-12">
		<?=$listing->filter(Listing_Filter_Search::KEY)->renderForm()?>
	</div>
	<div class="col-md-4 col-sm-12">
	</div>

</div>
<?=$filter_form->end()?>

<div class="row">
	<div class="col-md-12">
		<?=$grid->render();?>
	</div>
</div>
