diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2017-02-21 23:09:43 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2017-02-21 23:09:43 +0000 |
commit | 6c12cbd05ae8e0a365e6241191dcfaa4d306ed31 (patch) | |
tree | ea00a18af374928a344c8ac8480d5ef7007bf198 /app/helpers | |
parent | deb62183edbd9111691f62a4f6a9febb1fcd79f7 (diff) | |
parent | 0a53a3d9664187cbd8c72c24666a8ff03f3dccec (diff) | |
download | gitlab-ce-6c12cbd05ae8e0a365e6241191dcfaa4d306ed31.tar.gz |
Merge branch '26703-todos-count' into 'master'
#26703 change todos counter position & format ( for large counts )
Closes #26703
See merge request !9171
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/todos_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 845f1a0e840..c52afd6db1c 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -3,6 +3,10 @@ module TodosHelper @todos_pending_count ||= current_user.todos_pending_count end + def todos_count_format(count) + count > 99 ? '99+' : count + end + def todos_done_count @todos_done_count ||= current_user.todos_done_count end |