<?php  

require_once('include/MVC/View/views/view.list.php');  
require_once('custom/modules/gea_Callcenter/gea_CallcenterListViewSmarty.php');   

class gea_CallcenterViewList extends ViewList {           
    function gea_CallcenterViewList(){                  


        parent::ViewList();    
		echo getVersionedScript('modules/AOS_Invoices/js/invoice_list.js');
		$this->lv->actionsMenuExtraItems[] = $this->buildMyMenuItem();
    }           
function listViewProcess(){
    $this->processSearchForm();
    //$this->searchColumns = $this->searchColumns;
    if(!$this->headers)
        return;
    if(empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false){
        global $sugar_config;
        $this->lv->show_mass_update = true;
        $this->lv->show_mass_update_form = true;

        $this->lv->setup(
                        $this->seed, 
                        'custom/modules/gea_Callcenter/tpls/ListViewgea_Callcenter.tpl', 
                        $this->where, 
                        $this->params
                        );
        $savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
        echo get_form_header($GLOBALS['mod_strings']['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
        echo $this->lv->display();
    }
	
}
	/**
     * @return string HTML
     */
    protected function buildMyMenuItem()
    {
        global $app_strings;
    
        return <<<EOHTML
        <a class="menuItem" style="width: 20d0px;" href="#" onmouseover='hiliteItem(this,"yes");' 
        onmouseout='unhiliteItem(this);' 
        onclick="sugarListView.get_checks();
        if(sugarListView.get_checks_count() &lt; 1) {
            alert('{$app_strings['LBL_LISTVIEW_NO_SELECTED']}');
            return false;
        }
        document.MassUpdate.action.value='displaypassedids';
        document.MassUpdate.submit();">Impresión masiva facturas</a>
<a class="menuItem" style="width: 150px;" href="javascript:void(0)" onmouseover='hiliteItem(this,"yes");'
onmouseout='unhiliteItem(this);'
onclick="sugarListView.get_checks();
if(sugarListView.get_checks_count() &lt; 1) {
alert('{$app_strings['LBL_LISTVIEW_NO_SELECTED']}');
return false;
}
window_impHojaRuta('index.php?module=AOS_Invoices&action=pRecibido', 'Seleccione la persona quien recibe', 300, 200);">Imprimir hoja de ruta</a>
EOHTML;
    }
}   
?>