diff --git a/app/assets/images/lookup.png b/app/assets/images/lookup.png new file mode 100644 index 00000000..0468cf08 Binary files /dev/null and b/app/assets/images/lookup.png differ diff --git a/app/assets/stylesheets/closet_hangers/_index.sass b/app/assets/stylesheets/closet_hangers/_index.sass index 7770ed1a..5fceef6e 100644 --- a/app/assets/stylesheets/closet_hangers/_index.sass +++ b/app/assets/stylesheets/closet_hangers/_index.sass @@ -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 diff --git a/app/helpers/closet_hangers_helper.rb b/app/helpers/closet_hangers_helper.rb index 8cc0f1fc..41d97e8c 100644 --- a/app/helpers/closet_hangers_helper.rb +++ b/app/helpers/closet_hangers_helper.rb @@ -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 diff --git a/app/views/closet_hangers/index.html.haml b/app/views/closet_hangers/index.html.haml index e8f0e0b4..c821a2e2 100644 --- a/app/views/closet_hangers/index.html.haml +++ b/app/views/closet_hangers/index.html.haml @@ -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 diff --git a/config/locales/en.yml b/config/locales/en.yml index 02991dfb..0e2f7a7a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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?'