Commit 67c4725c63b3dff680da9c99f776ed5e6f5b10bd
Exists in
master
Merge branch 'hide_gamification' into 'master'
Hide gamification See merge request !1
Showing
3 changed files
with
16 additions
and
2 deletions
Show diff stats
lib/ext/entities.rb
@@ -67,7 +67,7 @@ module Merit | @@ -67,7 +67,7 @@ module Merit | ||
67 | action: 'vote#create', | 67 | action: 'vote#create', |
68 | default_threshold: 5, | 68 | default_threshold: 5, |
69 | to: lambda {|vote| vote.voteable.author}, | 69 | to: lambda {|vote| vote.voteable.author}, |
70 | - value: lambda { |vote, author| vote.voteable.profile.identifier == 'conferencia' ? Vote.where(voteable_id: Article.conference_articles.select("articles.id")).for_voteable(vote.voteable).where('vote < 0').count : 0 } | 70 | + value: lambda { |vote, author| (vote.voteable.profile.identifier == 'conferencia' and author.present?) ? Vote.where(voteable_id: Article.conference_articles.select("articles.id")).for_voteable(vote.voteable).where('vote < 0').count : 0 } |
71 | } | 71 | } |
72 | ], | 72 | ], |
73 | votes_performed_conferencia: [ | 73 | votes_performed_conferencia: [ |
@@ -75,7 +75,7 @@ module Merit | @@ -75,7 +75,7 @@ module Merit | ||
75 | action: 'vote#create', | 75 | action: 'vote#create', |
76 | default_threshold: 5, | 76 | default_threshold: 5, |
77 | to: lambda {|vote| vote.voter}, | 77 | to: lambda {|vote| vote.voter}, |
78 | - value: lambda { |vote, voter| vote.voteable.profile.identifier == 'conferencia' ? Vote.where(voteable_id: Article.conference_articles.select("articles.id")).for_voter(voter).count : 0} | 78 | + value: lambda { |vote, voter| (vote.voteable.profile.identifier == 'conferencia' and voter.present?) ? Vote.where(voteable_id: Article.conference_articles.select("articles.id")).for_voter(voter).count : 0} |
79 | } | 79 | } |
80 | ], | 80 | ], |
81 | creative_conferencia: [ | 81 | creative_conferencia: [ |
lib/juventude_plugin.rb
@@ -0,0 +1,11 @@ | @@ -0,0 +1,11 @@ | ||
1 | +#user .logged-in .gamification-plugin.user-info-template { | ||
2 | + margin-left: 0 !important | ||
3 | + padding: 0 !important | ||
4 | +} | ||
5 | +#user .logged-in .gamification-plugin.user-info-template * { | ||
6 | + display: none; | ||
7 | +} | ||
8 | + | ||
9 | +.action-gamification_plugin_profile-dashboard { | ||
10 | + display: none; | ||
11 | +} |