2011-05-13 05:07:59 -07:00
|
|
|
- title @item.name
|
2011-07-26 15:56:14 -07:00
|
|
|
- canonical_path @item
|
2011-05-20 16:29:04 -07:00
|
|
|
|
2012-08-09 21:02:11 -07:00
|
|
|
- cache "items/#{@item.id} header" do
|
|
|
|
%header#item-header
|
|
|
|
= image_tag @item.thumbnail_url, :id => 'item-thumbnail'
|
|
|
|
%div
|
|
|
|
%h2#item-name= @item.name
|
|
|
|
= nc_icon_for(@item)
|
|
|
|
- unless @item.rarity.blank?
|
|
|
|
== Rarity: #{@item.rarity_index} (#{@item.rarity})
|
2012-10-21 13:57:17 -07:00
|
|
|
= link_to 'JN Items', jn_items_url_for(@item)
|
2012-08-09 21:02:11 -07:00
|
|
|
- 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', auction_genie_url_for(@item)
|
2011-07-14 09:50:24 -07:00
|
|
|
|
2011-10-10 19:43:46 -07:00
|
|
|
- if user_signed_in?
|
2011-08-01 21:12:44 -07:00
|
|
|
#closet-hangers
|
2011-10-10 19:43:46 -07:00
|
|
|
%h3
|
2011-08-01 21:12:44 -07:00
|
|
|
Track this in
|
|
|
|
= link_to 'Your Items', user_closet_hangers_path(current_user)
|
2011-10-10 19:43:46 -07:00
|
|
|
= form_tag update_quantities_user_item_closet_hangers_path(:user_id => current_user, :item_id => @item), :method => :put do
|
|
|
|
#closet-hangers-ownership-groups
|
|
|
|
- @current_user_lists.each do |owned, lists|
|
|
|
|
%div
|
|
|
|
%h4 Items you #{closet_list_verb(owned)}
|
|
|
|
%ul
|
|
|
|
- lists.each do |list|
|
|
|
|
%li
|
|
|
|
= number_field_tag "quantity[#{list.id}]",
|
|
|
|
@current_user_quantities[list.id], :min => 0
|
|
|
|
= label_tag "quantity[#{list.id}]", list.name
|
|
|
|
|
|
|
|
%li
|
|
|
|
= number_field_tag "quantity[#{owned}]",
|
2012-08-09 21:02:11 -07:00
|
|
|
@current_user_quantities[owned], :min => 0
|
2011-10-10 19:43:46 -07:00
|
|
|
|
|
|
|
- unless lists.empty?
|
2012-03-23 14:37:53 -07:00
|
|
|
= label_tag "quantity[#{owned}]", :class => 'unlisted' do
|
2011-10-10 19:43:46 -07:00
|
|
|
Not in a list
|
|
|
|
- else
|
|
|
|
= label_tag "quantity[#{owned}]" do
|
|
|
|
How many?
|
|
|
|
= submit_tag 'Save to Your Items'
|
2011-05-20 17:23:37 -07:00
|
|
|
|
2012-08-09 21:02:11 -07:00
|
|
|
- cache "items/#{@item.id} info" do
|
|
|
|
%p= @item.description
|
|
|
|
|
|
|
|
#item-zones
|
|
|
|
%p
|
|
|
|
%strong Occupies:
|
|
|
|
= list_zones @item.occupied_zones, :uncertain_label
|
|
|
|
%p
|
|
|
|
%strong Restricts:
|
|
|
|
- if @item.restricted_zones.empty?
|
|
|
|
None
|
|
|
|
- else
|
|
|
|
= list_zones @item.restricted_zones
|
2011-05-20 17:23:37 -07:00
|
|
|
|
2011-08-01 21:12:44 -07:00
|
|
|
#trade-hangers
|
|
|
|
- [true, false].each do |owned|
|
|
|
|
%p
|
|
|
|
- unless @trading_closet_hangers_by_owned[owned].empty?
|
|
|
|
%strong
|
|
|
|
= pluralize @trading_closet_hangers_by_owned[owned].size, 'user'
|
|
|
|
- if owned
|
|
|
|
- if @trading_closet_hangers_by_owned[owned].size == 1
|
|
|
|
has
|
2011-07-30 21:19:28 -07:00
|
|
|
- else
|
2011-08-01 21:12:44 -07:00
|
|
|
have
|
|
|
|
this item up for trade:
|
|
|
|
- else
|
|
|
|
- if @trading_closet_hangers_by_owned[owned].size == 1
|
|
|
|
wants
|
2011-07-30 21:19:28 -07:00
|
|
|
- else
|
2011-08-01 21:12:44 -07:00
|
|
|
want
|
|
|
|
this item:
|
|
|
|
= render_trading_closet_hangers(owned)
|
|
|
|
- else
|
|
|
|
%strong
|
|
|
|
We don't know anyone who
|
|
|
|
- if owned
|
|
|
|
has this item up for trade.
|
|
|
|
- else
|
|
|
|
wants this item.
|
|
|
|
%span.toggle
|
|
|
|
%span.more more
|
|
|
|
%span.less less
|
2011-07-30 21:19:28 -07:00
|
|
|
|
2012-10-24 20:09:05 -07:00
|
|
|
- cache "items/#{@item.id} contributors" do
|
|
|
|
- unless @contributors_with_counts.empty?
|
|
|
|
#item-contributors
|
|
|
|
%header Brought to you by:
|
|
|
|
%ul
|
|
|
|
- @contributors_with_counts.each do |contributor, count|
|
|
|
|
%li #{link_to contributor.name, user_contributions_path(contributor)} #{format_contribution_count(count)}
|
|
|
|
%footer Thanks, everybody!
|
|
|
|
|
2012-08-09 21:02:11 -07:00
|
|
|
- cache 'items#show preview_header' do
|
|
|
|
#item-preview-header
|
|
|
|
%h3 Preview
|
|
|
|
%a#customize-more.button{:href => '/'} Customize more
|
2011-05-20 17:23:37 -07:00
|
|
|
|
2011-08-01 21:12:44 -07:00
|
|
|
#item-preview
|
|
|
|
#item-preview-species= standard_species_images_for(@item)
|
|
|
|
#item-preview-error
|
|
|
|
#item-preview-swf
|
|
|
|
Javascript and Flash are required to preview wearables. Sorry!
|
2011-05-20 17:23:37 -07:00
|
|
|
|
2011-08-01 21:12:44 -07:00
|
|
|
:javascript
|
|
|
|
var CURRENT_ITEM_ZONES_RESTRICT = #{@item.zones_restrict.inspect},
|
|
|
|
IMPRESS_HOST = #{RemoteImpressHost.inspect};
|
2011-05-20 17:23:37 -07:00
|
|
|
|
2011-08-01 21:12:44 -07:00
|
|
|
= include_javascript_libraries :jquery, :swfobject
|
|
|
|
= javascript_include_tag 'items/show'
|
2011-05-02 15:07:56 -07:00
|
|
|
|