[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/pkg/vtiger/modules/EmailTemplates/settings/views/ -> List.php (source)

   1  <?php
   2  /*+**********************************************************************************
   3   * The contents of this file are subject to the vtiger CRM Public License Version 1.1
   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 Settings_EmailTemplates_List_View extends Vtiger_Footer_View {
  12      
  13      function checkPermission(Vtiger_Request $request) {
  14          //Return true as WebUI.php is already checking for module permission
  15          return true;
  16      }
  17      
  18  	public function process(Vtiger_Request $request) {
  19          $viewer = $this->getViewer($request);
  20          $moduleName = $request->getModule();
  21          $qualifiedModuleName = $request->getModule(false);
  22  
  23          $emailTemplates = Settings_EmailTemplates_Module_Model::getAll();
  24  
  25          $viewer->assign('MODULE', $moduleName);
  26          $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
  27          $viewer->assign('EMAIL_TEMPLATES', $emailTemplates);
  28          
  29          echo $viewer->view('ListContents.tpl', $qualifiedModuleName, true);
  30      }
  31      
  32      /**
  33       * Function to get the list of Script models to be included
  34       * @param Vtiger_Request $request
  35       * @return <Array> - List of Vtiger_JsScript_Model instances
  36       */
  37  	function getHeaderScripts(Vtiger_Request $request) {
  38          $headerScriptInstances = parent::getHeaderScripts($request);
  39          $moduleName = $request->getModule();
  40  
  41          $jsFileNames = array(
  42              'modules.Vtiger.resources.Popup',
  43              'libraries.jquery.jquery_windowmsg'
  44          );
  45  
  46          $jsScriptInstances = $this->checkAndConvertJsScripts($jsFileNames);
  47          $headerScriptInstances = array_merge($headerScriptInstances, $jsScriptInstances);
  48          return $headerScriptInstances;
  49      }
  50  }


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1