<?php
/* @var $this CommentWidget */
/* @var $model Comment */
/* @var $form CActiveForm */
?>
<hr/>
<div id="fb-root"></div>
<?php Yii::app()->clientScript->registerScript('facebook-comments', '(function(e,a,f){var c,b=e.getElementsByTagName(a)[0];if(e.getElementById(f)){return}c=e.createElement(a);c.id=f;c.src="//connect.facebook.net/en_GB/all.js#xfbml=1&appId=' . Yii::app()->options->get('FACEBOOK_APP_ID', '') . '";b.parentNode.insertBefore(c,b)}(document,"script","facebook-jssdk"));'); ?>


<?php
$this->widget('ext.widgets.FTabView', array(
    'tabs' => array(
        'cms-comments' => array(
            'title' => Yii::t('admin', 'Comments'),
            'content' => $this->render('shortcodes.views.comment._cms-comments', array('model' => $model, 'dataProvider' => $dataProvider), true),
        ),
        'fb-comments' => array(
            'title' => Yii::t('admin', 'Facebook Comments'),
            'content' => '<div class="fb-comments" data-href="' . Yii::app()->request->hostInfo . Yii::app()->request->url . '" data-width="587" data-numposts="5" data-colorscheme="light"></div>'
        ),
    ),
));
