示例#1
0
 public function process(Vtiger_Request $request)
 {
     $recordId = $request->get('record');
     $currentUserModel = Users_Record_Model::getCurrentUserModel();
     $request->set('assigned_user_id', $currentUserModel->getId());
     $request->set('userid', $currentUserModel->getId());
     $this->saveRecord($request);
     $recordModel = ModComments_Record_Model::getInstanceById($recordId);
     $result['success'] = true;
     $result['reasontoedit'] = $recordModel->get('reasontoedit');
     $result['commentcontent'] = $recordModel->get('commentcontent');
     $result['modifiedtime'] = Vtiger_Util_Helper::formatDateDiffInStrings($recordModel->get('modifiedtime'));
     $result['modifiedtimetitle'] = Vtiger_Util_Helper::formatDateTimeIntoDayString($recordModel->get('modifiedtime'));
     $response = new Vtiger_Response();
     $response->setEmitType(Vtiger_Response::$EMIT_JSON);
     $response->setResult($result);
     $response->emit();
 }
示例#2
0
 public function process(Vtiger_Request $request)
 {
     $recordId = $request->get('record');
     $currentUserModel = Users_Record_Model::getCurrentUserModel();
     $request->set('assigned_user_id', $currentUserModel->getId());
     $request->set('userid', $currentUserModel->getId());
     $recordModel = $this->saveRecord($request);
     $responseFieldsToSent = array('reasontoedit', 'commentcontent');
     $fieldModelList = $recordModel->getModule()->getFields();
     foreach ($responseFieldsToSent as $fieldName) {
         $fieldModel = $fieldModelList[$fieldName];
         $fieldValue = $recordModel->get($fieldName);
         $result[$fieldName] = $fieldModel->getDisplayValue(Vtiger_Util_Helper::toSafeHTML($fieldValue));
     }
     $result['success'] = true;
     $result['modifiedtime'] = Vtiger_Util_Helper::formatDateDiffInStrings($recordModel->get('modifiedtime'));
     $result['modifiedtimetitle'] = Vtiger_Util_Helper::formatDateTimeIntoDayString($recordModel->get('modifiedtime'));
     $response = new Vtiger_Response();
     $response->setEmitType(Vtiger_Response::$EMIT_JSON);
     $response->setResult($result);
     $response->emit();
 }
