diff --git a/template/common.go b/template/common.go
index da11d081..32acb24a 100644
--- a/template/common.go
+++ b/template/common.go
@@ -67,6 +67,11 @@ var templateCommonMap = map[string]string{
data-label-loading="{{ t "confirm.loading" }}"
data-url="{{ route "removeFeed" "feedID" .ID }}">{{ template "icon_delete" }}{{ t "action.remove" }}
+ {{ if .UnreadCount }}
+
+ {{ template "icon_read" }}{{ t "menu.mark_all_as_read" }}
+
+ {{ end }}
{{ if ne .ParsingErrorCount 0 }}
diff --git a/template/html/common/feed_list.html b/template/html/common/feed_list.html
index 8c63f74a..bd233260 100644
--- a/template/html/common/feed_list.html
+++ b/template/html/common/feed_list.html
@@ -42,6 +42,11 @@
data-label-loading="{{ t "confirm.loading" }}"
data-url="{{ route "removeFeed" "feedID" .ID }}">{{ template "icon_delete" }}{{ t "action.remove" }}
+ {{ if .UnreadCount }}
+
+ {{ template "icon_read" }}{{ t "menu.mark_all_as_read" }}
+
+ {{ end }}
{{ if ne .ParsingErrorCount 0 }}
diff --git a/ui/feed_mark_as_read.go b/ui/feed_mark_as_read.go
new file mode 100644
index 00000000..fce5646a
--- /dev/null
+++ b/ui/feed_mark_as_read.go
@@ -0,0 +1,37 @@
+// Copyright 2018 Frédéric Guillot. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+package ui // import "miniflux.app/ui"
+
+import (
+ "net/http"
+
+ "miniflux.app/http/request"
+ "miniflux.app/http/response/html"
+ "miniflux.app/http/route"
+)
+
+func (h *handler) markFeedAsRead(w http.ResponseWriter, r *http.Request) {
+ feedID := request.RouteInt64Param(r, "feedID")
+ userID := request.UserID(r)
+
+ feed, err := h.store.FeedByID(userID, feedID)
+
+ if err != nil {
+ html.ServerError(w, r, err)
+ return
+ }
+
+ if feed == nil {
+ html.NotFound(w, r)
+ return
+ }
+
+ if err = h.store.MarkFeedAsRead(userID, feedID, feed.CheckedAt); err != nil {
+ html.ServerError(w, r, err)
+ return
+ }
+
+ html.Redirect(w, r, route.Path(h.router, "feeds"))
+}
diff --git a/ui/ui.go b/ui/ui.go
index 36c9fd7c..999a0f64 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -68,6 +68,7 @@ func Serve(router *mux.Router, store *storage.Storage, pool *worker.Pool, feedHa
uiRouter.HandleFunc("/feed/{feedID}/entries/all", handler.showFeedEntriesAllPage).Name("feedEntriesAll").Methods(http.MethodGet)
uiRouter.HandleFunc("/feed/{feedID}/entry/{entryID}", handler.showFeedEntryPage).Name("feedEntry").Methods(http.MethodGet)
uiRouter.HandleFunc("/feed/icon/{iconID}", handler.showIcon).Name("icon").Methods(http.MethodGet)
+ uiRouter.HandleFunc("/feed/{feedID}/mark-all-as-read", handler.markFeedAsRead).Name("markFeedAsRead").Methods(http.MethodGet)
// Category pages.
uiRouter.HandleFunc("/category/{categoryID}/entry/{entryID}", handler.showCategoryEntryPage).Name("categoryEntry").Methods(http.MethodGet)