Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
AssignAttributesWidget.php
1 <?php
2 /**
3  * Gentics Portal.Node PHP
4  * Author & Copyright (c) by Gentics Software GmbH
5  * sales@gentics.com
6  * http://www.gentics.com
7  * Licenses can be found in the LICENSE.txt file in the root-folder of this installation
8  * You must not use this software without a valid license agreement.
9  *
10  */
11 $request = Yii::app()->request;
12 ?>
13 <div class="personalisation-widget-assign-attributes">
14  <script type="text/javascript">
15  $(function () {
16  $('#assigner').dhtmlTreeUserAssignment({
17  userId:'<?php echo $this->userId?>',
18  updateUrl:'<?php echo Yii::app()->createUrl('/personalisation/manage/updateUserAttribute')?>',
19  imagePath:'<?php echo $this->getModule()->getAssetsUrl() . '/css/imgs/csh_bluebooks/'?>',
20  treeData: <?php echo CJSON::encode(PersonalisationAttributeHelper::getTreeWithUserStateJs($this->userId))?>,
21  enableEditing: <?php echo CJavaScript::encode($this->enableEditing)?>,
22  t:{
23  'Personalisation attributes tree':'<?php echo PersonalisationModule::t('Personalisation attributes tree')?>'
24  },
25  hiddenFields: <?php echo CJSON::encode($request->enableCsrfValidation ? array($request->csrfTokenName => $request->getCsrfToken()) : array())?>
26  }
27  );
28  });
29  </script>
30  <div id="assigner"></div>
31 </div>