reader_view.phtml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. $this->partial ('nav_menu');
  3. if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
  4. $items = $this->entryPaginator->items ();
  5. ?>
  6. <div id="stream" class="reader">
  7. <?php foreach ($items as $item) { ?>
  8. <div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>">
  9. <div class="flux_content">
  10. <div class="content">
  11. <?php
  12. $feed = HelperCategory::findFeed($this->cat_aside, $item->feed ()); //We most likely already have the feed object in cache
  13. if (empty($feed)) $feed = $item->feed (true);
  14. ?>
  15. <a href="<?php echo $item->link (); ?>">
  16. <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="" /> <span><?php echo $feed->name (); ?></span>
  17. </a>
  18. <h1 class="title"><?php echo $item->title (); ?></h1>
  19. <div class="author">
  20. <?php $author = $item->author (); ?>
  21. <?php echo $author != '' ? Translate::t ('by_author', $author) . ' - ' : ''; ?>
  22. <?php echo $item->date (); ?>
  23. </div>
  24. <?php
  25. if($this->conf->lazyload() == 'yes') {
  26. echo lazyimg($item->content ());
  27. } else {
  28. echo $item->content();
  29. }
  30. ?>
  31. </div>
  32. </div>
  33. </div>
  34. <?php } ?>
  35. <?php $this->entryPaginator->render ('pagination.phtml', 'next'); ?>
  36. </div>
  37. <?php } else { ?>
  38. <div id="stream" class="alert alert-warn reader">
  39. <span class="alert-head"><?php echo Translate::t ('no_feed_to_display'); ?></span>
  40. </div>
  41. <?php } ?>