/
LeadsListViewSmarty.php
58 lines (46 loc) · 1.72 KB
/
LeadsListViewSmarty.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
require_once('include/ListView/ListViewSmarty.php');
require_once('modules/AOS_PDF_Templates/formLetter.php');
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 $script;
}
}