forked from OpenNeo/impress
89 lines
3.4 KiB
Text
89 lines
3.4 KiB
Text
- unless public_perspective?
|
|
- title 'Your Items'
|
|
- add_body_class 'current-user'
|
|
- content_for :before_flashes do
|
|
= link_to "Import closet from Neopets", new_closet_page_path, :id => 'import-link'
|
|
= form_tag items_path, :method => :get, :id => 'closet-hangers-items-search', 'data-current-user-id' => current_user.id do
|
|
= text_field_tag :q, nil, :placeholder => "Find items to add"
|
|
= submit_tag 'Search', :name => nil
|
|
- else
|
|
- title "#{@user.name}'s Items"
|
|
|
|
- canonical_path user_closet_hangers_path(@user)
|
|
|
|
- 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
|
|
%span#edit-contact-link-to-replace-form.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
|
|
= form_for @user do |f|
|
|
= f.label :neopets_username
|
|
= f.text_field :neopets_username
|
|
= f.submit "Save"
|
|
%span#cancel-contact-link cancel
|
|
|
|
- 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 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.
|
|
|
|
#closet-hangers{:class => public_perspective? ? nil : 'current-user'}
|
|
- [true, false].each do |owned|
|
|
.closet-hangers-group{'data-owned' => owned.to_s}
|
|
%header
|
|
%h3
|
|
Items
|
|
= closet_hanger_subject
|
|
%span.verb= closet_hanger_verb(owned)
|
|
%span.show click to show
|
|
%span.hide click to hide
|
|
.closet-hangers-group-content
|
|
- if public_perspective?
|
|
- unless @closet_hangers_by_owned[owned]
|
|
%p #{@user.name} doesn't seem to #{closet_hanger_verb(owned, false)} anything.
|
|
- else
|
|
- unless @closet_hangers_by_owned[owned]
|
|
%p
|
|
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.
|
|
%p
|
|
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
|
|
= link_to 'Infinite Closet', items_path
|
|
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!
|
|
= render_closet_hangers(owned)
|
|
|
|
- content_for :stylesheets do
|
|
= stylesheet_link_tag 'south-street/jquery-ui'
|
|
|
|
- content_for :javascripts do
|
|
= include_javascript_libraries :jquery
|
|
= javascript_include_tag 'jquery.ui', 'jquery.jgrowl', 'placeholder', 'closet_hangers/index'
|
|
|