commit: c0b3436592c5ed7471949c3b65240014f00d9b42 Author: Alex Legler <alex <AT> a3li <DOT> li> AuthorDate: Thu Apr 17 16:59:24 2014 +0000 Commit: Alex Legler <a3li <AT> gentoo <DOT> org> CommitDate: Thu Apr 17 16:59:24 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/infra-status.git;a=commit;h=c0b34365
...but all visible notices count when calculating the number of items --- lib/helpers.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/helpers.rb b/lib/helpers.rb index 2b737e9..7693239 100644 --- a/lib/helpers.rb +++ b/lib/helpers.rb @@ -21,6 +21,7 @@ helpers do def service_info(service) content = '' active_notices = NoticeStore.instance.active_notices_for(service) + visible_notices = NoticeStore.instance.visible_notices_for(service) unless (forced_state = get_forced_state(active_notices)) == nil content << status_icon(forced_state) @@ -37,7 +38,7 @@ helpers do end end - content << '<span class="badge" style="margin-right: 1em;" title="There are notices (%s) below regarding this service.">%s</span>' % [active_notices.count, active_notices.count] if active_notices.count > 0 + content << '<span class="badge" style="margin-right: 1em;" title="There are notices (%s) below regarding this service.">%s</span>' % [visible_notices.count, visible_notices.count] if visible_notices.count > 0 content end