PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/quanta/code/branches/trc/modules/mod_quanta_percent/tmpl/default.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 36 lines | 22 code | 5 blank | 9 comment | 2 complexity | 85b623f3036fd4c99e09703823d2e725 MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: default.php 321 2010-10-18 01:04:34Z eddieajau $
  4. * @package NewLifeInIT
  5. * @subpackage mod_quanta_percent
  6. * @copyright Copyright (C) 2009 New Life in IT Pty Ltd. All rights reserved.
  7. * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
  8. * @link http://www.theartofjoomla.com
  9. */
  10. // no direct access
  11. defined('_JEXEC') or die;
  12. $offset = JFactory::getApplication()->getCfg('offset');
  13. $style = $this->params->get('text-style');
  14. $percent = sprintf('%.1f%%', $this->values->get('fraction')*100);
  15. $date = $this->values->get('date');
  16. $link = (int) $this->params->get('menu-link');
  17. ?>
  18. <div class="quanta-percent">
  19. <span class="percent" style="<?php echo $style;?>"><?php echo $percent; ?></span>
  20. <?php if ($date) : ?>
  21. <p class="date">
  22. <?php echo JText::sprintf('MOD_QUANTA_PERCENT_DATE', JHtml::date($date, '%A %e %b %Y', $offset)); ?>
  23. </p>
  24. <?php endif; ?>
  25. <?php if ($link) : ?>
  26. <p class="link">
  27. <a href="<?php echo JRoute::_('index.php?Itemid='.$link); ?>">
  28. <?php echo JText::_('MOD_QUANTA_PERCENT_LINK'); ?></a>
  29. </p>
  30. <?php endif; ?>
  31. </div>