1
0
Fork 0
forked from OpenNeo/impress
impress/app/views/closet_hangers/index.html.haml

120 lines
5.1 KiB
Text
Raw Normal View History

- unless public_perspective?
- 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
%span#toggle-help Need help?
= 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
2011-07-12 17:03:04 -07:00
- else
- title "#{@user.name}'s Items"
- secondary_nav do
%span#toggle-compare Compare with Your Items
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
%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?
#closet-hangers-help{:class => closet_hangers_help_class}
:markdown
**These are your items! You can track what items you want and own, and
share [this page](#{request.fullpath}) with the world**. Just look up an
item in the search form above to get started.
2011-07-30 10:40:41 -07:00
**You can also sort your items into lists.**
[Building an Up For Trade list is a good place to start][uft]. You can
make lists for trade items with different market values, a private list of
what you need for that next outfit, or whatever you like. You can also
drag-and-drop items in and out of lists. It's pretty fun.
2011-07-22 14:55:05 -07:00
**Your items also have privacy settings.**
Items can be **private**, so only you can see them. They can be **public**,
so you can share this page with friends. They can even be **trading**,
meaning that we'll mention on the item's [Infinite Closet][ic] page that
you own or want that item.
2011-07-30 21:59:29 -07:00
**We try to make trading easy.** If there's some item you want, you can
pull up that item's [Infinite Closet][ic] page to see if anyone is offering
it, and see what *that* user wants
in exchange. It's all pretty spiffy. Also, if you plan to trade, your should
<span class="edit-contact-link">add your Neopets username</span> so that
when other users come here they know how to contact you.
2011-07-30 21:59:29 -07:00
**Have fun!** If you have any [neat ideas][suggestions] or [general praise and
bug reports][mail], we love to hear them. And, if you enjoy this feature,
[please consider donating to keep Dress to Impress running and improving][donate].
Thanks!
2011-07-30 21:59:29 -07:00
[donate]: #{donate_path}
[ic]: #{items_path}
[mail]: mailto:#{contact_email}
[suggestions]: #{feedback_url}
[uft]: #{new_user_closet_list_path(@user, :closet_list => {:hangers_owned => true, :name => 'Up For Trade', :visibility => ClosetVisibility[:trading].id})}
2011-07-22 14:55:05 -07:00
- unless public_perspective?
#closet-hangers-extras
2011-07-31 16:24:06 -07:00
#closet-hangers-share
%label{:for => 'closet-hangers-share-box'} Public URL:
%input#closet-hangers-share-box{:type => 'text', :value => user_closet_hangers_url(@user), :readonly => true}
2011-08-02 19:42:56 -07:00
= link_to "Import from closet", new_closet_page_path
= link_to "Import from SDB", new_safety_deposit_page_path
= link_to "Export to petpage", petpage_user_closet_hangers_path(@user)
2011-07-31 16:24:06 -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
%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
- 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])
.closet-list.unlisted{'data-hangers-count' => unlisted_hangers_count(owned)}
%header
- unless public_perspective?
= form_for @user, :html => {:class => 'visibility-form'} do |f|
= f.select hangers_group_visibility_field_name(owned),
closet_visibility_choices(:human_name)
= f.submit "Save"
= closet_visibility_descriptions
- if has_lists?(owned)
%h4 (Not in a list)
.closet-list-content
.closet-list-hangers
= render_unlisted_closet_hangers(owned)
%span.empty-list
2011-07-30 21:59:29 -07:00
There aren't any items here.
2011-07-12 17:03:04 -07:00
- 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'