diff --git a/app/helpers/items_helper.rb b/app/helpers/items_helper.rb index 30be7a78..b7cc96af 100644 --- a/app/helpers/items_helper.rb +++ b/app/helpers/items_helper.rb @@ -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| diff --git a/app/views/items/show.html.haml b/app/views/items/show.html.haml index 2cad15bd..6d388a3b 100644 --- a/app/views/items/show.html.haml +++ b/app/views/items/show.html.haml @@ -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