[ Index ] |
PHP Cross Reference of vtigercrm-6.1.0 |
[Summary view] [Print] [Text view]
1 <?php 2 /*+*********************************************************************************** 3 * The contents of this file are subject to the vtiger CRM Public License Version 1.0 4 * ("License"); You may not use this file except in compliance with the License 5 * The Original Code is: vtiger CRM Open Source 6 * The Initial Developer of the Original Code is vtiger. 7 * Portions created by vtiger are Copyright (C) vtiger. 8 * All Rights Reserved. 9 *************************************************************************************/ 10 11 class Vtiger_History_Dashboard extends Vtiger_IndexAjax_View { 12 13 public function process(Vtiger_Request $request) { 14 $LIMIT = 10; 15 16 $currentUser = Users_Record_Model::getCurrentUserModel(); 17 $viewer = $this->getViewer($request); 18 19 $moduleName = $request->getModule(); 20 $type = $request->get('type'); 21 $page = $request->get('page'); 22 $linkId = $request->get('linkid'); 23 24 $pagingModel = new Vtiger_Paging_Model(); 25 $pagingModel->set('page', $page); 26 $pagingModel->set('limit', $LIMIT); 27 28 $moduleModel = Vtiger_Module_Model::getInstance($moduleName); 29 $history = $moduleModel->getHistory($pagingModel, $type); 30 $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId()); 31 $modCommentsModel = Vtiger_Module_Model::getInstance('ModComments'); 32 33 $viewer->assign('WIDGET', $widget); 34 $viewer->assign('MODULE_NAME', $moduleName); 35 $viewer->assign('HISTORIES', $history); 36 $viewer->assign('PAGE', $page); 37 $viewer->assign('NEXTPAGE', (count($history) < $LIMIT)? 0 : $page+1); 38 $viewer->assign('COMMENTS_MODULE_MODEL', $modCommentsModel); 39 40 $content = $request->get('content'); 41 if(!empty($content)) { 42 $viewer->view('dashboards/HistoryContents.tpl', $moduleName); 43 } else { 44 $viewer->view('dashboards/History.tpl', $moduleName); 45 } 46 } 47 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:08:37 2014 | Cross-referenced by PHPXref 0.7.1 |