2011-07-20 09:39:18 -07:00
|
|
|
- unless public_perspective?
|
2011-07-13 09:10:47 -07:00
|
|
|
- title 'Your Items'
|
2011-07-22 11:02:04 -07:00
|
|
|
- add_body_class 'current-user'
|
2011-07-15 14:21:18 -07:00
|
|
|
- content_for :before_flashes do
|
|
|
|
= link_to "Import closet from Neopets", new_closet_page_path, :id => 'import-link'
|
2011-07-15 22:09:04 -07:00
|
|
|
= form_tag items_path, :method => :get, :id => 'closet-hangers-items-search', 'data-current-user-id' => current_user.id do
|
2011-07-17 14:24:29 -07:00
|
|
|
= search_field_tag :q, nil, :placeholder => "Find items to add"
|
2011-07-15 22:09:04 -07:00
|
|
|
= submit_tag 'Search', :name => nil
|
2011-07-12 17:03:04 -07:00
|
|
|
- else
|
2011-07-13 09:10:47 -07:00
|
|
|
- title "#{@user.name}'s Items"
|
2011-07-15 19:52:53 -07:00
|
|
|
|
2011-07-20 12:16:22 -07:00
|
|
|
- content_for :before_flashes do
|
|
|
|
#closet-hangers-contact
|
|
|
|
- if public_perspective?
|
|
|
|
- if @user.neopets_username?
|
|
|
|
= link_to "Neomail #{@user.neopets_username}", send_neomail_url(@user)
|
|
|
|
- else
|
2011-07-22 11:02:04 -07:00
|
|
|
%span#edit-contact-link{:class => @user.neopets_username? ? 'has-value' : nil}
|
|
|
|
%span#contact-link-no-value
|
|
|
|
Add your Neopets username
|
|
|
|
%span#contact-link-has-value
|
|
|
|
Edit
|
|
|
|
= surround '"' do
|
|
|
|
Neomail
|
|
|
|
%span= @user.neopets_username
|
2011-07-20 12:16:22 -07:00
|
|
|
= form_for @user do |f|
|
|
|
|
= f.label :neopets_username
|
|
|
|
= f.text_field :neopets_username
|
|
|
|
= f.submit "Save"
|
2011-07-22 11:02:04 -07:00
|
|
|
%span#cancel-contact-link cancel
|
2011-07-20 12:16:22 -07:00
|
|
|
|
2011-07-22 14:55:05 -07:00
|
|
|
- unless @closet_hangers_by_owned.empty?
|
|
|
|
%p
|
|
|
|
These are the items you are tracking on Dress to Impress. Hover over an
|
|
|
|
item to remove it from the list or to change the quantity.
|
|
|
|
|
|
|
|
%p
|
|
|
|
You can share
|
|
|
|
= link_to "this page", request.fullpath
|
|
|
|
with the world, and they'll be able to see what items you own.
|
|
|
|
|
2011-07-20 09:39:18 -07:00
|
|
|
#closet-hangers{:class => public_perspective? ? nil : 'current-user'}
|
2011-07-22 14:55:05 -07:00
|
|
|
- [true, false].each do |owned|
|
|
|
|
.closet-hangers-group{'data-owned' => owned.to_s}
|
2011-07-22 15:06:46 -07:00
|
|
|
%header
|
|
|
|
%h3 Items #{closet_hanger_subject} #{closet_hanger_verb(owned)}
|
|
|
|
%span.show click to show
|
|
|
|
%span.hide click to hide
|
2011-07-22 14:55:05 -07:00
|
|
|
.closet-hangers-group-content
|
|
|
|
- if public_perspective?
|
|
|
|
- unless @closet_hangers_by_owned[owned]
|
|
|
|
%p #{@user.name} hasn't tracked any items on Dress to Impress.
|
|
|
|
- else
|
|
|
|
- unless @closet_hangers_by_owned[owned]
|
|
|
|
%p
|
|
|
|
You haven't tracked any #{closet_hanger_verb(owned)} items on Dress
|
|
|
|
to Impress. It's worth doing, since you can share this list with your
|
|
|
|
friends and keep track of what items you still need as you create new
|
|
|
|
outfits.
|
|
|
|
%p
|
|
|
|
It's easy to get started!
|
|
|
|
= link_to "Just import your Neopets closet in a few quick steps.", new_closet_page_path
|
|
|
|
You can also add an item from its
|
|
|
|
= link_to 'Infinite Closet', items_path
|
|
|
|
page. Have fun!
|
|
|
|
= render_closet_hangers(owned)
|
2011-07-12 17:03:04 -07:00
|
|
|
|
2011-07-15 22:09:04 -07:00
|
|
|
- content_for :stylesheets do
|
|
|
|
= stylesheet_link_tag 'south-street/jquery-ui'
|
|
|
|
|
2011-07-15 19:52:53 -07:00
|
|
|
- content_for :javascripts do
|
|
|
|
= include_javascript_libraries :jquery
|
2011-07-15 22:09:04 -07:00
|
|
|
= javascript_include_tag 'jquery.ui', 'jquery.jgrowl', 'placeholder', 'closet_hangers/index'
|
2011-07-15 19:52:53 -07:00
|
|
|
|