added shop wiz, etc., links to NP item show page
This commit is contained in:
parent
63f503e7a4
commit
4451800e42
2 changed files with 22 additions and 1 deletions
|
@ -86,6 +86,22 @@ module ItemsHelper
|
||||||
sprintf(NeoitemsURLFormat, CGI::escape(item.name))
|
sprintf(NeoitemsURLFormat, CGI::escape(item.name))
|
||||||
end
|
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)
|
def render_trading_closet_hangers(owned)
|
||||||
@trading_closet_hangers_by_owned[owned].map do |hanger|
|
@trading_closet_hangers_by_owned[owned].map do |hanger|
|
||||||
link_to hanger.user.name, user_closet_hangers_path(hanger.user)
|
link_to hanger.user.name, user_closet_hangers_path(hanger.user)
|
||||||
|
|
|
@ -8,7 +8,12 @@
|
||||||
= nc_icon_for(@item)
|
= nc_icon_for(@item)
|
||||||
- unless @item.rarity.blank?
|
- unless @item.rarity.blank?
|
||||||
== Rarity: #{@item.rarity_index} (#{@item.rarity})
|
== 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?
|
- if user_signed_in?
|
||||||
#closet-hangers
|
#closet-hangers
|
||||||
|
|
Loading…
Reference in a new issue