diff options
author | Dave Z <dzaikos@users.noreply.github.com> | 2018-08-26 19:18:07 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-08-26 16:18:07 -0700 |
commit | 9169fbafb2e07b33b2ca175c7ac4a9558280912c (patch) | |
tree | dec99d5077d7db0c7fa742e606e5cf5368e7dd2b /template | |
parent | aae62aae08c7581822db0318dba21782d613b4bb (diff) |
Show count of feeds with permanent errors in header menu
Only for feeds that reach `maxParsingError` are counted (so transient errors do not trigger counter).
Diffstat (limited to 'template')
-rw-r--r-- | template/common.go | 8 | ||||
-rw-r--r-- | template/html/common/layout.html | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/template/common.go b/template/common.go index a252391..947252d 100644 --- a/template/common.go +++ b/template/common.go @@ -134,7 +134,11 @@ var templateCommonMap = map[string]string{ <a href="{{ route "history" }}" data-page="history">{{ t "History" }}</a> </li> <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g f" }}"> - <a href="{{ route "feeds" }}" data-page="feeds">{{ t "Feeds" }}</a> + <a href="{{ route "feeds" }}" data-page="feeds">{{ t "Feeds" }} + {{ if gt .countErrorFeeds 0 }} + <span class="error-feeds-counter-wrapper">(<span class="error-feeds-counter">{{ .countErrorFeeds }}</span>)</span> + {{ end }} + </a> </li> <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g c" }}"> <a href="{{ route "categories" }}" data-page="categories">{{ t "Categories" }}</a> @@ -239,6 +243,6 @@ var templateCommonMap = map[string]string{ var templateCommonMapChecksums = map[string]string{ "entry_pagination": "756ef122f3ebc73754b5fc4304bf05e59da0ab4af030b2509ff4c9b4a74096ce", "item_meta": "2da78476f6c7fb8742c969ad1bfc20b7b61fddf97d79a77baf3cabda52f6fb49", - "layout": "952632cafa23e02e3ae74c33a6606e127ab7bff0b82a2aa848967da8966475a5", + "layout": "2491695e33a496c9bd902a2cb5bc3a6a540f98ac7c24591d503a77ba0f5f0ebe", "pagination": "b592d58ea9d6abf2dc0b158621404cbfaeea5413b1c8b8b9818725963096b196", } diff --git a/template/html/common/layout.html b/template/html/common/layout.html index 23464e6..b6a7b13 100644 --- a/template/html/common/layout.html +++ b/template/html/common/layout.html @@ -60,7 +60,11 @@ <a href="{{ route "history" }}" data-page="history">{{ t "History" }}</a> </li> <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g f" }}"> - <a href="{{ route "feeds" }}" data-page="feeds">{{ t "Feeds" }}</a> + <a href="{{ route "feeds" }}" data-page="feeds">{{ t "Feeds" }} + {{ if gt .countErrorFeeds 0 }} + <span class="error-feeds-counter-wrapper">(<span class="error-feeds-counter">{{ .countErrorFeeds }}</span>)</span> + {{ end }} + </a> </li> <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g c" }}"> <a href="{{ route "categories" }}" data-page="categories">{{ t "Categories" }}</a> |