<?php if ($_valid && !is_callable('content_56059e5e8d482')) {function content_56059e5e8d482($_smarty_tpl) {?>
<?php $_smarty_tpl->tpl_vars["COMMENT_TEXTAREA_DEFAULT_ROWS"] = new Smarty_variable("2", null, 0);?><div class="commentContainer recentComments"><div class="commentTitle row-fluid"><?php if ($_smarty_tpl->tpl_vars['COMMENTS_MODULE_MODEL']->value->isPermitted('EditView')){?><div class="addCommentBlock"><div><textarea name="commentcontent" class="commentcontent"  placeholder="<?php echo vtranslate('LBL_ADD_YOUR_COMMENT_HERE',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
" rows="<?php echo $_smarty_tpl->tpl_vars['COMMENT_TEXTAREA_DEFAULT_ROWS']->value;?>
"></textarea></div><div class="pull-right"><button class="btn btn-success detailViewSaveComment" type="button" data-mode="add"><strong><?php echo vtranslate('LBL_POST',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</strong></button></div></div><?php }?></div><hr><br><div class="commentsBody"><?php if (!empty($_smarty_tpl->tpl_vars['COMMENTS']->value)){?><?php  $_smarty_tpl->tpl_vars['COMMENT'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['COMMENT']->_loop = false;
 $_smarty_tpl->tpl_vars['index'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['COMMENTS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['COMMENT']->key => $_smarty_tpl->tpl_vars['COMMENT']->value){
$_smarty_tpl->tpl_vars['COMMENT']->_loop = true;
 $_smarty_tpl->tpl_vars['index']->value = $_smarty_tpl->tpl_vars['COMMENT']->key;
?><div class="commentDetails"><div class="commentDiv"><div class="singleComment"><div class="commentInfoHeader row-fluid" data-commentid="<?php echo $_smarty_tpl->tpl_vars['COMMENT']->value->getId();?>
" data-parentcommentid="<?php echo $_smarty_tpl->tpl_vars['COMMENT']->value->get('parent_comments');?>
"><div class="commentTitle"><?php $_smarty_tpl->tpl_vars['PARENT_COMMENT_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['COMMENT']->value->getParentCommentModel(), null, 0);?><?php $_smarty_tpl->tpl_vars['CHILD_COMMENTS_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['COMMENT']->value->getChildComments(), null, 0);?><div class="row-fluid"><div class="span1"><?php $_smarty_tpl->tpl_vars['IMAGE_PATH'] = new Smarty_variable($_smarty_tpl->tpl_vars['COMMENT']->value->getImagePath(), null, 0);?><img class="alignMiddle pull-left" src="<?php if (!empty($_smarty_tpl->tpl_vars['IMAGE_PATH']->value)){?><?php echo $_smarty_tpl->tpl_vars['IMAGE_PATH']->value;?>
<?php }else{ ?><?php echo vimage_path('DefaultUserIcon.png');?>
<?php }?>"></div><div class="span11 commentorInfo"><?php $_smarty_tpl->tpl_vars['COMMENTOR'] = new Smarty_variable($_smarty_tpl->tpl_vars['COMMENT']->value->getCommentedByModel(), null, 0);?><div class="inner"><span class="commentorName"><strong><?php echo $_smarty_tpl->tpl_vars['COMMENTOR']->value->getName();?>
</strong></span><span class="pull-right"><p class="muted"><small title="<?php echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['COMMENT']->value->getCommentedTime());?>
"><?php echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['COMMENT']->value->getCommentedTime());?>
</small></p></span><div class="clearfix"></div></div><div class="commentInfoContent"><?php echo nl2br($_smarty_tpl->tpl_vars['COMMENT']->value->get('commentcontent'));?>
</div></div></div></div></div><div class="row-fluid commentActionsContainer"><?php $_smarty_tpl->tpl_vars["REASON_TO_EDIT"] = new Smarty_variable($_smarty_tpl->tpl_vars['COMMENT']->value->get('reasontoedit'), null, 0);?><div class="row-fluid editStatus"  name="editStatus"><span class="span6<?php if (empty($_smarty_tpl->tpl_vars['REASON_TO_EDIT']->value)){?> hide<?php }?>"><p class="muted"><small>[ <?php echo vtranslate('LBL_EDIT_REASON',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
 ] :<span  name="editReason" class="textOverflowEllipsis"><?php echo nl2br($_smarty_tpl->tpl_vars['REASON_TO_EDIT']->value);?>
</span></small></p></span><?php if ($_smarty_tpl->tpl_vars['COMMENT']->value->getCommentedTime()!=$_smarty_tpl->tpl_vars['COMMENT']->value->getModifiedTime()){?><span class="<?php if (empty($_smarty_tpl->tpl_vars['REASON_TO_EDIT']->value)){?>row-fluid<?php }else{ ?> span6<?php }?>"><p class="muted pull-right"><small><em><?php echo vtranslate('LBL_MODIFIED',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</em></small>&nbsp;<small title="<?php echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['COMMENT']->value->getModifiedTime());?>
" class="commentModifiedTime"><?php echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['COMMENT']->value->getModifiedTime());?>
</small></p></span><?php }?></div><div class="row-fluid"><div class="pull-right commentActions"><?php if ($_smarty_tpl->tpl_vars['COMMENTS_MODULE_MODEL']->value->isPermitted('EditView')){?><span><a class="cursorPointer replyComment feedback"><i class="icon-share-alt"></i><?php echo vtranslate('LBL_REPLY',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</a><?php if ($_smarty_tpl->tpl_vars['CURRENTUSER']->value->getId()==$_smarty_tpl->tpl_vars['COMMENT']->value->get('userid')){?>&nbsp;<span>|</span>&nbsp;<a class="cursorPointer editComment feedback"><?php echo vtranslate('LBL_EDIT',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</a><?php }?></span><?php }?><span><?php if ($_smarty_tpl->tpl_vars['PARENT_COMMENT_MODEL']->value!=false||$_smarty_tpl->tpl_vars['CHILD_COMMENTS_MODEL']->value!=null){?><?php if ($_smarty_tpl->tpl_vars['COMMENTS_MODULE_MODEL']->value->isPermitted('EditView')){?>&nbsp;<span>|</span>&nbsp;<?php }?><a href="javascript:void(0);" class="cursorPointer detailViewThread"><?php echo vtranslate('LBL_VIEW_THREAD',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</a><?php }?></span></div></div></div></div></div></div><?php } ?><?php }else{ ?><?php echo $_smarty_tpl->getSubTemplate (vtemplate_path("NoComments.tpl"), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
<?php }?></div><?php if ($_smarty_tpl->tpl_vars['PAGING_MODEL']->value->isNextPageExists()){?><div class="row-fluid"><div class="pull-right"><a href="javascript:void(0)" class="moreRecentComments"><?php echo vtranslate('LBL_MORE',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
..</a></div></div><?php }?><div class="hide basicAddCommentBlock"><div class="row-fluid"><span class="span1">&nbsp;</span><div class="span11"><textarea class="commentcontenthidden fullWidthAlways" name="commentcontent" rows="<?php echo $_smarty_tpl->tpl_vars['COMMENT_TEXTAREA_DEFAULT_ROWS']->value;?>
" placeholder="<?php echo vtranslate('LBL_ADD_YOUR_COMMENT_HERE',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
"></textarea></div></div><div class="pull-right"><button class="btn btn-success detailViewSaveComment" type="button" data-mode="add"><strong><?php echo vtranslate('LBL_POST',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</strong></button><a class="cursorPointer closeCommentBlock cancelLink" type="reset"><?php echo vtranslate('LBL_CANCEL',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</a></div></div><div class="hide basicEditCommentBlock" style="min-height: 150px;"><div class="row-fluid"><span class="span1">&nbsp;</span><div class="span11"><input type="text" name="reasonToEdit" placeholder="<?php echo vtranslate('LBL_REASON_FOR_CHANGING_COMMENT',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
" class="input-block-level"/></div></div><div class="row-fluid"><span class="span1">&nbsp;</span><div class="span11"><textarea class="commentcontenthidden fullWidthAlways" name="commentcontent" rows="<?php echo $_smarty_tpl->tpl_vars['COMMENT_TEXTAREA_DEFAULT_ROWS']->value;?>
"></textarea></div></div><div class="pull-right"><button class="btn btn-success detailViewSaveComment" type="button" data-mode="edit"><strong><?php echo vtranslate('LBL_POST',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</strong></button><a class="cursorPointer closeCommentBlock cancelLink" type="reset"><?php echo vtranslate('LBL_CANCEL',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</a></div></div></div><?php }} ?>
<?php if ($_valid && !is_callable('content_56059e5eb6b1a')) {function content_56059e5eb6b1a($_smarty_tpl) {?>
<div class="recentActivitiesContainer" id="updates"><input type="hidden" id="updatesCurrentPage" value="<?php echo $_smarty_tpl->tpl_vars['PAGING_MODEL']->value->get('page');?>
" /><div><?php if (!empty($_smarty_tpl->tpl_vars['RECENT_ACTIVITIES']->value)){?><ul class="unstyled"><?php  $_smarty_tpl->tpl_vars['RECENT_ACTIVITY'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['RECENT_ACTIVITIES']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->key => $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value){
$_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->_loop = true;
?><?php $_smarty_tpl->tpl_vars['PROCEED'] = new Smarty_variable(true, null, 0);?><?php if (($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRelationLink())||($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRelationUnLink())){?><?php $_smarty_tpl->tpl_vars['RELATION'] = new Smarty_variable($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getRelationInstance(), null, 0);?><?php if (!($_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord())){?><?php $_smarty_tpl->tpl_vars['PROCEED'] = new Smarty_variable(false, null, 0);?><?php }?><?php }?><?php if ($_smarty_tpl->tpl_vars['PROCEED']->value){?><?php if ($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isCreate()){?><li><div><span><strong><?php echo $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getModifiedBy()->getName();?>
</strong> <?php echo vtranslate('LBL_CREATED',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</span><span class="pull-right"><p class="muted"><small title="<?php echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getParent()->get('createdtime'));?>
"><?php echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getParent()->get('createdtime'));?>
</small></p></span></div></li><?php }elseif($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isUpdate()){?><li><div><span><strong><?php echo $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getModifiedBy()->getDisplayName();?>
</strong> <?php echo vtranslate('LBL_UPDATED',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</span><span class="pull-right"><p class="muted"><small title="<?php echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getActivityTime());?>
"><?php echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getActivityTime());?>
</small></p></span></div><?php  $_smarty_tpl->tpl_vars['FIELDMODEL'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['FIELDMODEL']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getFieldInstances(); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['FIELDMODEL']->key => $_smarty_tpl->tpl_vars['FIELDMODEL']->value){
$_smarty_tpl->tpl_vars['FIELDMODEL']->_loop = true;
?><?php if ($_smarty_tpl->tpl_vars['FIELDMODEL']->value&&$_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance()&&$_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance()->isViewable()&&$_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance()->getDisplayType()!='5'){?><div class='font-x-small updateInfoContainer'><i><?php echo vtranslate($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getName(),$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</i> :&nbsp;<?php if ($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('prevalue')!=''&&$_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue')!=''&&!($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance()->getFieldDataType()=='reference'&&($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue')=='0'||$_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('prevalue')=='0'))){?>&nbsp;<?php echo vtranslate('LBL_FROM');?>
 <b style="white-space:pre;"><?php echo Vtiger_Util_Helper::toVtiger6SafeHTML($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getDisplayValue(decode_html($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('prevalue'))));?>
</b><?php }elseif($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue')==''||($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance()->getFieldDataType()=='reference'&&$_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue')=='0')){?>&nbsp; <b> <?php echo vtranslate('LBL_DELETED');?>
 </b> ( <del><?php echo Vtiger_Util_Helper::toVtiger6SafeHTML($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getDisplayValue(decode_html($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('prevalue'))));?>
</del> )<?php }else{ ?>&nbsp;<?php echo vtranslate('LBL_CHANGED');?>
<?php }?><?php if ($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue')!=''&&!($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance()->getFieldDataType()=='reference'&&$_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue')=='0')){?>&nbsp;<?php echo vtranslate('LBL_TO');?>
&nbsp;<b style="white-space:pre;"><?php echo Vtiger_Util_Helper::toVtiger6SafeHTML($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getDisplayValue(decode_html($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue'))));?>
</b><?php }?></div><?php }?><?php } ?></li><?php }elseif(($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRelationLink()||$_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRelationUnLink())){?><li><div class="row-fluid"><?php $_smarty_tpl->tpl_vars['RELATION'] = new Smarty_variable($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getRelationInstance(), null, 0);?><span><?php echo vtranslate($_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getModuleName(),$_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getModuleName());?>
</span> <span><?php if ($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRelationLink()){?><?php echo vtranslate('LBL_ADDED',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
<?php }else{ ?><?php echo vtranslate('LBL_REMOVED',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
<?php }?> </span><span><?php if ($_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getModuleName()=='Calendar'){?><?php if (isPermitted('Calendar','DetailView',$_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getId())=='yes'){?> <strong><?php echo $_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getName();?>
</strong> <?php }else{ ?> <?php }?><?php }else{ ?> <strong><?php echo $_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getName();?>
</strong> <?php }?></span><span class="pull-right"><p class="muted"><small title="<?php echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['RELATION']->value->get('changedon'));?>
"><?php echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['RELATION']->value->get('changedon'));?>
</small></p></span></div></li><?php }elseif($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRestore()){?><li></li><?php }?><?php }?><?php } ?></ul><?php }else{ ?><div class="summaryWidgetContainer"><p class="textAlignCenter"><?php echo vtranslate('LBL_NO_RECENT_UPDATES');?>
</p></div><?php }?></div><div class="row-fluid" id="moreLink"><?php if ($_smarty_tpl->tpl_vars['PAGING_MODEL']->value->isNextPageExists()){?><div class="pull-right"><a href="javascript:void(0)" class="moreRecentUpdates"><?php echo vtranslate('LBL_MORE',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
..</a></div><?php }?></div><span class="clearfix"></span></div><?php }} ?>
    function content_56755f20e4998($_smarty_tpl)
    {
        ?>

<div style='padding:5px;'>
<?php 
        if ($_smarty_tpl->tpl_vars['HISTORIES']->value != false) {
            ?>
	<?php 
            $_smarty_tpl->tpl_vars['HISTORY'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['HISTORY']->_loop = false;
            $_smarty_tpl->tpl_vars[$_smarty_tpl->tpl_vars['index']->value] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['HISTORIES']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['HISTORY']->key => $_smarty_tpl->tpl_vars['HISTORY']->value) {
                $_smarty_tpl->tpl_vars['HISTORY']->_loop = true;
                $_smarty_tpl->tpl_vars[$_smarty_tpl->tpl_vars['index']->value]->value = $_smarty_tpl->tpl_vars['HISTORY']->key;
                ?>
		<?php 
                $_smarty_tpl->tpl_vars['MODELNAME'] = new Smarty_variable(get_class($_smarty_tpl->tpl_vars['HISTORY']->value), null, 0);
                ?>
		<?php 
                if ($_smarty_tpl->tpl_vars['MODELNAME']->value == 'ModTracker_Record_Model') {
                    ?>
			<?php 
                    $_smarty_tpl->tpl_vars['USER'] = new Smarty_variable($_smarty_tpl->tpl_vars['HISTORY']->value->getModifiedBy(), null, 0);
                    ?>
			<?php 
                    $_smarty_tpl->tpl_vars['TIME'] = new Smarty_variable($_smarty_tpl->tpl_vars['HISTORY']->value->getActivityTime(), null, 0);
                    ?>
			<?php 
                    $_smarty_tpl->tpl_vars['PARENT'] = new Smarty_variable($_smarty_tpl->tpl_vars['HISTORY']->value->getParent(), null, 0);
                    ?>
			<?php 
                    $_smarty_tpl->tpl_vars['MOD_NAME'] = new Smarty_variable($_smarty_tpl->tpl_vars['HISTORY']->value->getParent()->getModule()->getName(), null, 0);
                    ?>
			<?php 
                    $_smarty_tpl->tpl_vars['SINGLE_MODULE_NAME'] = new Smarty_variable('SINGLE_' . $_smarty_tpl->tpl_vars['MOD_NAME']->value, null, 0);
                    ?>
			<?php 
                    $_smarty_tpl->tpl_vars['TRANSLATED_MODULE_NAME'] = new Smarty_variable(vtranslate($_smarty_tpl->tpl_vars['SINGLE_MODULE_NAME']->value, $_smarty_tpl->tpl_vars['MOD_NAME']->value), null, 0);
                    ?>
			<?php 
                    $_smarty_tpl->tpl_vars['PROCEED'] = new Smarty_variable(true, null, 0);
                    ?>
			<?php 
                    if ($_smarty_tpl->tpl_vars['HISTORY']->value->isRelationLink() || $_smarty_tpl->tpl_vars['HISTORY']->value->isRelationUnLink()) {
                        ?>
				<?php 
                        $_smarty_tpl->tpl_vars['RELATION'] = new Smarty_variable($_smarty_tpl->tpl_vars['HISTORY']->value->getRelationInstance(), null, 0);
                        ?>
				<?php 
                        if (!$_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()) {
                            ?>
					<?php 
                            $_smarty_tpl->tpl_vars['PROCEED'] = new Smarty_variable(false, null, 0);
                            ?>
				<?php 
                        }
                        ?>
			<?php 
                    }
                    ?>
			<?php 
                    if ($_smarty_tpl->tpl_vars['PROCEED']->value) {
                        ?>
				<div class="row-fluid">
					<div class='span1'>
						<img width='24px' src="<?php 
                        echo vimage_path($_smarty_tpl->tpl_vars['MOD_NAME']->value . '.png');
                        ?>
" alt="<?php 
                        echo $_smarty_tpl->tpl_vars['TRANSLATED_MODULE_NAME']->value;
                        ?>
" title="<?php 
                        echo $_smarty_tpl->tpl_vars['TRANSLATED_MODULE_NAME']->value;
                        ?>
" />&nbsp;&nbsp;
					</div>
					<div class="span11">
					<p class="pull-right muted" style="padding-right:5px;"><small title="<?php 
                        echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['TIME']->value);
                        ?>
"><?php 
                        echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['TIME']->value);
                        ?>
</small></p>
					<?php 
                        $_smarty_tpl->tpl_vars['DETAILVIEW_URL'] = new Smarty_variable($_smarty_tpl->tpl_vars['PARENT']->value->getDetailViewUrl(), null, 0);
                        ?>
					<?php 
                        if ($_smarty_tpl->tpl_vars['HISTORY']->value->isUpdate()) {
                            ?>
						<?php 
                            $_smarty_tpl->tpl_vars['FIELDS'] = new Smarty_variable($_smarty_tpl->tpl_vars['HISTORY']->value->getFieldInstances(), null, 0);
                            ?>
						<div class="">
							<div><b><?php 
                            echo $_smarty_tpl->tpl_vars['USER']->value->getName();
                            ?>
</b> <?php 
                            echo vtranslate('LBL_UPDATED');
                            ?>
 <a class="cursorPointer" <?php 
                            if (stripos($_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value, 'javascript:') === 0) {
                                ?>
								onclick='<?php 
                                echo substr($_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value, strlen("javascript:"));
                                ?>
' <?php 
                            } else {
                                ?>
 onclick='window.location.href="<?php 
                                echo $_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value;
                                ?>
"' <?php 
                            }
                            ?>
>
								<?php 
                            echo $_smarty_tpl->tpl_vars['PARENT']->value->getName();
                            ?>
</a>
							</div>
							<?php 
                            $_smarty_tpl->tpl_vars['FIELD'] = new Smarty_Variable();
                            $_smarty_tpl->tpl_vars['FIELD']->_loop = false;
                            $_smarty_tpl->tpl_vars['INDEX'] = new Smarty_Variable();
                            $_from = $_smarty_tpl->tpl_vars['FIELDS']->value;
                            if (!is_array($_from) && !is_object($_from)) {
                                settype($_from, 'array');
                            }
                            foreach ($_from as $_smarty_tpl->tpl_vars['FIELD']->key => $_smarty_tpl->tpl_vars['FIELD']->value) {
                                $_smarty_tpl->tpl_vars['FIELD']->_loop = true;
                                $_smarty_tpl->tpl_vars['INDEX']->value = $_smarty_tpl->tpl_vars['FIELD']->key;
                                ?>
							<?php 
                                if ($_smarty_tpl->tpl_vars['INDEX']->value < 2) {
                                    ?>
								<?php 
                                    if ($_smarty_tpl->tpl_vars['FIELD']->value && $_smarty_tpl->tpl_vars['FIELD']->value->getFieldInstance() && $_smarty_tpl->tpl_vars['FIELD']->value->getFieldInstance()->isViewableInDetailView()) {
                                        ?>
								<div class='font-x-small'>
									<i><?php 
                                        echo vtranslate($_smarty_tpl->tpl_vars['FIELD']->value->getName(), $_smarty_tpl->tpl_vars['FIELD']->value->getModuleName());
                                        ?>
</i>
									<?php 
                                        if ($_smarty_tpl->tpl_vars['FIELD']->value->get('prevalue') != '' && $_smarty_tpl->tpl_vars['FIELD']->value->get('postvalue') != '' && !($_smarty_tpl->tpl_vars['FIELD']->value->getFieldInstance()->getFieldDataType() == 'reference' && ($_smarty_tpl->tpl_vars['FIELD']->value->get('postvalue') == '0' || $_smarty_tpl->tpl_vars['FIELD']->value->get('prevalue') == '0'))) {
                                            ?>
										&nbsp;<?php 
                                            echo vtranslate('LBL_FROM');
                                            ?>
 <b><?php 
                                            echo Vtiger_Util_Helper::toVtiger6SafeHTML($_smarty_tpl->tpl_vars['FIELD']->value->getDisplayValue(decode_html($_smarty_tpl->tpl_vars['FIELD']->value->get('prevalue'))));
                                            ?>
</b>
									<?php 
                                        } elseif ($_smarty_tpl->tpl_vars['FIELD']->value->get('postvalue') == '' || $_smarty_tpl->tpl_vars['FIELD']->value->getFieldInstance()->getFieldDataType() == 'reference' && $_smarty_tpl->tpl_vars['FIELD']->value->get('postvalue') == '0') {
                                            ?>
	                                    &nbsp; <b> <?php 
                                            echo vtranslate('LBL_DELETED');
                                            ?>
 </b> ( <del><?php 
                                            echo Vtiger_Util_Helper::toVtiger6SafeHTML($_smarty_tpl->tpl_vars['FIELD']->value->getDisplayValue(decode_html($_smarty_tpl->tpl_vars['FIELD']->value->get('prevalue'))));
                                            ?>
</del> )
	                                <?php 
                                        } else {
                                            ?>
										&nbsp;<?php 
                                            echo vtranslate('LBL_CHANGED');
                                            ?>

									<?php 
                                        }
                                        ?>
	                                <?php 
                                        if ($_smarty_tpl->tpl_vars['FIELD']->value->get('postvalue') != '' && !($_smarty_tpl->tpl_vars['FIELD']->value->getFieldInstance()->getFieldDataType() == 'reference' && $_smarty_tpl->tpl_vars['FIELD']->value->get('postvalue') == '0')) {
                                            ?>
										<?php 
                                            echo vtranslate('LBL_TO');
                                            ?>
 <b><?php 
                                            echo Vtiger_Util_Helper::toVtiger6SafeHTML($_smarty_tpl->tpl_vars['FIELD']->value->getDisplayValue(decode_html($_smarty_tpl->tpl_vars['FIELD']->value->get('postvalue'))));
                                            ?>
</b>
	                                <?php 
                                        }
                                        ?>
    
								</div>
								<?php 
                                    }
                                    ?>
							<?php 
                                } else {
                                    ?>
								<a href="<?php 
                                    echo $_smarty_tpl->tpl_vars['PARENT']->value->getUpdatesUrl();
                                    ?>
"><?php 
                                    echo vtranslate('LBL_MORE');
                                    ?>
</a>
								<?php 
                                    break 1;
                                    ?>
							<?php 
                                }
                                ?>
							<?php 
                            }
                            ?>
						</div>
					<?php 
                        } elseif ($_smarty_tpl->tpl_vars['HISTORY']->value->isCreate()) {
                            ?>
						<div class=''  style='margin-top:5px'>
							<b><?php 
                            echo $_smarty_tpl->tpl_vars['USER']->value->getName();
                            ?>
</b> <?php 
                            echo vtranslate('LBL_ADDED');
                            ?>
 <a class="cursorPointer" <?php 
                            if (stripos($_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value, 'javascript:') === 0) {
                                ?>
								onclick='<?php 
                                echo substr($_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value, strlen("javascript:"));
                                ?>
' <?php 
                            } else {
                                ?>
 onclick='window.location.href="<?php 
                                echo $_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value;
                                ?>
"' <?php 
                            }
                            ?>
>
								<?php 
                            echo $_smarty_tpl->tpl_vars['PARENT']->value->getName();
                            ?>
</a>
						</div>
					<?php 
                        } elseif ($_smarty_tpl->tpl_vars['HISTORY']->value->isRelationLink() || $_smarty_tpl->tpl_vars['HISTORY']->value->isRelationUnLink()) {
                            ?>
	
	
	
	
	
	
	
	
	
	
	
	
						<?php 
                            $_smarty_tpl->tpl_vars['RELATION'] = new Smarty_variable($_smarty_tpl->tpl_vars['HISTORY']->value->getRelationInstance(), null, 0);
                            ?>
						<?php 
                            $_smarty_tpl->tpl_vars['LINKED_RECORD_DETAIL_URL'] = new Smarty_variable($_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getDetailViewUrl(), null, 0);
                            ?>
						<?php 
                            $_smarty_tpl->tpl_vars['PARENT_DETAIL_URL'] = new Smarty_variable($_smarty_tpl->tpl_vars['RELATION']->value->getParent()->getParent()->getDetailViewUrl(), null, 0);
                            ?>
						<div class='' style='margin-top:5px'>
							<b><?php 
                            echo $_smarty_tpl->tpl_vars['USER']->value->getName();
                            ?>
</b>
								<?php 
                            if ($_smarty_tpl->tpl_vars['HISTORY']->value->isRelationLink()) {
                                ?>
									<?php 
                                echo vtranslate('LBL_ADDED', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
                                ?>

								<?php 
                            } else {
                                ?>
									<?php 
                                echo vtranslate('LBL_REMOVED', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
                                ?>

								<?php 
                            }
                            ?>
								<?php 
                            if ($_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getModuleName() == 'Calendar') {
                                ?>
									<?php 
                                if (isPermitted('Calendar', 'DetailView', $_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getId()) == 'yes') {
                                    ?>
										<a class="cursorPointer" <?php 
                                    if (stripos($_smarty_tpl->tpl_vars['LINKED_RECORD_DETAIL_URL']->value, 'javascript:') === 0) {
                                        ?>
 onclick='<?php 
                                        echo substr($_smarty_tpl->tpl_vars['LINKED_RECORD_DETAIL_URL']->value, strlen("javascript:"));
                                        ?>
'
											<?php 
                                    } else {
                                        ?>
 onclick='window.location.href="<?php 
                                        echo $_smarty_tpl->tpl_vars['LINKED_RECORD_DETAIL_URL']->value;
                                        ?>
"' <?php 
                                    }
                                    ?>
><?php 
                                    echo $_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getName();
                                    ?>
</a>
									<?php 
                                } else {
                                    ?>
										<?php 
                                    echo vtranslate($_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getModuleName(), $_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getModuleName());
                                    ?>

									<?php 
                                }
                                ?>
								<?php 
                            } else {
                                ?>
								 <a class="cursorPointer" <?php 
                                if (stripos($_smarty_tpl->tpl_vars['LINKED_RECORD_DETAIL_URL']->value, 'javascript:') === 0) {
                                    ?>
 onclick='<?php 
                                    echo substr($_smarty_tpl->tpl_vars['LINKED_RECORD_DETAIL_URL']->value, strlen("javascript:"));
                                    ?>
'
									<?php 
                                } else {
                                    ?>
 onclick='window.location.href="<?php 
                                    echo $_smarty_tpl->tpl_vars['LINKED_RECORD_DETAIL_URL']->value;
                                    ?>
"' <?php 
                                }
                                ?>
><?php 
                                echo $_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getName();
                                ?>
</a>
								<?php 
                            }
                            echo vtranslate('LBL_FOR');
                            ?>
 <a class="cursorPointer" <?php 
                            if (stripos($_smarty_tpl->tpl_vars['PARENT_DETAIL_URL']->value, 'javascript:') === 0) {
                                ?>
								onclick='<?php 
                                echo substr($_smarty_tpl->tpl_vars['PARENT_DETAIL_URL']->value, strlen("javascript:"));
                                ?>
' <?php 
                            } else {
                                ?>
 onclick='window.location.href="<?php 
                                echo $_smarty_tpl->tpl_vars['PARENT_DETAIL_URL']->value;
                                ?>
"' <?php 
                            }
                            ?>
>
								<?php 
                            echo $_smarty_tpl->tpl_vars['RELATION']->value->getParent()->getParent()->getName();
                            ?>
</a>
						</div>
					<?php 
                        } elseif ($_smarty_tpl->tpl_vars['HISTORY']->value->isRestore()) {
                            ?>
						<div class=''  style='margin-top:5px'>
							<b><?php 
                            echo $_smarty_tpl->tpl_vars['USER']->value->getName();
                            ?>
</b> <?php 
                            echo vtranslate('LBL_RESTORED');
                            ?>
 <a class="cursorPointer" <?php 
                            if (stripos($_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value, 'javascript:') === 0) {
                                ?>
								onclick='<?php 
                                echo substr($_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value, strlen("javascript:"));
                                ?>
' <?php 
                            } else {
                                ?>
 onclick='window.location.href="<?php 
                                echo $_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value;
                                ?>
"' <?php 
                            }
                            ?>
>
								<?php 
                            echo $_smarty_tpl->tpl_vars['PARENT']->value->getName();
                            ?>
</a>
						</div>
					<?php 
                        } elseif ($_smarty_tpl->tpl_vars['HISTORY']->value->isDelete()) {
                            ?>
						<div class=''  style='margin-top:5px'>
							<b><?php 
                            echo $_smarty_tpl->tpl_vars['USER']->value->getName();
                            ?>
</b> <?php 
                            echo vtranslate('LBL_DELETED');
                            ?>
 <a class="cursorPointer" <?php 
                            if (stripos($_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value, 'javascript:') === 0) {
                                ?>
								onclick='<?php 
                                echo substr($_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value, strlen("javascript:"));
                                ?>
' <?php 
                            } else {
                                ?>
 onclick='window.location.href="<?php 
                                echo $_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value;
                                ?>
"' <?php 
                            }
                            ?>
>
								<?php 
                            echo $_smarty_tpl->tpl_vars['PARENT']->value->getName();
                            ?>
</a>
						</div>
					<?php 
                        }
                        ?>
					</div>
				</div>
			<?php 
                    }
                    ?>
			<?php 
                } elseif ($_smarty_tpl->tpl_vars['MODELNAME']->value == 'ModComments_Record_Model') {
                    ?>
			<div class="row-fluid">
				<div class="span1">
					<image width='24px' src="<?php 
                    echo vimage_path('Comments.png');
                    ?>
"/>&nbsp;&nbsp;
				</div>
				<div class="span11">
					<?php 
                    $_smarty_tpl->tpl_vars['COMMENT_TIME'] = new Smarty_variable($_smarty_tpl->tpl_vars['HISTORY']->value->getCommentedTime(), null, 0);
                    ?>
					<p class="pull-right muted" style="padding-right:5px;"><small title="<?php 
                    echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['COMMENT_TIME']->value);
                    ?>
"><?php 
                    echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['COMMENT_TIME']->value);
                    ?>
</small></p>
					<div>
						<b><?php 
                    echo $_smarty_tpl->tpl_vars['HISTORY']->value->getCommentedByModel()->getName();
                    ?>
</b> <?php 
                    echo vtranslate('LBL_COMMENTED');
                    ?>
 <?php 
                    echo vtranslate('LBL_ON');
                    ?>
 <a class="textOverflowEllipsis" href="<?php 
                    echo $_smarty_tpl->tpl_vars['HISTORY']->value->getParentRecordModel()->getDetailViewUrl();
                    ?>
"><?php 
                    echo $_smarty_tpl->tpl_vars['HISTORY']->value->getParentRecordModel()->getName();
                    ?>
</a>
					</div>
					<div class='font-x-small'><i>"<?php 
                    echo nl2br($_smarty_tpl->tpl_vars['HISTORY']->value->get('commentcontent'));
                    ?>
"</i></div>
				</div>
			</div>
		<?php 
                }
                ?>
	<?php 
            }
            ?>

	<?php 
            if ($_smarty_tpl->tpl_vars['NEXTPAGE']->value) {
                ?>
	<div class="row-fluid">
		<div class="span12">
			<a href="javascript:;" class="load-more" data-page="<?php 
                echo $_smarty_tpl->tpl_vars['PAGE']->value;
                ?>
" data-nextpage="<?php 
                echo $_smarty_tpl->tpl_vars['NEXTPAGE']->value;
                ?>
"><?php 
                echo vtranslate('LBL_MORE');
                ?>
...</a>
		</div>
	</div>
	<?php 
            }
            ?>

<?php 
        } else {
            ?>
	<span class="noDataMsg">
		<?php 
            echo vtranslate('LBL_NO_UPDATES_OR_COMMENTS', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            ?>

	</span>
<?php 
        }
        ?>
</div>
<?php 
    }
    function content_5694bd75b115c($_smarty_tpl)
    {
        ?>

<div>
	<?php 
        $_smarty_tpl->tpl_vars['ACTIVITY'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['ACTIVITY']->_loop = false;
        $_smarty_tpl->tpl_vars['INDEX'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['ACTIVITIES']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['ACTIVITY']->key => $_smarty_tpl->tpl_vars['ACTIVITY']->value) {
            $_smarty_tpl->tpl_vars['ACTIVITY']->_loop = true;
            $_smarty_tpl->tpl_vars['INDEX']->value = $_smarty_tpl->tpl_vars['ACTIVITY']->key;
            ?>
	<div>
		<div class='pull-left'>
			<?php 
            if ($_smarty_tpl->tpl_vars['ACTIVITY']->value->get('activitytype') == 'Task') {
                ?>
				<image src="<?php 
                echo vimage_path('Tasks.png');
                ?>
" width="24px"/>&nbsp;&nbsp;
			<?php 
            } else {
                ?>
				<image src="<?php 
                echo vimage_path('Calendar.png');
                ?>
" width="24px" />&nbsp;&nbsp;
			<?php 
            }
            ?>
		</div>
		<div>
			<div class='pull-left' style='margin-top:5px'>
				<?php 
            $_smarty_tpl->tpl_vars['PARENT_ID'] = new Smarty_variable($_smarty_tpl->tpl_vars['ACTIVITY']->value->get('parent_id'), null, 0);
            ?>
				<?php 
            $_smarty_tpl->tpl_vars['CONTACT_ID'] = new Smarty_variable($_smarty_tpl->tpl_vars['ACTIVITY']->value->get('contact_id'), null, 0);
            ?>
				<a href="<?php 
            echo $_smarty_tpl->tpl_vars['ACTIVITY']->value->getDetailViewUrl();
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['ACTIVITY']->value->get('subject');
            ?>
</a><?php 
            if ($_smarty_tpl->tpl_vars['PARENT_ID']->value) {
                ?>
 <?php 
                echo vtranslate('LBL_FOR');
                ?>
 <?php 
                echo $_smarty_tpl->tpl_vars['ACTIVITY']->value->getDisplayValue('parent_id');
            } elseif ($_smarty_tpl->tpl_vars['CONTACT_ID']->value) {
                ?>
 <?php 
                echo vtranslate('LBL_FOR');
                ?>
 <?php 
                echo $_smarty_tpl->tpl_vars['ACTIVITY']->value->getDisplayValue('contact_id');
            }
            ?>
			</div>
				<?php 
            $_smarty_tpl->tpl_vars['START_DATE'] = new Smarty_variable($_smarty_tpl->tpl_vars['ACTIVITY']->value->get('date_start'), null, 0);
            ?>
				<?php 
            $_smarty_tpl->tpl_vars['START_TIME'] = new Smarty_variable($_smarty_tpl->tpl_vars['ACTIVITY']->value->get('time_start'), null, 0);
            ?>
				
				<?php 
            $_smarty_tpl->tpl_vars['DUE_DATE'] = new Smarty_variable($_smarty_tpl->tpl_vars['ACTIVITY']->value->get('due_date'), null, 0);
            ?>
				<?php 
            $_smarty_tpl->tpl_vars['DUE_TIME'] = new Smarty_variable($_smarty_tpl->tpl_vars['ACTIVITY']->value->get('time_end'), null, 0);
            ?>
			<p class='pull-right muted' style='margin-top:5px;padding-right:5px;'><small title="<?php 
            echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['START_DATE']->value . " " . $_smarty_tpl->tpl_vars['START_TIME']->value);
            ?>
 <?php 
            echo vtranslate('LBL_TO');
            ?>
 <?php 
            echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['DUE_DATE']->value . " " . $_smarty_tpl->tpl_vars['DUE_TIME']->value);
            ?>
"><?php 
            echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['START_DATE']->value . " " . $_smarty_tpl->tpl_vars['START_TIME']->value);
            ?>
</small></p>
			<div class='clearfix'></div>
		</div>
		<div class='clearfix'></div>
	</div>
	<?php 
        }
        if (!$_smarty_tpl->tpl_vars['ACTIVITY']->_loop) {
            ?>
		<span class="noDataMsg">
			<?php 
            if ($_REQUEST['name'] == 'OverdueActivities') {
                ?>
				<?php 
                echo vtranslate('LBL_NO_OVERDUE_ACTIVITIES', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
                ?>

			<?php 
            } else {
                ?>
				<?php 
                echo vtranslate('LBL_NO_SCHEDULED_ACTIVITIES', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
                ?>

			<?php 
            }
            ?>
		</span>
	<?php 
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['PAGING']->value->get('nextPageExists') == 'true') {
            ?>
	<div class='pull-right' style='margin-top:5px;padding-right:5px;'>
        <a href="javascript:;" name="history_more" data-url="<?php 
            echo $_smarty_tpl->tpl_vars['WIDGET']->value->getUrl();
            ?>
&page=<?php 
            echo $_smarty_tpl->tpl_vars['PAGING']->value->getNextPage();
            ?>
"><?php 
            echo vtranslate('LBL_MORE');
            ?>
...</a>
        <br />
        <br />
        <br />
        <br />
	</div>
<?php 
        } else {
            ?>
    <br />
    <br />
    <br />
    <br />
<?php 
        }
        ?>
</div><?php 
    }
    function content_558c2a3b64ff1($_smarty_tpl)
    {
        ?>
<hr>
<div class="commentDiv cursorPointer">
	<div class="singleComment">
		<div class="commentInfoHeader row-fluid"  data-commentid="<?php 
        echo $_smarty_tpl->tpl_vars['COMMENT']->value->getId();
        ?>
" data-parentcommentid="<?php 
        echo $_smarty_tpl->tpl_vars['COMMENT']->value->get('parent_comments');
        ?>
">
			<div class="commentTitle" id="<?php 
        echo $_smarty_tpl->tpl_vars['COMMENT']->value->getId();
        ?>
">
				<?php 
        $_smarty_tpl->tpl_vars['PARENT_COMMENT_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['COMMENT']->value->getParentCommentModel(), null, 0);
        ?>
				<?php 
        $_smarty_tpl->tpl_vars['CHILD_COMMENTS_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['COMMENT']->value->getChildComments(), null, 0);
        ?>
				<div class="row-fluid">
					<div class="span1">
						<?php 
        $_smarty_tpl->tpl_vars['IMAGE_PATH'] = new Smarty_variable($_smarty_tpl->tpl_vars['COMMENT']->value->getImagePath(), null, 0);
        ?>
						<img class="alignMiddle pull-left" src="<?php 
        if (!empty($_smarty_tpl->tpl_vars['IMAGE_PATH']->value)) {
            echo $_smarty_tpl->tpl_vars['IMAGE_PATH']->value;
        } else {
            echo vimage_path('DefaultUserIcon.png');
        }
        ?>
">
					</div>
					<div class="span11 commentorInfo">
						<?php 
        $_smarty_tpl->tpl_vars['COMMENTOR'] = new Smarty_variable($_smarty_tpl->tpl_vars['COMMENT']->value->getCommentedByModel(), null, 0);
        ?>
						<div class="inner">
							<span class="commentorName pull-left"><strong><?php 
        echo $_smarty_tpl->tpl_vars['COMMENTOR']->value->getName();
        ?>
</strong></span>
							<span class="pull-right">
								<p class="muted"><em><?php 
        echo vtranslate('LBL_COMMENTED', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
        ?>
</em>&nbsp;<small title="<?php 
        echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['COMMENT']->value->getCommentedTime());
        ?>
" class="commentModifiedTime"><?php 
        echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['COMMENT']->value->getCommentedTime());
        ?>
</small></p>
							</span>
							<div class="clearfix"></div>
						</div>
						<div class="commentInfoContent">
							<?php 
        echo nl2br($_smarty_tpl->tpl_vars['COMMENT']->value->get('commentcontent'));
        ?>

						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row-fluid commentActionsContainer">
			<div class="row-fluid commentActionsDiv">
				<span class="pull-right commentActions">
					<?php 
        $_smarty_tpl->tpl_vars['CHILD_COMMENTS_COUNT'] = new Smarty_variable($_smarty_tpl->tpl_vars['COMMENT']->value->getChildCommentsCount(), null, 0);
        ?>
					<span>
						<a class="cursorPointer replyComment">
							<i class="icon-share-alt"></i>
							<?php 
        echo vtranslate('LBL_REPLY', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
        ?>

						</a>
						<?php 
        if ($_smarty_tpl->tpl_vars['CURRENTUSER']->value->getId() == $_smarty_tpl->tpl_vars['COMMENT']->value->get('userid')) {
            ?>
							&nbsp;<span style="color:black">|</span>&nbsp;
							<a class="cursorPointer editComment feedback">
								<?php 
            echo vtranslate('LBL_EDIT', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            ?>

							</a>
						<?php 
        }
        ?>
					</span>
					<?php 
        if ($_smarty_tpl->tpl_vars['CHILD_COMMENTS_COUNT']->value != 0) {
            ?>
						&nbsp;<span style="color:black">|</span>&nbsp;
						<span class="hide viewThreadBlock" data-child-comments-count="<?php 
            echo $_smarty_tpl->tpl_vars['COMMENT']->value->getChildCommentsCount();
            ?>
">
								<a class="cursorPointer viewThread">
									<span class="childCommentsCount"><?php 
            echo $_smarty_tpl->tpl_vars['COMMENT']->value->getChildCommentsCount();
            ?>
</span>&nbsp;<?php 
            if ($_smarty_tpl->tpl_vars['CHILD_COMMENTS_COUNT']->value == 1) {
                echo vtranslate('LBL_REPLY', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            } else {
                echo vtranslate('LBL_REPLIES', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            }
            ?>
									<img class="alignMiddle" src="<?php 
            echo vimage_path('rightArrowSmall.png');
            ?>
" />
								</a>
						</span>
						<span class="hideThreadBlock" data-child-comments-count="<?php 
            echo $_smarty_tpl->tpl_vars['COMMENT']->value->getChildCommentsCount();
            ?>
">
							<a class="cursorPointer hideThread">
								<span class="childCommentsCount"><?php 
            echo $_smarty_tpl->tpl_vars['COMMENT']->value->getChildCommentsCount();
            ?>
</span>&nbsp;<?php 
            if ($_smarty_tpl->tpl_vars['CHILD_COMMENTS_COUNT']->value == 1) {
                echo vtranslate('LBL_REPLY', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            } else {
                echo vtranslate('LBL_REPLIES', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            }
            ?>
								<img class="alignMiddle" src="<?php 
            echo vimage_path('downArrowSmall.png');
            ?>
" />
							</a>
						</span>
					<?php 
        }
        ?>
				</span>

			</div>
			<?php 
        $_smarty_tpl->tpl_vars["REASON_TO_EDIT"] = new Smarty_variable($_smarty_tpl->tpl_vars['COMMENT']->value->get('reasontoedit'), null, 0);
        ?>
			<div class="row-fluid"  name="editStatus">
				<hr style="border-color: gray;border-style: dashed;">
				<div class="row-fluid pushUpandDown2per">
					<span class="<?php 
        if (empty($_smarty_tpl->tpl_vars['REASON_TO_EDIT']->value)) {
            ?>
hide<?php 
        }
        ?>
 span6">
						[ <?php 
        echo vtranslate('LBL_EDIT_REASON', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
        ?>
 ] : <span  name="editReason" class="textOverflowEllipsis"><?php 
        echo nl2br($_smarty_tpl->tpl_vars['REASON_TO_EDIT']->value);
        ?>
</span>
					</span>
					<?php 
        if ($_smarty_tpl->tpl_vars['COMMENT']->value->getCommentedTime() != $_smarty_tpl->tpl_vars['COMMENT']->value->getModifiedTime()) {
            ?>
						<span class="<?php 
            if (empty($_smarty_tpl->tpl_vars['REASON_TO_EDIT']->value)) {
                ?>
row-fluid<?php 
            } else {
                ?>
 span6<?php 
            }
            ?>
">
							<span class="pull-right">
								<p class="muted"><em><?php 
            echo vtranslate('LBL_MODIFIED', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            ?>
</em>&nbsp;<small title="<?php 
            echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['COMMENT']->value->getModifiedTime());
            ?>
"><?php 
            echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['COMMENT']->value->getModifiedTime());
            ?>
</small></p>
							</span>
						</span>
					<?php 
        }
        ?>
				</div>
			</div>
		</div>
					</div>
				</div>
<?php 
    }
    function content_5658a646f171d($_smarty_tpl)
    {
        ?>
<div class="recentActivitiesContainer"><div><?php 
        if (!empty($_smarty_tpl->tpl_vars['RECENT_ACTIVITIES']->value)) {
            ?>
<ul class="unstyled"><?php 
            $_smarty_tpl->tpl_vars['RECENT_ACTIVITY'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['RECENT_ACTIVITIES']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->key => $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value) {
                $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->_loop = true;
                if ($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isCreate()) {
                    ?>
<li><div><span><strong><?php 
                    echo $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getModifiedBy()->getName();
                    ?>
</strong> <?php 
                    echo vtranslate('LBL_CREATED', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
                    ?>
</span><span class="pull-right"><p class="muted"><small title="<?php 
                    echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getParent()->get('createdtime'));
                    ?>
"><?php 
                    echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getParent()->get('createdtime'));
                    ?>
</small></p></span></div></li><?php 
                } elseif ($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isUpdate()) {
                    ?>
<li><div><span><strong><?php 
                    echo $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getModifiedBy()->getDisplayName();
                    ?>
</strong> <?php 
                    echo vtranslate('LBL_UPDATED', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
                    ?>
</span><span class="pull-right"><p class="muted"><small title="<?php 
                    echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getActivityTime());
                    ?>
"><?php 
                    echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getActivityTime());
                    ?>
</small></p></span></div><?php 
                    $_smarty_tpl->tpl_vars['FIELDMODEL'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['FIELDMODEL']->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getFieldInstances();
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars['FIELDMODEL']->key => $_smarty_tpl->tpl_vars['FIELDMODEL']->value) {
                        $_smarty_tpl->tpl_vars['FIELDMODEL']->_loop = true;
                        if ($_smarty_tpl->tpl_vars['FIELDMODEL']->value && $_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance() && $_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance()->isViewableInDetailView()) {
                            ?>
<div class='font-x-small updateInfoContainer'><i><?php 
                            echo vtranslate($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getName(), $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
                            ?>
</i> :&nbsp;<?php 
                            if ($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('prevalue') != '') {
                                echo $_smarty_tpl->tpl_vars['FIELDMODEL']->value->getDisplayValue($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('prevalue'));
                                ?>
&nbsp;<?php 
                                echo vtranslate('LBL_TO', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
                                ?>
&nbsp;<?php 
                            } else {
                            }
                            ?>
<b><?php 
                            echo $_smarty_tpl->tpl_vars['FIELDMODEL']->value->getDisplayValue($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue'));
                            ?>
</b></div><?php 
                        }
                    }
                    ?>
</li><?php 
                } elseif ($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRelationLink()) {
                    ?>
<li><div class="row-fluid"><?php 
                    $_smarty_tpl->tpl_vars['RELATION'] = new Smarty_variable($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getRelationInstance(), null, 0);
                    ?>
<span><?php 
                    echo vtranslate($_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getModuleName(), $_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getModuleName());
                    ?>
 <?php 
                    echo vtranslate('LBL_ADDED', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
                    ?>
 <strong><?php 
                    echo $_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getName();
                    ?>
</strong></span><span class="pull-right"><p class="muted"><small title="<?php 
                    echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->get('createdtime'));
                    ?>
"><?php 
                    echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->get('createdtime'));
                    ?>
</small></p></span></div></li><?php 
                } elseif ($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRelationUnLink()) {
                    ?>
<li><div class="row-fluid"><?php 
                    $_smarty_tpl->tpl_vars['URELATION'] = new Smarty_variable($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getRelationInstance(), null, 0);
                    ?>
<span><?php 
                    echo vtranslate($_smarty_tpl->tpl_vars['URELATION']->value->getUnLinkedRecord()->getModuleName(), $_smarty_tpl->tpl_vars['URELATION']->value->getUnLinkedRecord()->getModuleName());
                    ?>
 <?php 
                    echo vtranslate('LBL_REMOVED', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
                    ?>
 <strong><?php 
                    echo $_smarty_tpl->tpl_vars['URELATION']->value->getUnLinkedRecord()->getName();
                    ?>
</strong></span><span class="pull-right"><p class="muted"><small title="<?php 
                    echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['URELATION']->value->getUnLinkedRecord()->get('modifiedtime'));
                    ?>
"><?php 
                    echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['URELATION']->value->getUnLinkedRecord()->get('modifiedtime'));
                    ?>
</small></p></span></div></li><?php 
                } elseif ($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRestore()) {
                    ?>
<li></li><?php 
                }
            }
            ?>
</ul><?php 
        } else {
            ?>
<div class="summaryWidgetContainer"><p class="textAlignCenter"><?php 
            echo vtranslate('LBL_NO_RECENT_UPDATES');
            ?>
</p></div><?php 
        }
        ?>
</div><?php 
        if ($_smarty_tpl->tpl_vars['PAGING_MODEL']->value->isNextPageExists()) {
            ?>
<div class="row-fluid"><div class="pull-right"><a href="javascript:void(0)" class="moreRecentUpdates"><?php 
            echo vtranslate('LBL_MORE', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            ?>
..</a></div></div><?php 
        }
        ?>
<span class="clearfix"></span></div><?php 
    }
    function content_566fa284bf8b1($_smarty_tpl)
    {
        $_smarty_tpl->tpl_vars['jsModel'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['jsModel']->_loop = false;
        $_smarty_tpl->tpl_vars['index'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['SCRIPTS']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['jsModel']->key => $_smarty_tpl->tpl_vars['jsModel']->value) {
            $_smarty_tpl->tpl_vars['jsModel']->_loop = true;
            $_smarty_tpl->tpl_vars['index']->value = $_smarty_tpl->tpl_vars['jsModel']->key;
            ?>
	<script type="<?php 
            echo $_smarty_tpl->tpl_vars['jsModel']->value->getType();
            ?>
" src="<?php 
            echo $_smarty_tpl->tpl_vars['jsModel']->value->getSrc();
            ?>
"></script>
<?php 
        }
        ?>
<div id = 'sync_message' class='row-fluid' >
    <div class='padding10 span12'>     
        <?php 
        if ($_smarty_tpl->tpl_vars['FIRSTTIME']->value) {
            ?>
            <input type="hidden" id = "firsttime" value = 'no'/>
        <?php 
        } else {
            ?>
            <input type="hidden" id = "firsttime" value = 'yes'/>
        <?php 
        }
        ?>
        <div id='sync_details'></div>
        <?php 
        if ($_smarty_tpl->tpl_vars['STATE']->value == 'home') {
            ?>
            <?php 
            if ($_smarty_tpl->tpl_vars['SYNCTIME']->value) {
                ?>
            <p class="muted" id='synctime'><small title="<?php 
                echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['SYNCTIME']->value);
                ?>
"><?php 
                echo vtranslate('LBL_SYNCRONIZED', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
                ?>
 : <?php 
                echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['SYNCTIME']->value);
                ?>
</small></p>
            <?php 
            } else {
                ?>
                <p class="muted" id='synctime'><small><?php 
                echo vtranslate('LBL_NOT_SYNCRONIZED', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
                ?>
</small></p>    
            <?php 
            }
            ?>
   
       <?php 
        }
        ?>
        <div class='row-fluid'>
            <span class='span0'>&nbsp;</span>
            <button id="sync_button" class="btn btn-success span9"  data-url='index.php?module=Google&view=List&operation=sync&sourcemodule=<?php 
        echo $_smarty_tpl->tpl_vars['SOURCEMODULE']->value;
        ?>
'><b><?php 
        echo vtranslate('LBL_SYNC_BUTTON', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
        ?>
</b></button>
            <?php 
        if ($_smarty_tpl->tpl_vars['SOURCEMODULE']->value == 'Calendar') {
            ?>
 
                <span class="span0"> 
                    <i class="icon-question-sign pushDown" id="popid"  data-placement="right" rel="popover" ></i> 
                </span> 
            <?php 
        }
        ?>
 
            <?php 
        if ($_smarty_tpl->tpl_vars['SOURCEMODULE']->value == 'Contacts') {
            ?>
 
                <span class="span0"> 
                    <a id="syncSetting" data-sourcemodule="<?php 
            echo $_smarty_tpl->tpl_vars['SOURCEMODULE']->value;
            ?>
" title="<?php 
            echo vtranslate('SYNC_SETTINGS', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            ?>
"><i class="icon-cog pushDown" style="margin-top:15px !important;"></i></a> 
                </span> 
            <?php 
        }
        ?>
 
        </div>
        <br />
        <div class='row-fluid <?php 
        if (!$_smarty_tpl->tpl_vars['FIRSTTIME']->value) {
            ?>
hide <?php 
        }
        ?>
' id="removeSyncBlock">
            <span class='span0'>&nbsp;</span>
            <button id="remove_sync" class="btn btn-danger span9"  data-url='index.php?module=Google&view=List&operation=removeSync&sourcemodule=<?php 
        echo $_smarty_tpl->tpl_vars['SOURCEMODULE']->value;
        ?>
'><b><?php 
        echo vtranslate('LBL_REMOVE_SYNC', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
        ?>
</b></button>
            <span class="span0">
                <i class="icon-question-sign pushDown" id="removePop"  data-placement="right" rel="popover" ></i>
            </span>
        </div>
    </div>
        
</div>

<?php 
        if ($_smarty_tpl->tpl_vars['SOURCEMODULE']->value == 'Calendar') {
            ?>
 
    <div id="mappingTable">
        <table  class="table table-condensed table-striped table-bordered "  >
            <thead>
                <tr>
                    <td><b><?php 
            echo vtranslate('APPTITLE', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            ?>
</b></td>
                    <td><b><?php 
            echo vtranslate('EXTENTIONNAME', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            ?>
</b></td>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td><?php 
            echo vtranslate('Subject', $_smarty_tpl->tpl_vars['SOURCEMODULE']->value);
            ?>
</td>
                    <td><?php 
            echo vtranslate('Event Title', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            ?>
</td>
                </tr>
                <tr>
                    <td><?php 
            echo vtranslate('Start Date & Time', $_smarty_tpl->tpl_vars['SOURCEMODULE']->value);
            ?>
</td>
                    <td><?php 
            echo vtranslate('From Date', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            ?>
</td>
                </tr>
                <tr>
                    <td><?php 
            echo vtranslate('End Date & Time', $_smarty_tpl->tpl_vars['SOURCEMODULE']->value);
            ?>
</td>
                    <td><?php 
            echo vtranslate('Until Date', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            ?>
</td>
                </tr>
                <tr>
                    <td><?php 
            echo vtranslate('Description', $_smarty_tpl->tpl_vars['SOURCEMODULE']->value);
            ?>
</td>
                    <td><?php 
            echo vtranslate('Description', $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
            ?>
</td>
                </tr>
            </tbody>
        </table>
    </div>
<?php 
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['STATE']->value == 'CLOSEWINDOW') {
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['DENY']->value) {
                ?>
        <script>
            window.close();
        </script>
    <?php 
            } else {
                ?>
    <script>
        window.opener.sync();
        window.close();
    </script>
    <?php 
            }
        }
        ?>

<?php 
    }
    function content_56755ebd2a656($_smarty_tpl)
    {
        $_smarty_tpl->tpl_vars["totalCount"] = new Smarty_variable(0, null, 0);
        $_smarty_tpl->tpl_vars["totalModulesSearched"] = new Smarty_variable(count($_smarty_tpl->tpl_vars['MATCHING_RECORDS']->value), null, 0);
        $_smarty_tpl->tpl_vars['searchRecords'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['searchRecords']->_loop = false;
        $_smarty_tpl->tpl_vars['module'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['MATCHING_RECORDS']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['searchRecords']->key => $_smarty_tpl->tpl_vars['searchRecords']->value) {
            $_smarty_tpl->tpl_vars['searchRecords']->_loop = true;
            $_smarty_tpl->tpl_vars['module']->value = $_smarty_tpl->tpl_vars['searchRecords']->key;
            $_smarty_tpl->tpl_vars['modulesCount'] = new Smarty_variable(count($_smarty_tpl->tpl_vars['searchRecords']->value), null, 0);
            $_smarty_tpl->tpl_vars["totalCount"] = new Smarty_variable($_smarty_tpl->tpl_vars['totalCount']->value + $_smarty_tpl->tpl_vars['modulesCount']->value, null, 0);
        }
        ?>
<div class="globalSearchResults" style="max-width: 280px;"><div class="row-fluid"><div class="header highlightedHeader padding1per"><div class="row-fluid"><span class="span6"><strong><?php 
        echo vtranslate('LBL_SEARCH_RESULTS', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
&nbsp;(<?php 
        echo $_smarty_tpl->tpl_vars['totalCount']->value;
        ?>
)</strong></span><?php 
        if ($_smarty_tpl->tpl_vars['IS_ADVANCE_SEARCH']->value) {
            ?>
<span class="span6"><span class="pull-right"><a href="javascript:void(0);" id="showFilter"><?php 
            echo vtranslate('LBL_SAVE_MODIFY_FILTER', $_smarty_tpl->tpl_vars['MODULE']->value);
            ?>
</a></span></span><?php 
        }
        ?>
</div></div><div class="contents"><?php 
        if ($_smarty_tpl->tpl_vars['totalCount']->value == 100) {
            ?>
<div class='alert alert-block'><button type=button class="close" data-dismiss="alert">&times;</button><?php 
            if ($_smarty_tpl->tpl_vars['SEARCH_MODULE']->value) {
                echo vtranslate('LBL_GLOBAL_SEARCH_MAX_MESSAGE_FOR_MODULE', 'Vtiger');
            } else {
                echo vtranslate('LBL_GLOBAL_SEARCH_MAX_MESSAGE', 'Vtiger');
            }
            ?>
</div><?php 
        }
        $_smarty_tpl->tpl_vars['searchRecords'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['searchRecords']->_loop = false;
        $_smarty_tpl->tpl_vars['module'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['MATCHING_RECORDS']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        $_smarty_tpl->tpl_vars['smarty']->value['foreach']['matchingRecords']['index'] = -1;
        foreach ($_from as $_smarty_tpl->tpl_vars['searchRecords']->key => $_smarty_tpl->tpl_vars['searchRecords']->value) {
            $_smarty_tpl->tpl_vars['searchRecords']->_loop = true;
            $_smarty_tpl->tpl_vars['module']->value = $_smarty_tpl->tpl_vars['searchRecords']->key;
            $_smarty_tpl->tpl_vars['smarty']->value['foreach']['matchingRecords']['index']++;
            $_smarty_tpl->tpl_vars["modulesCount"] = new Smarty_variable(count($_smarty_tpl->tpl_vars['searchRecords']->value), null, 0);
            ?>
<label class="clearfix"><strong><?php 
            echo vtranslate($_smarty_tpl->tpl_vars['module']->value);
            ?>
&nbsp;(<?php 
            echo $_smarty_tpl->tpl_vars['modulesCount']->value;
            ?>
)</strong><?php 
            ob_start();
            echo $_smarty_tpl->getVariable('smarty')->value['foreach']['matchingRecords']['index'] + 1;
            $_tmp1 = ob_get_clean();
            if ($_tmp1 == 1) {
                ?>
<span class="pull-right"><p class="muted"><?php 
                echo vtranslate('LBL_CREATED_ON', $_smarty_tpl->tpl_vars['MODULE']->value);
                ?>
</small></p></span><?php 
            }
            ?>
</label><ul class="nav"><?php 
            $_smarty_tpl->tpl_vars['recordObject'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['recordObject']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['searchRecords']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            $_smarty_tpl->tpl_vars['smarty']->value['foreach']['globalSearch']['index'] = -1;
            foreach ($_from as $_smarty_tpl->tpl_vars['recordObject']->key => $_smarty_tpl->tpl_vars['recordObject']->value) {
                $_smarty_tpl->tpl_vars['recordObject']->_loop = true;
                $_smarty_tpl->tpl_vars['smarty']->value['foreach']['globalSearch']['index']++;
                $_smarty_tpl->tpl_vars["ID"] = new Smarty_variable($_smarty_tpl->tpl_vars['module']->value . "_globalSearch_row_" . ($_smarty_tpl->getVariable('smarty')->value['foreach']['globalSearch']['index'] + 1), null, 0);
                $_smarty_tpl->tpl_vars['DETAILVIEW_URL'] = new Smarty_variable($_smarty_tpl->tpl_vars['recordObject']->value->getDetailViewUrl(), null, 0);
                ?>
<li id="<?php 
                echo $_smarty_tpl->tpl_vars['ID']->value;
                ?>
"><a target="_blank" id="<?php 
                echo $_smarty_tpl->tpl_vars['ID']->value;
                ?>
_link" class="cursorPointer" <?php 
                if (stripos($_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value, 'javascript:') === 0) {
                    ?>
onclick='<?php 
                    echo substr($_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value, strlen("javascript:"));
                    ?>
' <?php 
                } else {
                    ?>
 onclick='window.location.href="<?php 
                    echo $_smarty_tpl->tpl_vars['DETAILVIEW_URL']->value;
                    ?>
"' <?php 
                }
                ?>
><?php 
                echo $_smarty_tpl->tpl_vars['recordObject']->value->getName();
                ?>
<span id="<?php 
                echo $_smarty_tpl->tpl_vars['ID']->value;
                ?>
_time" class="pull-right" title="<?php 
                echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['recordObject']->value->get('createdtime'));
                ?>
"><?php 
                echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['recordObject']->value->get('createdtime'));
                ?>
</span></a></li><?php 
            }
            if (!$_smarty_tpl->tpl_vars['recordObject']->_loop) {
                ?>
<li><?php 
                echo vtranslate('LBL_NO_RECORDS', $_smarty_tpl->tpl_vars['module']->value);
                ?>
</li><?php 
            }
            ?>
</ul><?php 
        }
        ?>
</div></div></div><?php 
    }