<?php
namespace Modules\Invoices\Cashings\Management; class View_Options extends \App\Mvc\View_Popup_PaginatedListing_OptionsAbstract { public function populateDefinedOptions(\App\Mvc\View\Utils\RowOptions\Container\Simple $options) { $options ->append(\App\Mvc\View\Utils\RowOptions\Option\Popup\Insert::create("insert") ->setDescription($this->lang['index']['options']['buttons']['insert']) ->setDimensions(750, 580) ->addParamFromJs('idInvoice', '$F(\'idInvoice\')') ) ->append(\App\Mvc\View\Utils\RowOptions\Option\Popup\ManageDocuments::createWithPivot('issue', 'cashing') ->setDescription($this->lang['index']['options']['buttons']['issue']) ) ->append(\App\Mvc\View\Utils\RowOptions\Container\OptionEmulator::create() ->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create('block') ->setIcon('lock') ->setDescription($this->lang['index']['options']['buttons']['block']) ->setJsCallback('MVC.listing.installedHandlers.listing.blockCurrentWithConfirmation(this)') ) ->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create('unblock') ->setIcon('unlock') ->setDescription($this->lang['index']['options']['buttons']['unblock']) ->setJsCallback('MVC.listing.installedHandlers.listing.unblockCurrentWithConfirmation(this)') ) ) ->append(\App\Mvc\View\Utils\RowOptions\Option\Popup\Update::create("update") ->setDescription($this->lang['index']['options']['buttons']['update']) ->setDimensions(750, 550) ) ->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("cancel") ->setIcon('delete') ->setModule('Modules/Invoices/Cashings/Management/Cancel') ->setAction('index') ->setKeyForCurrentRow('id[]') ->setDescription($this->lang['index']['options']['buttons']['void']) ->setDimensions(700, 300) ) ->append(\App\Mvc\View\Utils\RowOptions\Container\OptionEmulator::create() ->setSection('bulk') ->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("block") ->setDescription($this->lang['index']['options']['buttons']['block']) ->setIcon("lock") ->setJsCallback("MVC.listing.installedHandlers.listing.blockSelectedWithConfirmation(this);") ) ->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("unblock") ->setDescription($this->lang['index']['options']['buttons']['unblock']) ->setIcon('unlock') ->setJsCallback("MVC.listing.installedHandlers.listing.unblockSelectedWithConfirmation(this);") ) ) ->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("cancelBulk") ->setSection('bulk') ->setIcon('delete') ->setModule('Modules/Invoices/Cashings/Management/Cancel') ->setAction('index') ->setKeyForSelectedRows('id') ->setDescription($this->lang['index']['options']['buttons']['cancelBulk']) ->setDimensions(700, 300) ) ; $cashingInsertGroup = \App\Mvc\View\Utils\RowOptions\Container\OptionsMenu::create("cashingInsertOptions"); $cashingInsertGroup->setSection('global'); $cashingInsertGroup->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("transferToCredit") ->setLabel($this->lang['index']['options']['buttons']['transferToCredit']) ->setDimensions(500, 400) ->setIcon("cashing") ->setModule('Modules/Invoices/Cashings/Management/TransferToCredit') ->setAction("index") ->addParamFromJs('idInvoice', '$F(\'idInvoice\')') ); $options->append($cashingInsertGroup); } } 