/** * Renders the content of the portlet. */ public function run() { $shortTextTpl = '<span class="short-text" title="Click to view">%s</span>'; $fullTextTpl = '<span class="full-text hide">%s</span>'; Yii::app()->clientScript->registerScript('short-text-widget', "\n\t\t\t\$('body').on('click', '.short-text', function() {\n\t\t\t\t\$(this).hide();\n\t\t\t\t\$(this).siblings('.full-text').removeClass('hide');\n\t\t\t\t\$.get(\$(this).siblings('.short-text-url').val());\n\t\t\t});\n\t\t"); echo sprintf($shortTextTpl, InputHelper::stripoff($this->text, 4)) . sprintf($fullTextTpl, $this->text) . CHtml::hiddenField('', $this->urlOnCLick, array('class' => 'short-text-url')); }
</ul> <!-- Tab panes --> <div class="tab-content"> <div role="tabpanel" class="tab-pane active"> <a href="<?php echo $this->createUrl('agent/index'); ?> " class="btn btn-alpha pull-right" style="margin-top: 10px">View All</a> <div class="roundabout-wrap"> <ul id="featured-agents" class="roundabout-holder"> <?php foreach ($models as $model) { ?> <li class="roundabout-moveable-item roundabout-in-focus agent-item"> <a href="<?php echo $this->createUrl('/agent/view', array('slug' => $model->slug)); ?> "> <div class="clearfix"> <div class="image"> <?php echo InputHelper::holderImage($model->getAvatarUrl(124, 168), 124, 168); ?> </div> <h4><?php echo $model->first_name . " " . $model->last_name; ?> </h4> <p>CEA Reg No: <span class="cea"><?php echo $model->agent_cea; ?>