Merge branch 'no-todo-badge-on-zero' into 'master'

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.

**Before:**

![Screen_Shot_2016-05-10_at_9.36.57_PM](/uploads/e0dfafae01692286096606c3251f0997/Screen_Shot_2016-05-10_at_9.36.57_PM.png)

**After:**

![Screen_Shot_2016-05-10_at_10.01.02_PM](/uploads/30a8bafe8f54862418eb4045e5777a9a/Screen_Shot_2016-05-10_at_10.01.02_PM.png)

cc: @jschatz1 @rspeicher 

See merge request !4113
This commit is contained in:
Jacob Schatz 2016-05-11 18:11:47 +00:00
commit 459af7ff65

View file

@ -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