summaryrefslogtreecommitdiffstats
path: root/templates/part.items.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-08-12 02:04:45 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-08-12 02:04:45 +0200
commit95072a4a45db4b46cbb459639fb685ea8cc4c18a (patch)
treeae6c4d9f885d4ebbac7790811f5628e69f5f60d6 /templates/part.items.php
parentfcaa16f2eafe87e0353d1be7ce4bde0d33c43e81 (diff)
added ability to mark items as important; mark items as read when: title is clicked or when title scrolled beyond the top edge or when the bottom is reached; open items in a new tab when title is clicked
Diffstat (limited to 'templates/part.items.php')
-rw-r--r--templates/part.items.php22
1 files changed, 17 insertions, 5 deletions
diff --git a/templates/part.items.php b/templates/part.items.php
index ff372fafb..7334fa35a 100644
--- a/templates/part.items.php
+++ b/templates/part.items.php
@@ -8,15 +8,27 @@ $items = $itemmapper->findAll($feedid);
echo '<div id="feed_items">';
echo '<ul>';
foreach($items as $item) {
+
if($item->isRead()){
- $readClass = "title_read";
+ $newsItemClass = "title_read";
} else {
- $readClass = "title_unread";
+ $newsItemClass = "title_unread";
+ }
+
+ if($item->isImportant()){
+ $starClass = 'important';
+ $startTitle = $l->t('Mark as unimportant');
+ } else {
+ $starClass = '';
+ $startTitle = $l->t('Mark as important');
}
- echo '<li class="news_item ' . $readClass .'" data-id="' . $item->getId() . '" data-feedid="' . $feedid . '">';
- echo '<h1 class="item_title"><a href="' . $item->getUrl() . '">' . $item->getTitle() . '</a></h1>';
- echo '<div class="body">' . $item->getBody() . '</div>';
+ echo '<li class="news_item ' . $newsItemClass .'" data-id="' . $item->getId() . '" data-feedid="' . $feedid . '">';
+ echo '<div class="item_utils"><ul>';
+ echo '<li class="star ' . $starClass . '" title="' . $startTitle . '"></li>';
+ echo '</ul></div>';
+ echo '<h1 class="item_title"><a target="_blank" href="' . $item->getUrl() . '">' . $item->getTitle() . '</a></h1>';
+ echo '<div class="body">' . $item->getBody() . '</div>';
echo '</li>';
}