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

55 lines
2.2 KiB
Text
Raw Normal View History

- unless public_perspective?
- title 'Your Items'
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'
= 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"
= submit_tag 'Search', :name => nil
2011-07-12 17:03:04 -07:00
- else
- title "#{@user.name}'s Items"
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
= form_for @user do |f|
= f.label :neopets_username
= f.text_field :neopets_username
= f.submit "Save"
#closet-hangers{:class => public_perspective? ? nil : 'current-user'}
2011-07-20 12:16:22 -07:00
- if public_perspective?
- if @closet_hangers.empty?
%p #{@user.name} hasn't tracked any items on Dress to Impress.
- else
- unless @closet_hangers.empty?
%p
These are the items you own. Hover over an item to remove it from the
list or to change the quantity.
2011-07-20 12:16:22 -07:00
- else
%p You haven't tracked any items on Dress to Impress.
2011-07-12 17:03:04 -07:00
%p
Here you can keep track of what items you already own, so that as you
design fancy outfits you can know what you have and what you still
need. And, who knows? Maybe some day this page will include wishlists
and up-for-trade items. We'll see what happens.
%p
It's easy to get started!
= link_to "Just import your Neopets closet in a few quick steps.", new_closet_page_path
Have fun!
2011-07-20 12:16:22 -07:00
%p
You can share
= link_to "this page", request.fullpath
with the world, and they'll be able to see what items you own.
= render :partial => 'closet_hanger', :collection => @closet_hangers, :locals => {:show_controls => user_is?(@user)}
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'