Commit 9e7564661079ae7194f869b5fd85bdf7182796f3

Authored by Victor Costa
1 parent d454cdd1
Exists in master

Do not show points with zero value

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
views/gamification/dashboard.html.erb
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <% unless @target.score_points.empty? %> 21 <% unless @target.score_points.empty? %>
22 <div class="scores"> 22 <div class="scores">
23 <h3><%= _('Latest Score Points') %></h3> 23 <h3><%= _('Latest Score Points') %></h3>
24 - <% @target.score_points.order('created_at desc').limit(5).each do |point| %> 24 + <% @target.score_points.order('created_at desc').where('num_points != 0').limit(5).each do |point| %>
25 <div class="score <%= point.point_type.present? ? point.point_type.name : '' %> <%= score_point_class(point) %> <%= score_point_action_class(point) %>"> 25 <div class="score <%= point.point_type.present? ? point.point_type.name : '' %> <%= score_point_class(point) %> <%= score_point_action_class(point) %>">
26 <span class="value"><%= point.num_points %></span> 26 <span class="value"><%= point.num_points %></span>
27 <span class="category"><%= score_point_target_link point, _(score_point_category(point)) %></span> 27 <span class="category"><%= score_point_target_link point, _(score_point_category(point)) %></span>