summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Shea <connor.james.shea@gmail.com>2016-05-10 21:56:40 -0600
committerConnor Shea <connor.james.shea@gmail.com>2016-05-10 21:56:40 -0600
commit51e198fb38428387a976385cae2d5e4fc455ee9e (patch)
tree26131447e000b0bdc50dc91ae14568277c0187fc
parentf7d2297c86eb84c2e2fbfa6b3e007da3c7adb5ae (diff)
downloadgitlab-ce-51e198fb38428387a976385cae2d5e4fc455ee9e.tar.gz
Don't show the Todo count if there aren't any Todos.
When there are 0 Todos, the Todos icon still had the blue badge with a "0" in it, which made me think I had a new Todo left. This makes it less annoying. Follow-up on !4077.
-rw-r--r--app/views/layouts/header/_default.html.haml5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml
index 172579dafda..c33740e23fa 100644
--- a/app/views/layouts/header/_default.html.haml
+++ b/app/views/layouts/header/_default.html.haml
@@ -27,8 +27,9 @@
%li
= link_to dashboard_todos_path, title: 'Todos', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= icon('bell fw')
- %span.badge.todos-pending-count
- = todos_pending_count
+ - unless todos_pending_count == 0
+ %span.badge.todos-pending-count
+ = todos_pending_count
- if current_user.can_create_project?
%li
= link_to new_project_path, title: 'New project', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do