Commit 1311b1500bc83c7b199fbccc10436253626dc8ab

Authored by Hugo Melo
1 parent 046756e4

Hide gamification dashboard and its link.

controllers/gamification_plugin_profile_controller.rb
... ... @@ -2,7 +2,9 @@ class GamificationPluginProfileController < ProfileController
2 2  
3 3 def dashboard
4 4 @target = profile
5   - render 'gamification/dashboard'
  5 + # temporarily render not found
  6 + #render 'gamification/dashboard'
  7 + render_not_found unless user and user.is_admin?
6 8 end
7 9  
8 10 end
... ...
views/gamification/display_notifications.html.erb
1 1 <%= stylesheet_link_tag '/plugins/gamification/animate.css' %>
2 2  
3   -<%= link_to({:controller => 'gamification_plugin_profile', :action => :dashboard, :profile => current_person.identifier }, :class => 'gamification-plugin user-info-template', :style => 'display: none') do %>
  3 +<% link_to({:controller => 'gamification_plugin_profile', :action => :dashboard, :profile => current_person.identifier }, :class => 'gamification-plugin user-info-template', :style => 'display: none') do %>
4 4 <span class="level"><span class="icon">&nbsp;</span><span class="value"></span></span>
5 5 <span class="points"><span class="icon">&nbsp;</span><span class="value"></span></span>
6 6 <span class="badges"><span class="icon">&nbsp;</span><span class="value"></span></span>
... ... @@ -9,6 +9,6 @@
9 9 <script>
10 10 <% badges.each do |badge| %>
11 11 <% html = render :file => 'gamification/notification_badge', :locals => {:badge => badge} %>
12   - <%= "gamificationPlugin.displayNotification('#{j html}');" %>
  12 + <%# "gamificationPlugin.displayNotification('#{j html}');" %>
13 13 <% end %>
14 14 </script>
... ...