<?php
/**
* @package		EasyBlog
* @copyright	Copyright (C) 2010 - 2018 Stack Ideas Sdn Bhd. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* EasyBlog is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
?>
<span id="es">
<?php if ($legacy) { ?>
<script type="text/javascript">
EasySocial
.require()
.script('site/conversations/composer')
.done(function($) {
	// Apply conversation controller
	$('[data-start-conversation]' ).implement( EasySocial.Controller.Conversations.Composer.Dialog, {
		"recipient" :
		{
			"id"	: "<?php echo $user->id;?>",
			"name"	: "<?php echo $this->escape( $user->getName() );?>",
			"avatar": "<?php echo $user->getAvatar();?>"
		}
	});
});
</script>
<a href="javascript:void(0);" class="author-friend" data-start-conversation  data-eb-provide="tooltip" title="<?php echo JText::_('COM_EASYBLOG_MESSAGE_AUTHOR', true); ?>">
	<i class="fdi fa fa-comments"></i>
</a>
<?php } else { ?>
<a href="javascript:void(0);" class="author-friend" data-es-conversations-compose data-id="<?php echo $user->id;?>" data-eb-provide="tooltip" title="<?php echo JText::_('COM_EASYBLOG_MESSAGE_AUTHOR', true); ?>">
	<i class="fdi fa fa-comments"></i>
</a>
<?php } ?>
</span>