From 691f84910a3b21bd9a39eba2266a1bbcac745529 Mon Sep 17 00:00:00 2001 From: Wedge Date: Tue, 24 May 2016 18:01:08 +0300 Subject: [PATCH] Fix statistics not showing user statistics in profile --- .../angularjs/controllers/statistics_controller.js.coffee | 2 +- app/views/statistics/_filter.html.slim | 2 +- app/views/users/profile/show.html.slim | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/angularjs/controllers/statistics_controller.js.coffee b/app/assets/javascripts/angularjs/controllers/statistics_controller.js.coffee index 83d4244fb..0db135a94 100644 --- a/app/assets/javascripts/angularjs/controllers/statistics_controller.js.coffee +++ b/app/assets/javascripts/angularjs/controllers/statistics_controller.js.coffee @@ -65,7 +65,7 @@ RosaABF.controller 'StatisticsController', ['$scope', '$http', '$timeout', ($sco range_end: $scope.range_end users_or_groups: $scope.users_or_groups format: 'json' - + console.log($scope.users_or_groups) $http.get($scope.statistics_path, params: params).success (results) -> $scope.statistics = results diff --git a/app/views/statistics/_filter.html.slim b/app/views/statistics/_filter.html.slim index 4ff8178cc..cb9d524f5 100644 --- a/app/views/statistics/_filter.html.slim +++ b/app/views/statistics/_filter.html.slim @@ -54,7 +54,7 @@ |   - if user - .form-group ng-init="users_or_groups = '#{user.uname}'" + .form-group ng-init="users_or_groups='#{user.uname}'" - else .form-group> label.control-label> diff --git a/app/views/users/profile/show.html.slim b/app/views/users/profile/show.html.slim index 29a0b3241..68a980b4c 100644 --- a/app/views/users/profile/show.html.slim +++ b/app/views/users/profile/show.html.slim @@ -57,11 +57,9 @@ div ng-show="tab == 'projects'" = render 'projects', subject: @user #manage-statistics.offset10[ ng-show = "tab == 'statistics'" - ng-controller = 'StatisticsController' ng-cloak = true ] rd-widget rd-widget-header title=t('top_menu.statistics') rd-widget-body - = render 'statistics' - - + div ng-controller = 'StatisticsController' + = render 'statistics' \ No newline at end of file