oops. quantity form only shows on current user closet

This commit is contained in:
Emi Matchu 2011-07-15 19:29:43 -04:00
parent 437b1c052d
commit 99e59a2f9b
4 changed files with 19 additions and 17 deletions

View file

@ -34,7 +34,8 @@ body.closet_hangers-index
font-size: 16px font-size: 16px
font-weight: bold font-weight: bold
&:hover &.current-user
.object:hover
.quantity .quantity
+opacity(1) +opacity(1)
top: $object-img-size - 30px top: $object-img-size - 30px

View file

@ -1,7 +1,8 @@
.object .object
= render :partial => 'items/item_link', :locals => {:item => closet_hanger.item} = render :partial => 'items/item_link', :locals => {:item => closet_hanger.item}
.quantity .quantity
%span{:title => "You own #{pluralize closet_hanger.quantity, closet_hanger.item.name}"}= closet_hanger.quantity %span= closet_hanger.quantity
- if user_is?(closet_hanger.user)
= form_for closet_hanger, :url => user_item_closet_hanger_path(current_user, closet_hanger.item) do |f| = form_for closet_hanger, :url => user_item_closet_hanger_path(current_user, closet_hanger.item) do |f|
= hidden_field_tag :return_to, request.fullpath = hidden_field_tag :return_to, request.fullpath
= f.number_field :quantity, :min => 0, :required => true, :title => "You own #{pluralize closet_hanger.quantity, closet_hanger.item.name}" = f.number_field :quantity, :min => 0, :required => true, :title => "You own #{pluralize closet_hanger.quantity, closet_hanger.item.name}"

View file

@ -4,7 +4,7 @@
= link_to "Import closet from Neopets", new_closet_page_path, :id => 'import-link' = link_to "Import closet from Neopets", new_closet_page_path, :id => 'import-link'
- else - else
- title "#{@user.name}'s Items" - title "#{@user.name}'s Items"
#closet-hangers #closet-hangers{:class => user_is?(@user) ? 'current-user' : nil}
- if !@closet_hangers.empty? - if !@closet_hangers.empty?
= render @closet_hangers = render @closet_hangers
- else - else

View file

@ -623,29 +623,29 @@ body.closet_hangers-index #closet-hangers .object .quantity span, body.closet_ha
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
} }
/* line 38, ../../../app/stylesheets/closet_hangers/_index.sass */ /* line 39, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #closet-hangers .object:hover .quantity { body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity {
-moz-opacity: 1; -moz-opacity: 1;
-webkit-opacity: 1; -webkit-opacity: 1;
-o-opacity: 1; -o-opacity: 1;
-khtml-opacity: 1; -khtml-opacity: 1;
top: 50px; top: 50px;
} }
/* line 42, ../../../app/stylesheets/closet_hangers/_index.sass */ /* line 43, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #closet-hangers .object:hover .quantity span { body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity span {
display: none; display: none;
} }
/* line 45, ../../../app/stylesheets/closet_hangers/_index.sass */ /* line 46, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #closet-hangers .object:hover .quantity form { body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity form {
display: inline; display: inline;
} }
/* line 48, ../../../app/stylesheets/closet_hangers/_index.sass */ /* line 49, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #closet-hangers .object:hover .quantity form input[type=number] { body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity form input[type=number] {
padding: 2px; padding: 2px;
width: 2em; width: 2em;
} }
/* line 52, ../../../app/stylesheets/closet_hangers/_index.sass */ /* line 53, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #closet-hangers .object:hover .quantity input[type=submit] { body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity input[type=submit] {
font-size: 85%; font-size: 85%;
} }