lookup link alongside neomail

This commit is contained in:
Emi Matchu 2014-05-15 22:34:00 -07:00
parent a8641a654c
commit 79a96b7670
5 changed files with 18 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

View file

@ -33,14 +33,20 @@ body.closet_hangers-index
a
+hover-link
color: inherit
margin-right: .5em
a, > form
background:
image: image-url("neomail.png")
position: left center
repeat: no-repeat
padding-left: image-width("neomail.png") + 4px
a.neomail, > form
background-image: image-url("neomail.png")
a.lookup
background-image: image-url("lookup.png")
select
width: 10em

View file

@ -16,6 +16,10 @@ module ClosetHangersHelper
"http://www.neopets.com/neomessages.phtml?type=send&recipient=#{CGI.escape neopets_username}"
end
def neopets_lookup_url(neopets_username)
"http://www.neopets.com/userlookup.phtml?user=#{CGI.escape neopets_username}"
end
def hangers_group_visibility_field_name(owned)
owned ? :owned_closet_hangers_visibility : :wanted_closet_hangers_visibility
end

View file

@ -18,7 +18,12 @@
- if public_perspective?
- if @user.contact_neopets_username?
= link_to t('.send_neomail', neopets_username: @user.contact_neopets_username),
send_neomail_url(@user.contact_neopets_username)
send_neomail_url(@user.contact_neopets_username),
:class => 'neomail'
= link_to t('.lookup',
neopets_username: @user.contact_neopets_username),
neopets_lookup_url(@user.contact_neopets_username),
:class => 'lookup'
- else
= form_for @user do |f|
= f.label :contact_neopets_connection_id

View file

@ -104,6 +104,7 @@ en:
item_search_placeholder: Find items to add
item_search_submit: Search
send_neomail: Neomail %{neopets_username}
lookup: "%{neopets_username}'s lookup"
neopets_username:
new: 'Add username…'
prompt: 'What Neopets username should we add?'