Sha256: 20bff78dea38db7674d022607b16c38ab33797c1882dc378fb26546a15b845c8

Contents?: true

Size: 433 Bytes

Versions: 3

Compression:

Stored size: 433 Bytes

Contents

# -*- coding: utf-8 -*-
module TrophyHelper
 def display_trophy_link(user, noid)
   trophyclass = "trophy-off"
   trophytitle= "Highlight File on Profile"
   if user.trophies.map(&:generic_file_id).include? noid
     trophyclass = "trophy-on"
   end

   link_to raw("<i class='#{trophyclass} icon-trophy'></i> #{trophytitle}"),"", :class=> 'trophy-class', :title => trophytitle, :id => noid,  :remote=>true # link to trophy
 end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sufia-3.7.2 app/helpers/trophy_helper.rb
sufia-3.7.1 app/helpers/trophy_helper.rb
sufia-3.7.0 app/helpers/trophy_helper.rb