0
0
mirror of https://github.com/salesagility/SuiteCRM.git synced 2024-11-24 08:36:48 +00:00
salesagility_SuiteCRM/modules/Leads/LeadsListViewSmarty.php
2023-07-18 15:53:09 +01:00

60 lines
1.8 KiB
PHP

<?php
require_once('include/ListView/ListViewSmarty.php');
require_once('modules/AOS_PDF_Templates/formLetter.php');
#[\AllowDynamicProperties]
class LeadsListViewSmarty extends ListViewSmarty
{
public function __construct()
{
parent::__construct();
$this->targetList = true;
}
/**
*
* @param file $file Template file to use
* @param array $data from ListViewData
* @param string $htmlVar the corresponding html public in xtpl per row
* @return bool|void
*/
public function process($file, $data, $htmlVar)
{
$configurator = new Configurator();
if ($configurator->isConfirmOptInEnabled()) {
$this->actionsMenuExtraItems[] = $this->buildSendConfirmOptInEmailToPersonAndCompany();
}
$ret = parent::process($file, $data, $htmlVar);
if (!ACLController::checkAccess($this->seed->module_dir, 'export', true) || !$this->export) {
$this->ss->assign('exportLink', $this->buildExportLink());
}
return $ret;
}
public function buildExportLink($id = 'export_link')
{
global $app_strings;
global $sugar_config;
$script = "";
if (ACLController::checkAccess($this->seed->module_dir, 'export', true)) {
if ($this->export) {
$script = parent::buildExportLink($id);
}
}
$script .= "<a href='javascript:void(0)' id='map_listview_top' " .
" onclick=\"return sListView.send_form(true, 'jjwg_Maps', " .
"'index.php?entryPoint=jjwg_Maps&display_module={$_REQUEST['module']}', " .
"'{$app_strings['LBL_LISTVIEW_NO_SELECTED']}')\">{$app_strings['LBL_MAP']}</a>";
return formLetter::LVSmarty().$script;
}
}