summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard
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/controllers/dashboard
parent881529495379505542033bf7fb0d91cdc5b51e8d (diff)
downloadgitlab-ce-0a53a3d9664187cbd8c72c24666a8ff03f3dccec.tar.gz
change todos counter position & format ( for large counts )
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r--app/controllers/dashboard/todos_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb
index 4e61b0886d8..ee2358b986d 100644
--- a/app/controllers/dashboard/todos_controller.rb
+++ b/app/controllers/dashboard/todos_controller.rb
@@ -35,6 +35,11 @@ class Dashboard::TodosController < Dashboard::ApplicationController
render json: todos_counts
end
+ # Used in TodosHelper also
+ def self.todos_count_format(count)
+ count >= 100 ? '99+' : count
+ end
+
private
def find_todos