added shop wiz, etc., links to NP item show page

This commit is contained in:
Emi Matchu 2012-05-23 20:09:35 -04:00
parent 63f503e7a4
commit 4451800e42
2 changed files with 22 additions and 1 deletions

View file

@ -85,6 +85,22 @@ module ItemsHelper
def neoitems_url_for(item)
sprintf(NeoitemsURLFormat, CGI::escape(item.name))
end
def shop_wizard_url_for(item)
"http://www.neopets.com/market.phtml?type=wizard&string=#{CGI::escape item.name}"
end
def super_shop_wizard_url_for(item)
"http://www.neopets.com/portal/supershopwiz.phtml?string=#{CGI::escape item.name}"
end
def trading_post_url_for(item)
"http://www.neopets.com/island/tradingpost.phtml?type=browse&criteria=item_exact&search_string=#{CGI::escape item.name}"
end
def auction_genie_url_for(item)
"http://www.neopets.com/genie.phtml?type=process_genie&criteria=exact&auctiongenie=#{CGI::escape item.name}"
end
def render_trading_closet_hangers(owned)
@trading_closet_hangers_by_owned[owned].map do |hanger|

View file

@ -8,7 +8,12 @@
= nc_icon_for(@item)
- unless @item.rarity.blank?
== Rarity: #{@item.rarity_index} (#{@item.rarity})
= link_to 'NeoItems', neoitems_url_for(@item), :class => 'button'
= link_to 'NeoItems', neoitems_url_for(@item)
- unless @item.nc?
= link_to 'Shop Wizard', shop_wizard_url_for(@item)
= link_to 'Super Wizard', super_shop_wizard_url_for(@item)
= link_to 'Trades', trading_post_url_for(@item)
= link_to 'Auctions', trading_post_url_for(@item)
- if user_signed_in?
#closet-hangers