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-29 07:52:04 -07:00
|
|
|
- secondary_nav do
|
2011-07-15 14:21:18 -07:00
|
|
|
= 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-25 11:06:07 -07:00
|
|
|
= text_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-26 15:56:14 -07:00
|
|
|
- canonical_path user_closet_hangers_path(@user)
|
|
|
|
|
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-26 15:41:15 -07:00
|
|
|
%span#edit-contact-link-to-replace-form.edit-contact-link{:class => @user.neopets_username? ? 'has-value' : nil}
|
2011-07-22 11:02:04 -07:00
|
|
|
%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-30 10:40:41 -07:00
|
|
|
- unless public_perspective?
|
|
|
|
%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
|
|
|
|
%strong
|
|
|
|
You can share
|
|
|
|
= link_to "this page", request.fullpath
|
|
|
|
with the world,
|
|
|
|
and they'll be able to see what items you own and want.
|
|
|
|
It's also a good idea to
|
|
|
|
%span.edit-contact-link add your Neopets username
|
|
|
|
so that when other users see your items they will know how to contact you for
|
|
|
|
trades.
|
2011-07-22 14:55:05 -07:00
|
|
|
|
2011-07-30 10:40:41 -07:00
|
|
|
%p
|
|
|
|
You can also make lists of items.
|
|
|
|
%strong
|
|
|
|
= link_to 'Get started with an Up For Trade list',
|
|
|
|
new_user_closet_list_path(@user, :closet_list => {:hangers_owned => true, :name => 'Up For Trade'})
|
|
|
|
then start adding to it! You can use the search form at the top to find
|
|
|
|
items, and you can also drag-and-drop items in and out of lists. Enjoy!
|
2011-07-22 14:55:05 -07:00
|
|
|
|
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|
|
2011-07-30 10:40:41 -07:00
|
|
|
.closet-hangers-group{'data-owned' => owned.to_s, :id => "closet-hangers-group-#{owned}"}
|
2011-07-22 15:06:46 -07:00
|
|
|
%header
|
2011-07-25 11:06:07 -07:00
|
|
|
%h3
|
2011-07-29 08:25:17 -07:00
|
|
|
Items #{closet_hanger_subject} #{closet_hanger_verb(owned)}
|
2011-07-29 07:52:04 -07:00
|
|
|
%span.toggle.show show
|
|
|
|
%span.toggle.hide hide
|
2011-07-29 10:29:32 -07:00
|
|
|
- unless public_perspective?
|
|
|
|
= link_to_add_closet_list 'Add new list', :owned => owned, :class => 'add-closet-list'
|
2011-07-22 14:55:05 -07:00
|
|
|
.closet-hangers-group-content
|
2011-07-29 07:52:04 -07:00
|
|
|
= render_closet_lists(@closet_lists_by_owned[owned])
|
2011-07-30 16:47:04 -07:00
|
|
|
.closet-list.unlisted{'data-hangers-count' => unlisted_hangers_count(owned)}
|
2011-07-30 19:08:38 -07:00
|
|
|
%header
|
2011-07-30 16:47:04 -07:00
|
|
|
- unless public_perspective?
|
|
|
|
= form_for @user, :html => {:class => 'visibility-form'} do |f|
|
|
|
|
= f.select hangers_group_visibility_field_name(owned),
|
2011-07-30 19:34:27 -07:00
|
|
|
closet_visibility_choices(:human_name)
|
2011-07-30 16:47:04 -07:00
|
|
|
= f.submit "Save"
|
2011-07-30 19:08:38 -07:00
|
|
|
= closet_visibility_descriptions
|
|
|
|
- if has_lists?(owned)
|
|
|
|
%h4 (Not in a list)
|
|
|
|
.closet-list-content
|
2011-07-30 16:47:04 -07:00
|
|
|
.closet-list-hangers
|
|
|
|
= render_unlisted_closet_hangers(owned)
|
|
|
|
%span.empty-list
|
|
|
|
All the items you #{closet_hanger_verb owned} are in lists.
|
2011-07-22 14:55:05 -07:00
|
|
|
- if public_perspective?
|
2011-07-29 07:52:04 -07:00
|
|
|
- unless has_hangers?(owned)
|
2011-07-26 15:41:15 -07:00
|
|
|
%p #{@user.name} doesn't seem to #{closet_hanger_verb(owned, false)} anything.
|
2011-07-22 14:55:05 -07:00
|
|
|
- else
|
2011-07-29 07:52:04 -07:00
|
|
|
- unless has_hangers?(owned)
|
2011-07-22 14:55:05 -07:00
|
|
|
%p
|
2011-07-26 15:41:15 -07:00
|
|
|
You haven't tracked any items you #{closet_hanger_verb(owned)} on
|
|
|
|
Dress to Impress. As you browse the site and create outfits, we'll
|
|
|
|
use this list to tell you what items you #{closet_hanger_verb(owned)},
|
|
|
|
and you can share this page with your friends, too.
|
2011-07-22 14:55:05 -07:00
|
|
|
%p
|
2011-07-26 15:41:15 -07:00
|
|
|
It's easy to get started! Use the search form at the top of the
|
|
|
|
page to find items to add, or add an item from its
|
2011-07-22 14:55:05 -07:00
|
|
|
= link_to 'Infinite Closet', items_path
|
2011-07-26 15:41:15 -07:00
|
|
|
page.
|
|
|
|
- if owned
|
|
|
|
%p
|
|
|
|
You can even
|
|
|
|
= succeed ',' do
|
|
|
|
= link_to "import your Neopets closet in a few quick steps", new_closet_page_path
|
|
|
|
so why not?
|
|
|
|
%p Have fun!
|
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
|
|
|
|