<?php
namespace Modules\Utils\AppReports;

class View_Options extends \App\Mvc\View_Window_PaginatedListing_OptionsAbstract
{
	/**
	 * (non-PHPdoc)
	 * @see \App\Mvc\View_Window_PaginatedListing_OptionsAbstract::populateDefinedOptions()
	 */
	public function populateDefinedOptions(\App\Mvc\View\Utils\RowOptions\Container\Simple $options)
	{
		$options
			// add new currency type
			->append( \App\Mvc\View\Utils\RowOptions\Option\Popup::create("insert")
				->setDescription("Add app report")
				->setIcon('add')
				->setSection('global')
				->setAction('insert')
				->setDimensions(650, 400)
			)
			->append( \App\Mvc\View\Utils\RowOptions\Option\Popup::create("exportConfig")
				->setDescription("Export configs")
				->setIcon('generate')
				->setSection('global')
				->setAction('exportConfig')
				->setDimensions(650, 400)
			)

			->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create('generate')
				->setIcon('report')
				->setDescription("Generate app report")
				->setAction('generate')
				->setDimensions(550, 400)
				->setKeyForCurrentRow('id')
			)

			// update
			->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("update")
				->setDescription("Update app report")
				->setIcon('edit')
				->setAction('update')
				->setDimensions(550, 400)
				->addParamFromJs('id', "MVC.listing.installedHandlers.listing.getItemData(this).get('id')")
			)


			// delete
			->append(\App\Mvc\View\Utils\RowOptions\Option\Delete::create("delete")
				->setDescription("Delete app report")
			)

			->append(\App\Mvc\View\Utils\RowOptions\Option\DeleteSelected::create("delete")
				->setDescription("Bulk delete app reports")
			);

	}

}
