impress/app/views/items/show.html.haml

58 lines
1.8 KiB
Text
Raw Normal View History

2011-05-13 05:07:59 -07:00
- title @item.name
2011-05-20 16:29:04 -07:00
- content_for :meta do
%link{:rel => 'canonical', :href => url_for(@item)}
- cache "items_show_#{@item.id}_main_content" do
2011-07-15 13:32:05 -07:00
%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})
2011-07-14 09:50:24 -07:00
= link_to 'NeoItems', neoitems_url_for(@item), :class => 'button'
- if @hanger
= form_for(@hanger, :url => user_item_closet_hanger_path(current_user, @item), :html => {:id => 'closet-hanger-form'}) do |f|
2011-07-15 13:32:05 -07:00
- if @hanger.new_record?
%header Do you own this item?
%p
We can help you track your closet.
= f.hidden_field :quantity
= f.submit "I own this item!"
- else
= f.label :quantity, "How many of these do you own?"
= f.number_field :quantity, :min => 0, :required => true
= f.submit "Save"
= link_to 'Your Items →'.html_safe, user_closet_hangers_path(current_user), :id => 'closet-hanger-form-your-items'
%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
#item-preview-header
%h3 Preview
%a#customize-more.button{:href => '/'} Customize more
#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!
:javascript
var CURRENT_ITEM_ZONES_RESTRICT = #{@item.zones_restrict.inspect},
IMPRESS_HOST = #{RemoteImpressHost.inspect};
= include_javascript_libraries :jquery, :swfobject
= javascript_include_tag 'items/show'