<?php
namespace Modules\Invoices\Cashings\Listing; class View_Options extends \App\Mvc\View_Window_PaginatedListing_OptionsAbstract { public function populateDefinedOptions(\App\Mvc\View\Utils\RowOptions\Container\Simple $options) { $options ->append(\App\Mvc\View\Utils\RowOptions\Container\OptionEmulator::create() ->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("block") ->setDescription($this->lang['index']['options']['description']['block']) ->setIcon("lock") ->setJsCallback("MVC.listing.installedHandlers.listing.blockCurrentWithConfirmation(this);") ) ->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("unblock") ->setDescription($this->lang['index']['options']['description']['unblock']) ->setIcon('unlock') ->setJsCallback("MVC.listing.installedHandlers.listing.unblockCurrentWithConfirmation(this);") ) ) ->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("update") ->setIcon('edit') ->setDescription($this->lang['index']['options']['description']['update']) ->setModule("Modules/Invoices/Cashings/Management") ->setAction("update") ->setKeyForCurrentRow("id") ->setDimensions(750, 500) ) ->append(\App\Mvc\View\Utils\RowOptions\Container\OptionsMenu::create("mainOptions") ->append(\App\Mvc\View\Utils\RowOptions\Option\Popup\ManageDocuments::createWithPivot("issue", 'cashing') ->setLabel($this->lang['index']['options']['description']['issue']) ) ->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("view") ->setLabel($this->lang['index']['options']['description']['view']) ->setIcon('view') ->setJsCallback("clientInvoiceView(MVC.listing.installedHandlers.listing.getItemData(this).get('invoiceId'))") ) ->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("cashingInvoices") ->setLabel($this->lang['index']['options']['description']['cashingInvoices']) ->setIcon('cashing') ->setModule('Modules/Invoices/Cashings/Management') ->setAction('index') ->setDimensions(950, 550) ->addParamFromJs('filters[idInvoice]', "MVC.listing.installedHandlers.listing.getItemData(this).get('invoiceId')") ) ->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("cancel") ->setIcon('delete') ->setModule('Modules/Invoices/Cashings/Management/Cancel') ->setAction('index') ->setKeyForCurrentRow('id[]') ->setLabel($this->lang['index']['options']['description']['cancel']) ->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']['description']['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']['description']['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']['description']['cancel']) ->setDimensions(700, 300) ) ; $options->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("documentsBulkDownload") ->setDescription($this->lang['index']['options']['description']['bulkDownload']) ->setIcon('export') ->addParamFromJs('ids', "MVC.listing.installedHandlers.listing.getSelectedIds(this)") ->setModule('Modules/Documents/BulkDownload') ->setAction("index") ->setSection('bulk') ->setDimensions(800, 500) ->addParam('pivot', 'cashing') ); } } 