<div class="onlineUser" id="onlineUser_<?php echo $user->id ?>">
    <div class="states">
	<?php //print_r($user)?>
        <?php echo '<i class="icon-phone" style="color: '.$user->getStateColor().'; "></i>' ?>
        <?php echo '<br><i class="icon-comment" style="color: '.$user->getJabberStateColor().'; "></i>' ?>
        <?php #echo '<i class="icon-comment"></i>' ?>
    </div>
    <div class="avatar">
        <?php 
            
            echo CHtml::image(
                $user->getPhotoUrl(40),
                '',
                array('width'=>64)
            );
        ?>
    </div>
    <div class="info">
        <?php
            $match = array();
            preg_match('#\<(.*?)\>#', $user->displayName, $match);
            echo str_replace($match[1], '<span  class="callable" data-phone-number="'.$match[1].'">'.$match[1].'</span>', CHtml::encode($user->displayName));
        ?>
        <br>
        <p class="jabberStateMessage"><?php echo CHtml::encode($user->jabber_presence_text); ?></p>
    </div>
    <br style="clear: left;" />
</div>
