* SPDX-License-Identifier: AGPL-3.0-only
************************************/
// crmv@172994
require_once('include/ListView/SimpleListView.php');
global $app_strings, $currentModule, $theme, $default_charset;
$Slv = SimpleListView::getInstance($currentModule); // fake module, but works as well
$Slv->entriesPerPage = 20;
$Slv->maxFields = 2;
$Slv->showFilters = false;
$Slv->showSuggested = false;
$Slv->showCheckboxes = false;
$Slv->selectFunction = 'MyNotesSV.select';
$Slv->template = "modules/{$currentModule}/SimpleListView.tpl";
$list = $Slv->render();
$smarty = new VteSmarty();
$page_title = getTranslatedString($currentModule);
$smarty->assign('BROWSER_TITLE', $page_title);
$smarty->assign('PAGE_TITLE', $page_title);
$small_page_buttons = '
';
$smarty->assign('BUTTON_LIST', $small_page_buttons);
$smarty->assign('APP', $app_strings);
$smarty->assign('THEME', $theme);
$smarty->assign('DEFAULT_CHARSET', $default_charset);
$smarty->assign('MODULE', $currentModule);
$smarty->assign('LIST', $list);
$smarty->assign('LISTID', $Slv->listid);
//crmv@103870
$JSGlobals = ( function_exists('getJSGlobalVars') ? getJSGlobalVars() : array() );
$smarty->assign('JS_GLOBAL_VARS', Zend_Json::encode($JSGlobals));
//crmv@103870e
if (!empty($_REQUEST['record'])) {
VteSession::set('mynote_selected', $_REQUEST['record']);
}
if (!VteSession::isEmpty('mynote_selected')) {
$smarty->assign('MYNOTE_SELECTED', VteSession::get('mynote_selected'));
} else {
$crmids = $Slv->getCrmids();
if (!empty($crmids)) {
$smarty->assign('MYNOTE_SELECTED', $crmids[0]);
}
}
$smarty->display("modules/{$currentModule}/SimpleView.tpl");
?>