feed title is now a link to the feed website

This commit is contained in:
MageFroh
2013-07-01 21:25:09 +01:00
parent 8997024eb7
commit b67f0a1346
4 changed files with 17 additions and 1 deletions

View File

@@ -26,6 +26,9 @@ public class Entries implements Serializable {
@ApiProperty("times the server tried to refresh the feed and failed")
private int errorCount;
@ApiProperty("URL of the website, extracted from the feed")
private String feedLink;
@ApiProperty("list generation timestamp")
private long timestamp;
@@ -67,6 +70,14 @@ public class Entries implements Serializable {
this.errorCount = errorCount;
}
public String getFeedLink() {
return feedLink;
}
public void setFeedLink(String feedLink) {
this.feedLink = feedLink;
}
public long getTimestamp() {
return timestamp;
}

View File

@@ -99,6 +99,7 @@ public class FeedREST extends AbstractResourceREST {
entries.setName(subscription.getTitle());
entries.setMessage(subscription.getFeed().getMessage());
entries.setErrorCount(subscription.getFeed().getErrorCount());
entries.setFeedLink(subscription.getFeed().getLink());
List<FeedEntryStatus> list = null;
if (unreadOnly) {

View File

@@ -703,6 +703,7 @@ function($scope, $stateParams, $http, $route, $window, EntryService, SettingsSer
$scope.timestamp = data.timestamp;
$scope.busy = false;
$scope.hasMore = data.hasMore;
$scope.feedLink = data.feedLink;
};
if (!$scope.keywords) {
var service = $scope.selectedType == 'feed' ? FeedService

View File

@@ -4,7 +4,10 @@
<span ng-switch on="selectedId">
<span ng-switch-when="all">${tree.all}</span>
<span ng-switch-when="starred">${tree.starred}</span>
<span ng-switch-default>{{name}}</span>
<span ng-switch-default>
<span ng-hide="feedLink">{{name}}</span>
<a ng-show="feedLink" href="{{feedLink}}" target="_blank">{{name}}</a>
</span>
</span>
&nbsp;
<span ng-show="name && selectedType == 'category'"> &#187;</span>