summaryrefslogtreecommitdiffstats
path: root/templates/part.items.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-10-15 22:08:07 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-10-15 22:08:07 +0200
commit97b6231468bf11046e29f368e113ea3865639c12 (patch)
tree12669a13179d4023c629a14331e2b60f97162366 /templates/part.items.php
parent17814509754fa405d1f7be716cbeca1cd08deda8 (diff)
show feedtitle when not showing a feed but folder/starred/new articles
Diffstat (limited to 'templates/part.items.php')
-rw-r--r--templates/part.items.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/templates/part.items.php b/templates/part.items.php
index d331f5172..bcbc8da37 100644
--- a/templates/part.items.php
+++ b/templates/part.items.php
@@ -1,6 +1,7 @@
<?php
$items = isset($_['items']) ? $_['items'] : '';
+$lastViewedFeedType = isset($_['lastViewedFeedType']) ? $_['lastViewedFeedType'] : '';
echo '<ul>';
foreach($items as $item) {
@@ -31,13 +32,15 @@ foreach($items as $item) {
echo '</div>';
echo '<h1 class="item_title"><a target="_blank" href="' . $item->getUrl() . '">' . htmlspecialchars($item->getTitle(), ENT_QUOTES, 'UTF-8') . '</a></h1>';
-
-// if ($lastViewedFeedType !== OCA\News\FeedType::FEED) {
- echo '<div class="item_feed">' . $l->t('from') . ' ' . $item->getFeedTitle() . '</div>';
-// }
+
+ if ((int)$lastViewedFeedType !== OCA\News\FeedType::FEED) {
+ $feedTitle = '<span class="feed_title"> ' . $l->t('from') . ' ' . $item->getFeedTitle() . '</span>';
+ } else {
+ $feedTitle = '';
+ }
if(($item->getAuthor() !== null) && (trim($item->getAuthor()) != '')) {
- echo '<h2 class="item_author">'. $l->t('by') . ' ' . htmlspecialchars($item->getAuthor(), ENT_QUOTES, 'UTF-8') . '</h2>';
+ echo '<h2 class="item_author">'. $feedTitle . $l->t('by') . ' ' . htmlspecialchars($item->getAuthor(), ENT_QUOTES, 'UTF-8') . '</h2>';
}
echo '<div class="body">' . $item->getBody() . '</div>';