Ejemplo n.º 1
0
    $fileName = strtolower($data->associationType);
    if ($fileName == 'opportunity') {
        $fileName = 'opportunities';
    }
    if ($fileName == 'product') {
        $fileName = 'products';
    }
    if ($fileName == 'quote') {
        $fileName = 'quotes';
    }
    if (file_exists('themes/' . Yii::app()->theme->name . '/images/' . $fileName . '.png')) {
        // echo "<div class='img-box plus-sign'></div>";
    }
}
if ($data->type == 'calendar_event') {
    echo X2DateUtil::actionDate($data->timestamp, 1);
}
?>
        <?php 
//  echo ($data->type!='feed')?CHtml::image($imgUrl,'',array('title'=>$data->parseType($data->type))):"";
?>
        <?php 
if ($data->type == 'feed') {
    // add css class to uploaded avatar images to round corners
    $CSSClass = $avatar == 'uploads/default.png' ? 'default-avatar-image' : 'avatar-image';
    if (!empty($avatar) && file_exists($avatar)) {
        echo CHtml::image(Yii::app()->request->baseUrl . "/" . $avatar, '', array('class' => $CSSClass, 'height' => 35, 'width' => 35));
    } else {
        Profile::renderFullSizeAvatar(0, 35);
    }
}
Ejemplo n.º 2
0
    <div class="sticky-icon x2-hint" title="<?php 
echo Yii::t('actions', 'This action has been marked as sticky and will remain at the top of the list.');
?>
" style="<?php 
echo $data->sticky ? "" : "display:none";
?>
"></div>
    <?php 
if ($data->complete != 'Yes') {
    if (empty($data->dueDate)) {
        echo X2DateUtil::actionDate($data->createDate, $data->priority);
    } else {
        echo X2DateUtil::actionDate($data->dueDate, $data->priority);
    }
} else {
    echo X2DateUtil::actionDate($data->completeDate, $data->priority, 'Yes');
}
?>
	<div class="header">
		<?php 
if (empty($data->type) || $data->type == 'weblead') {
    // if ($data->complete=='Yes') {
    // echo Yii::t('actions','Completed {date}',array('{date}'=>Formatter::formatCompleteDate($data->completeDate)));
    // } else {
    // if(!empty($data->dueDate) && (!isset($order) || $order=='due' || $order=='priority')){
    // echo Yii::t('actions','Due: ').Actions::parseStatus($data->dueDate).'</b>';
    // }elseif((isset($dateType) && $order=='create') || (empty($data->dueDate) && !empty($data->createDate))){
    // echo Yii::t('actions','Created: ').Formatter::formatLongDateTime($data->createDate).'</b>';
    // }else{
    // echo "&nbsp;";
    // }
Ejemplo n.º 3
0
 /**
  * Calls getDateRange and sets to default range to 'all' if the date range is the 
  * expected close date date range
  */
 public static function getDateRange($startKey = 'start', $endKey = 'end', $rangeKey = 'range')
 {
     if ($startKey === 'expectedCloseDateStart') {
         $range = X2DateUtil::getDateRange($startKey, $endKey, $rangeKey, 'all');
         // for expected close date, override the default behavior of getDateRange.
         // 'all time' should not end at 'today' since expected close dates can be in
         // the future.
         if ($range['range'] === 'all') {
             $range['end'] = 0;
         }
         return $range;
     } else {
         return X2DateUtil::getDateRange($startKey, $endKey, $rangeKey, 'custom');
     }
 }
Ejemplo n.º 4
0
 /**
  * Calls getDateRange and sets to default range to 'all' if the date range is the 
  * expected close date date range
  */
 public static function getDateRange($startKey = 'start', $endKey = 'end', $rangeKey = 'range')
 {
     return X2DateUtil::getDateRange($startKey, $endKey, $rangeKey, 'custom');
 }