Compare commits
2 commits
18a7e8fd9e
...
23e951edcd
| Author | SHA1 | Date | |
|---|---|---|---|
| 23e951edcd | |||
| aac3e5a5a9 |
3 changed files with 14 additions and 3 deletions
|
|
@ -141,6 +141,13 @@ module ItemsHelper
|
||||||
def auction_genie_url_for(item)
|
def auction_genie_url_for(item)
|
||||||
AUCTION_GENIE_URL_TEMPLATE.expand(auctiongenie: item.name).to_s
|
AUCTION_GENIE_URL_TEMPLATE.expand(auctiongenie: item.name).to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
LEBRON_URL_TEMPLATE = Addressable::Template.new(
|
||||||
|
"https://stylisher.club/search/{name}"
|
||||||
|
)
|
||||||
|
def lebron_url_for(item)
|
||||||
|
LEBRON_URL_TEMPLATE.expand(name: item.name).to_s
|
||||||
|
end
|
||||||
|
|
||||||
def format_contribution_count(count)
|
def format_contribution_count(count)
|
||||||
" (×#{count})".html_safe if count > 1
|
" (×#{count})".html_safe if count > 1
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,13 @@
|
||||||
= link_to t('items.show.resources.jn_items'), jn_items_url_for(item)
|
= link_to t('items.show.resources.jn_items'), jn_items_url_for(item)
|
||||||
= link_to t('items.show.resources.impress_2020'), impress_2020_url_for(item)
|
= link_to t('items.show.resources.impress_2020'), impress_2020_url_for(item)
|
||||||
- if item.nc_trade_value
|
- if item.nc_trade_value
|
||||||
= link_to 'https://www.neopets.com/~lebron',
|
= link_to lebron_url_for(item),
|
||||||
title: nc_trade_value_updated_at_text(item.nc_trade_value) do
|
title: nc_trade_value_updated_at_text(item.nc_trade_value) do
|
||||||
= t 'items.show.resources.lebron',
|
= t 'items.show.resources.lebron_value',
|
||||||
value: nc_trade_value_estimate_text(item.nc_trade_value)
|
value: nc_trade_value_estimate_text(item.nc_trade_value)
|
||||||
|
- elsif item.nc?
|
||||||
|
= link_to lebron_url_for(item) do
|
||||||
|
= t 'items.show.resources.lebron'
|
||||||
- unless item.nc?
|
- unless item.nc?
|
||||||
= link_to t('items.show.resources.shop_wizard'), shop_wizard_url_for(item)
|
= link_to t('items.show.resources.shop_wizard'), shop_wizard_url_for(item)
|
||||||
= link_to t('items.show.resources.trading_post'), trading_post_url_for(item)
|
= link_to t('items.show.resources.trading_post'), trading_post_url_for(item)
|
||||||
|
|
|
||||||
|
|
@ -310,7 +310,8 @@ en:
|
||||||
resources:
|
resources:
|
||||||
jn_items: JN Items
|
jn_items: JN Items
|
||||||
impress_2020: DTI 2020
|
impress_2020: DTI 2020
|
||||||
lebron: "Lebron: %{value}"
|
lebron: Lebron
|
||||||
|
lebron_value: "Lebron: %{value}"
|
||||||
shop_wizard: Shop Wizard
|
shop_wizard: Shop Wizard
|
||||||
trading_post: Trades
|
trading_post: Trades
|
||||||
auction_genie: Auctions
|
auction_genie: Auctions
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue