| Current Path : /var/www/iplanru/data/old/www/i-plan.ru/media/zoo/elements/rating/tmpl/ |
| Current File : /var/www/iplanru/data/old/www/i-plan.ru/media/zoo/elements/rating/tmpl/rating.php |
<?php
/**
* @package ZOO
* @author YOOtheme http://www.yootheme.com
* @copyright Copyright (C) YOOtheme GmbH
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
// include assets js/css
$this->app->document->addScript('elements:rating/assets/js/rating.js');
$this->app->document->addStylesheet('elements:rating/assets/css/rating.css');
$id = $this->identifier.'-'.uniqid();
?>
<div id="<?php echo $id; ?>" class="yoo-zoo rating">
<div class="rating-container star<?php echo $stars; ?>">
<div class="previous-rating" style="width: <?php echo intval($rating / $stars * 100); ?>%;"></div>
<?php if (!$disabled) : ?>
<div class="current-rating">
<?php for($i = $stars; $i > 0; $i--) : ?>
<div class="stars star<?php echo $i; ?>" title="<?php echo $i.' '.JText::_('out of').' '.$stars; ?>"></div>
<?php endfor ?>
</div>
<?php endif; ?>
</div>
<?php if ($show_message) : ?>
<div class="vote-message">
<?php echo $rating.'/<strong>'.$stars.'</strong> '.JText::sprintf('rating %s votes', $votes); ?>
</div>
<?php endif; ?>
</div>
<?php if (!$disabled) : ?>
<script type="text/javascript">
jQuery(function($) {
$('#<?php echo $id; ?>').ElementRating({ url: '<?php echo $link; ?>' });
});
</script>
<?php endif;