summaryrefslogtreecommitdiff
path: root/app/helpers/todos_helper.rb
diff options
context:
space:
mode:
authormhasbini <mohammad.hasbini@gmail.com>2017-02-21 21:21:49 +0200
committermhasbini <mohammad.hasbini@gmail.com>2017-02-21 21:21:49 +0200
commit0a53a3d9664187cbd8c72c24666a8ff03f3dccec (patch)
treea3bf55f0d7403ed662a09a413b23f876587deebe /app/helpers/todos_helper.rb
parent881529495379505542033bf7fb0d91cdc5b51e8d (diff)
downloadgitlab-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.rb4
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