diff options
author | mhasbini <mohammad.hasbini@gmail.com> | 2017-02-21 21:21:49 +0200 |
---|---|---|
committer | mhasbini <mohammad.hasbini@gmail.com> | 2017-02-21 21:21:49 +0200 |
commit | 0a53a3d9664187cbd8c72c24666a8ff03f3dccec (patch) | |
tree | a3bf55f0d7403ed662a09a413b23f876587deebe /app/helpers/todos_helper.rb | |
parent | 881529495379505542033bf7fb0d91cdc5b51e8d (diff) | |
download | gitlab-ce-0a53a3d9664187cbd8c72c24666a8ff03f3dccec.tar.gz |
change todos counter position & format ( for large counts )
Diffstat (limited to 'app/helpers/todos_helper.rb')
-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 |