<?php
// TODO: not finished, some options are commented
namespace Modules\Admin\ExportData\ExportedFiles;

class View_Options extends \ModulesAbstract\FileExplorer\View_Options
{

	/**
	 * (non-PHPdoc)
	 * @see \ModulesAbstract\FileExplorer\View_Options::populateDefinedOptions()
	 */
	public function populateDefinedOptions(\App\Mvc\View\Utils\RowOptions\Container\Simple $options)
	{
		$options

			#viewLog
			->append(\App\Mvc\View\Utils\RowOptions\Option\Window::create("viewLog")
				->setDescription($this->lang['index']['options']['description']['viewLog'])
				->setIcon('history')
				->setModule('Modules/Admin/ExportData/Logs')->setAction('index')
				->addParam('listing[paramsSlot]', 1)
				->addParamFromJs('filters[fileName]', "MVC.listing.installedHandlers.listing.getItemData(this).get('name')")
			)

			->append(\App\Mvc\View\Utils\RowOptions\Option\Window::create("downloadFile")
				->setDescription($this->lang['index']['options']['description']['downloadFile'])
				->setAction('download')
				->setKeyForCurrentRow('id')
				->setIcon('export')
			)

			#process
			->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("process")
				->setDescription($this->lang['index']['options']['description']['process'])
				->setIcon('plugins')
				->setJsCallback("MVC.listing.installedHandlers.listing.processItemWithConfirmation(this);")
			)

			#moveToQueue
			->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("moveToQueue")
				->setDescription($this->lang['index']['options']['description']['moveToQueue'])
				->setIcon("reload")
				->setJsCallback("MVC.listing.installedHandlers.listing.moveToQueueItemWithConfirmation(this);")
			)

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


			// bulk options

			#process
			->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("process")
				->setDescription($this->lang['index']['options']['description']['process'])
				->setIcon('plugins')
				->setJsCallback("MVC.listing.installedHandlers.listing.processItemsWithConfirmation(this);")
				->setSection('bulk')
			)

			#moveToQueue
			->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("moveToQueue")
				->setDescription($this->lang['index']['options']['description']['moveToQueue'])
				->setIcon("reload")
				->setJsCallback("MVC.listing.installedHandlers.listing.moveToQueueItemsWithConfirmation(this);")
				->setSection('bulk')
			)

			#moveToDeleted
			->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("moveToDeleted")
				->setDescription($this->lang['index']['options']['description']['moveToDeleted'])
				->setIcon("delete")
				->setJsCallback("MVC.listing.installedHandlers.listing.moveToDeletedItemsWithConfirmation(this);")
				->setSection('bulk')
			)
		;

	}
}
