oops. quantity form only shows on current user closet
This commit is contained in:
parent
437b1c052d
commit
99e59a2f9b
4 changed files with 19 additions and 17 deletions
|
@ -34,7 +34,8 @@ body.closet_hangers-index
|
|||
font-size: 16px
|
||||
font-weight: bold
|
||||
|
||||
&:hover
|
||||
&.current-user
|
||||
.object:hover
|
||||
.quantity
|
||||
+opacity(1)
|
||||
top: $object-img-size - 30px
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
.object
|
||||
= render :partial => 'items/item_link', :locals => {:item => closet_hanger.item}
|
||||
.quantity
|
||||
%span{:title => "You own #{pluralize closet_hanger.quantity, closet_hanger.item.name}"}= closet_hanger.quantity
|
||||
= form_for closet_hanger, :url => user_item_closet_hanger_path(current_user, closet_hanger.item) do |f|
|
||||
= 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.submit "Save"
|
||||
%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|
|
||||
= 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.submit "Save"
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
= link_to "Import closet from Neopets", new_closet_page_path, :id => 'import-link'
|
||||
- else
|
||||
- title "#{@user.name}'s Items"
|
||||
#closet-hangers
|
||||
#closet-hangers{:class => user_is?(@user) ? 'current-user' : nil}
|
||||
- if !@closet_hangers.empty?
|
||||
= render @closet_hangers
|
||||
- else
|
||||
|
|
|
@ -623,29 +623,29 @@ body.closet_hangers-index #closet-hangers .object .quantity span, body.closet_ha
|
|||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
/* line 38, ../../../app/stylesheets/closet_hangers/_index.sass */
|
||||
body.closet_hangers-index #closet-hangers .object:hover .quantity {
|
||||
/* line 39, ../../../app/stylesheets/closet_hangers/_index.sass */
|
||||
body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity {
|
||||
-moz-opacity: 1;
|
||||
-webkit-opacity: 1;
|
||||
-o-opacity: 1;
|
||||
-khtml-opacity: 1;
|
||||
top: 50px;
|
||||
}
|
||||
/* line 42, ../../../app/stylesheets/closet_hangers/_index.sass */
|
||||
body.closet_hangers-index #closet-hangers .object:hover .quantity span {
|
||||
/* line 43, ../../../app/stylesheets/closet_hangers/_index.sass */
|
||||
body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity span {
|
||||
display: none;
|
||||
}
|
||||
/* line 45, ../../../app/stylesheets/closet_hangers/_index.sass */
|
||||
body.closet_hangers-index #closet-hangers .object:hover .quantity form {
|
||||
/* line 46, ../../../app/stylesheets/closet_hangers/_index.sass */
|
||||
body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity form {
|
||||
display: inline;
|
||||
}
|
||||
/* line 48, ../../../app/stylesheets/closet_hangers/_index.sass */
|
||||
body.closet_hangers-index #closet-hangers .object:hover .quantity form input[type=number] {
|
||||
/* line 49, ../../../app/stylesheets/closet_hangers/_index.sass */
|
||||
body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity form input[type=number] {
|
||||
padding: 2px;
|
||||
width: 2em;
|
||||
}
|
||||
/* line 52, ../../../app/stylesheets/closet_hangers/_index.sass */
|
||||
body.closet_hangers-index #closet-hangers .object:hover .quantity input[type=submit] {
|
||||
/* line 53, ../../../app/stylesheets/closet_hangers/_index.sass */
|
||||
body.closet_hangers-index #closet-hangers.current-user .object:hover .quantity input[type=submit] {
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue