From 3e24d328a9201ebb3aee06ebf1b9d6a3e9808b10 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 21 Jun 2016 14:45:52 +0200 Subject: [PATCH] [feature] statistics: username link leads to admin edition --- app/assets/javascripts/controllers/admin/statistics.coffee | 4 +--- app/assets/templates/admin/statistics/index.html.erb | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/controllers/admin/statistics.coffee b/app/assets/javascripts/controllers/admin/statistics.coffee index a719981f2..454b9961f 100644 --- a/app/assets/javascripts/controllers/admin/statistics.coffee +++ b/app/assets/javascripts/controllers/admin/statistics.coffee @@ -242,9 +242,7 @@ Application.Controllers.controller "StatisticsController", ["$scope", "$state", ## $scope.getUserNameFromId = (id) -> name = $scope.members[id] - if name - return name - else "ID "+id + return (if name then name else "ID "+id) diff --git a/app/assets/templates/admin/statistics/index.html.erb b/app/assets/templates/admin/statistics/index.html.erb index ec1b79036..9ffe47fba 100644 --- a/app/assets/templates/admin/statistics/index.html.erb +++ b/app/assets/templates/admin/statistics/index.html.erb @@ -260,7 +260,7 @@ {{formatDate(datum._source.date)}} - {{getUserNameFromId(datum._source.userId)}} + {{getUserNameFromId(datum._source.userId)}} {{formatSex(datum._source.gender)}} {{datum._source.age}} {{ 'years_old' | translate }}{{ 'unknown' }} {{formatSubtype(datum._source.subType)}}