From 79a96b7670af74577558068886278eef73fde762 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 15 May 2014 22:34:00 -0700 Subject: [PATCH] lookup link alongside neomail --- app/assets/images/lookup.png | Bin 0 -> 793 bytes app/assets/stylesheets/closet_hangers/_index.sass | 8 +++++++- app/helpers/closet_hangers_helper.rb | 4 ++++ app/views/closet_hangers/index.html.haml | 7 ++++++- config/locales/en.yml | 1 + 5 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 app/assets/images/lookup.png diff --git a/app/assets/images/lookup.png b/app/assets/images/lookup.png new file mode 100644 index 0000000000000000000000000000000000000000..0468cf08f3760dc13e44aed69f4f15cedc93b503 GIT binary patch literal 793 zcmV+!1LpjRP)a8r-1c`3+>owstQ*9I-_ekzW(ohmYMY`{P6ZeF5{f*M765oC3mgQisOM;QQbX@ggAS2KgDM2gcqZA9XdZ>iF!~Vl<60PAsYul3 zdO@$k{dkx0EmyGNDt9}0CpW25-SK_A4lC2`W(<=`JkE57@PX&*6@@GQDqw`DDAt^o zq{Ey(Out`(COaJJ>@YJM^^2KrxFq*RzAhRU<&M8e2tg%w*9#|$0B%$xx&b3n#4 zkf!uOYO^O28&82>e-b(E7tlIZg-q>P1XbD?eadJSW`T2LeMI1S3A7{YkWT@r!zKv( zO-N}zjVBW|c%-j32i0RzNc%F;I4prs$%aP>#pqIKVL?pfIIhp@vQS;GLtGb-&KrG^L94A_pU%f6M3**AM

gJ6i>thi*In%G< z11qR?nZ<5fV+Cs0?EF;*rjKIYInQ$Ka$^8kIXfoF@SaV-aWlw~zZ}ip35JN+^=tnJ XxNVQ!&Csrn00000NkvXXu0mjfj)-I{ literal 0 HcmV?d00001 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?'