]> git.openstreetmap.org Git - rails.git/blob - app/helpers/user_helper.rb
Clean up search JS
[rails.git] / app / helpers / user_helper.rb
1 module UserHelper
2   def user_image(user, options = {})
3     options[:class] ||= "user_image"
4
5     image_tag user.image.url(:large), options
6   end
7
8   def user_thumbnail(user, options = {})
9     options[:class] ||= "user_thumbnail"
10
11     image_tag user.image.url(:small), options
12   end
13
14   def openid_logo
15     image_tag "openid_small.png", :alt => t('user.login.openid_logo_alt'), :class => "openid_logo"
16   end
17
18   def openid_button(name, url)
19     link_to(
20       image_tag("#{name}.png", :alt => t("user.login.openid_providers.#{name}.alt")),
21       "#",
22       :class => "openid_button", :data => { :url => url },
23       :title => t("user.login.openid_providers.#{name}.title")
24     )
25   end
26 end