summaryrefslogtreecommitdiffstats
path: root/templates/part.content.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-30 15:14:07 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-30 15:14:07 +0200
commit88279961c5e2f2bd0711fc4200d58b93b425199e (patch)
tree1e07557fdbd6f037b143fd49f454199737d12f45 /templates/part.content.php
parentabd5ef4c4c6ad3cf8e879f6c4b9181b077165952 (diff)
fix autopaging and marking read, render items
Diffstat (limited to 'templates/part.content.php')
-rw-r--r--templates/part.content.php51
1 files changed, 42 insertions, 9 deletions
diff --git a/templates/part.content.php b/templates/part.content.php
index 18351d453..00363f073 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -3,24 +3,30 @@
</div>
<div news-auto-focus="#app-content" ng-if="!App.isFirstRun()">
- <ul ng-if="isCompactView()">
+ <!-- compact view -->
+ <ul ng-if="Content.isCompactView()" class="compact">
</ul>
- <ul ng-if="!isCompactView()">
- <li class="article"
+
+ <!-- full view -->
+ <ul ng-if="!Content.isCompactView()">
+ <li class="item"
ng-repeat="item in Content.getItems() | orderBy:[Content.orderBy()] track by item.id"
ng-click="Content.markRead(item.id)"
- ng-class="{read: !item.unread}">
+ ng-class="{read: !item.unread}"
+ data-id="{{ item.id }}">
<h2 class="date">
- <span class="timeago" title="{{item.pubDate*1000|date:'dd-MM-yyyy'}}">
- {{ getRelativeDate(item.pubDate) }}
+ <span class="timeago" title="{{ item.pubDate*1000|date:'dd-MM-yyyy' }}">
+ {{ Content.getRelativeDate(item.pubDate) }}
</span>
</h2>
- <button class="star"
+ <button class="star svg"
ng-click="Content.toggleStar(item.id)"
- ng-class="{starred: item.starred}"></button>
+ ng-class="{
+ 'starred': item.starred
+ }"></button>
<h1 class="title">
<a target="_blank" ng-href="{{ item.url }}">
@@ -28,9 +34,36 @@
</a>
</h1>
- <div class="item_body" news-bind-html-unsafe="item.body"></div>
+ <h2 class="author">
+ <span>
+ <?php p($l->t('from')) ?>
+ <a ng-href="#/items/feeds/{{ item.feedId }}"
+ class="from_feed">{{ Content.getFeed(item.feedId).title }}</a>
+ </span>
+ <span ng-show="item.author">
+ <?php p($l->t('by')) ?>
+ {{ item.author }}
+ </span>
+ </h2>
+
+ <div class="enclosure" ng-if="item.enclosureLink">
+ <news-audio type="{{ item.enclosureType }}"
+ ng-src="{{ item.enclosureLink|trustUrl }}"/>
+ <?php p($l->t('Download')) ?>
+ </news-audio>
+ </div>
+
+ <div class="body" news-bind-html-unsafe="item.body"></div>
+ <div class="bottom-utils">
+ <ul>
+ <li ng-click="Content.toggleKeepUnread(item.id)">
+ <label for="keep-unread"><?php p($l->t('Keep unread')); ?></label>
+ <input type="checkbox" name="keep-unread" ng-checked="item.keepUnread"/>
+ </li>
+ </ul>
+ </div>
</li>
</ul>
</div>