<?php
namespace Modules\Admin\KamSalesTargets;

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 sales targets
			->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("insert")
				->setDescription($this->lang['index']['options']['description']['insert'])
				->setSection('global')
				->setIcon('add')
				->setAction('insert')
				->setDimensions(700, 400)
			)

			// update sales targets
			->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("update")
				->setDescription($this->lang['index']['options']['description']['update'])
				->setIcon('edit')
				->setAction('update')
				->setDimensions(700, 400)
				->setKeyForCurrentRow('id')
			)

			// delete sales targets
			->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("delete")
				->setDescription($this->lang['index']['options']['description']['delete'])
				->setIcon("delete")
				->setJsCallback("MVC.listing.installedHandlers.listing.deleteCurrentItemWithConfirmation(this);")
			)
		;
	}

}
