summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2017-02-21 23:09:43 +0000
committerClement Ho <clemmakesapps@gmail.com>2017-02-21 23:09:43 +0000
commit6c12cbd05ae8e0a365e6241191dcfaa4d306ed31 (patch)
treeea00a18af374928a344c8ac8480d5ef7007bf198 /app/helpers
parentdeb62183edbd9111691f62a4f6a9febb1fcd79f7 (diff)
parent0a53a3d9664187cbd8c72c24666a8ff03f3dccec (diff)
downloadgitlab-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.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