diff options
| author | Jacob Schatz <jschatz@gitlab.com> | 2016-05-11 18:11:47 +0000 |
|---|---|---|
| committer | Jacob Schatz <jschatz@gitlab.com> | 2016-05-11 18:11:47 +0000 |
| commit | 459af7ff655d731c4a0f9de0a6202d64468042cb (patch) | |
| tree | ebf6f66d91891e30d7c5401f08062e686d915789 | |
| parent | d8415389de859a0dab6e9efa7d8651577631aa7e (diff) | |
| parent | 51e198fb38428387a976385cae2d5e4fc455ee9e (diff) | |
| download | gitlab-ce-459af7ff655d731c4a0f9de0a6202d64468042cb.tar.gz | |
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:**

**After:**

cc: @jschatz1 @rspeicher
See merge request !4113
| -rw-r--r-- | app/views/layouts/header/_default.html.haml | 5 |
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 |
