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 a
+hover-link +hover-link
color: inherit color: inherit
margin-right: .5em
a, > form a, > form
background: background:
image: image-url("neomail.png")
position: left center position: left center
repeat: no-repeat repeat: no-repeat
padding-left: image-width("neomail.png") + 4px 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 select
width: 10em width: 10em

View file

@ -16,6 +16,10 @@ module ClosetHangersHelper
"http://www.neopets.com/neomessages.phtml?type=send&recipient=#{CGI.escape neopets_username}" "http://www.neopets.com/neomessages.phtml?type=send&recipient=#{CGI.escape neopets_username}"
end 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) def hangers_group_visibility_field_name(owned)
owned ? :owned_closet_hangers_visibility : :wanted_closet_hangers_visibility owned ? :owned_closet_hangers_visibility : :wanted_closet_hangers_visibility
end end

View file

@ -18,7 +18,12 @@
- if public_perspective? - if public_perspective?
- if @user.contact_neopets_username? - if @user.contact_neopets_username?
= link_to t('.send_neomail', neopets_username: @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 - else
= form_for @user do |f| = form_for @user do |f|
= f.label :contact_neopets_connection_id = f.label :contact_neopets_connection_id

View file

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