PageRenderTime 60ms CodeModel.GetById 34ms RepoModel.GetById 0ms app.codeStats 0ms

/application/modules/Video/widgets/profile-videos/index.tpl

https://github.com/robeendey/ce
Smarty Template | 50 lines | 48 code | 2 blank | 0 comment | 10 complexity | 1c3b6c4fac72888a3a0cc6fb9b7a274e MD5 | raw file
  1. <?php
  2. /**
  3. * SocialEngine
  4. *
  5. * @category Application_Extensions
  6. * @package Video
  7. * @copyright Copyright 2006-2010 Webligo Developments
  8. * @license http://www.socialengine.net/license/
  9. * @version $Id: index.tpl 7305 2010-09-07 06:49:55Z john $
  10. * @author Jung
  11. */
  12. ?>
  13. <ul class="videos_browse">
  14. <?php foreach( $this->paginator as $item ): ?>
  15. <li>
  16. <div class="video_thumb_wrapper">
  17. <?php if ($item->duration):?>
  18. <span class="video_length">
  19. <?php
  20. if( $item->duration>360 ) $duration = gmdate("H:i:s", $item->duration); else $duration = gmdate("i:s", $item->duration);
  21. if ($duration[0] =='0') $duration = substr($duration,1); echo $duration;
  22. ?>
  23. </span>
  24. <?php endif;?>
  25. <?php
  26. if ($item->photo_id) echo $this->htmlLink($item->getHref(), $this->itemPhoto($item, 'thumb.normal'));
  27. else echo '<img alt="" src="application/modules/Video/externals/images/video.png">';
  28. ?>
  29. </div>
  30. <a class="video_title" href='<?php echo $item->getHref();?>'><?php echo $item->getTitle();?></a>
  31. <div class="video_author"><?php echo $this->translate('By');?> <?php echo $this->htmlLink($item->getOwner()->getHref(), $item->getOwner()->getTitle()) ?></div>
  32. <div class="video_stats">
  33. <span class="video_views"><?php echo $item->view_count;?> <?php echo $this->translate('views');?></span>
  34. <?php if($item->rating>0):?>
  35. <?php for($x=1; $x<=$item->rating; $x++): ?><span class="rating_star_generic rating_star"></span><?php endfor; ?><?php if((round($item->rating)-$item->rating)>0):?><span class="rating_star_generic rating_star_half"></span><?php endif; ?>
  36. <?php endif; ?>
  37. </div>
  38. </li>
  39. <?php endforeach; ?>
  40. </ul>
  41. <?php if($this->paginator->getTotalItemCount() > $this->items_per_page):?>
  42. <br/>
  43. <?php
  44. echo $this->htmlLink(array('route' => 'default', 'module' => 'video', 'controller' => 'index', 'action' => 'browse', 'user' => $item->owner_id), $this->translate('View All Videos'), array(
  45. 'class' => 'buttonlink item_icon_video'
  46. ));
  47. ?>
  48. <?php endif;?>