1
0
Fork 0
forked from OpenNeo/impress

improve Your Items copy given the different groups

This commit is contained in:
Emi Matchu 2011-07-26 18:41:15 -04:00
parent c3279f0512
commit c592459d02
6 changed files with 79 additions and 64 deletions

View file

@ -1,8 +1,8 @@
require 'cgi'
module ClosetHangersHelper
def closet_hanger_verb(owned)
ClosetHanger.verb(closet_hanger_subject, owned)
def closet_hanger_verb(owned, positive=true)
ClosetHanger.verb(closet_hanger_subject, owned, positive)
end
def send_neomail_url(user)

View file

@ -15,9 +15,9 @@ class ClosetHanger < ActiveRecord::Base
self.class.verb(subject, owned?)
end
def self.verb(subject, owned)
def self.verb(subject, owned, positive=true)
base = (owned) ? 'own' : 'want'
base << 's' unless subject == :you
base << 's' if positive && subject != :you
base
end
end

View file

@ -52,15 +52,17 @@ body.closet_hangers-index
&:after
content: ":"
#edit-contact-link, #cancel-contact-link
cursor: pointer
#edit-contact-link-to-replace-form, #cancel-contact-link
display: none
.edit-contact-link, #cancel-contact-link
cursor: pointer
text-decoration: underline
&:hover
text-decoration: none
#edit-contact-link
#edit-contact-link-to-replace-form
#contact-link-has-value
display: none
@ -178,14 +180,14 @@ body.closet_hangers-index
form
display: none
#edit-contact-link, #cancel-contact-link
.edit-contact-link, #cancel-contact-link
display: inline
&.editing
form
display: block
#edit-contact-link
.edit-contact-link
display: none
.closet-hangers-group

View file

@ -15,7 +15,7 @@
- if @user.neopets_username?
= link_to "Neomail #{@user.neopets_username}", send_neomail_url(@user)
- else
%span#edit-contact-link{:class => @user.neopets_username? ? 'has-value' : nil}
%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
@ -37,7 +37,11 @@
%p
You can share
= link_to "this page", request.fullpath
with the world, and they'll be able to see what items you own.
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|
@ -52,20 +56,26 @@
.closet-hangers-group-content
- if public_perspective?
- unless @closet_hangers_by_owned[owned]
%p #{@user.name} hasn't tracked any items on Dress to Impress.
%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 #{closet_hanger_verb(owned)} items on Dress
to Impress. It's worth doing, since you can share this list with your
friends and keep track of what items you still need as you create new
outfits.
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!
= link_to "Just import your Neopets closet in a few quick steps.", new_closet_page_path
You can also add an item from its
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. Have fun!
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

View file

@ -240,7 +240,7 @@
*/
var contactEl = $('#closet-hangers-contact');
var editContactLink = $('#edit-contact-link');
var editContactLink = $('.edit-contact-link');
var contactForm = contactEl.children('form');
var cancelContactLink = $('#cancel-contact-link');
var contactFormUsername = contactForm.children('input[type=text]');

View file

@ -646,41 +646,44 @@ body.closet_hangers-index #closet-hangers-contact label:after {
content: ":";
}
/* line 55, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #edit-contact-link, body.closet_hangers-index #cancel-contact-link {
cursor: pointer;
body.closet_hangers-index #edit-contact-link-to-replace-form, body.closet_hangers-index #cancel-contact-link {
display: none;
}
/* line 58, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index .edit-contact-link, body.closet_hangers-index #cancel-contact-link {
cursor: pointer;
text-decoration: underline;
}
/* line 60, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #edit-contact-link:hover, body.closet_hangers-index #cancel-contact-link:hover {
/* line 62, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index .edit-contact-link:hover, body.closet_hangers-index #cancel-contact-link:hover {
text-decoration: none;
}
/* line 64, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #edit-contact-link #contact-link-has-value {
/* line 66, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #edit-contact-link-to-replace-form #contact-link-has-value {
display: none;
}
/* line 67, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #edit-contact-link #contact-link-no-value {
/* line 69, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #edit-contact-link-to-replace-form #contact-link-no-value {
display: inline;
}
/* line 71, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #edit-contact-link.has-value #contact-link-has-value {
/* line 73, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #edit-contact-link-to-replace-form.has-value #contact-link-has-value {
display: inline;
}
/* line 74, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #edit-contact-link.has-value #contact-link-no-value {
/* line 76, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #edit-contact-link-to-replace-form.has-value #contact-link-no-value {
display: none;
}
/* line 77, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 79, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #cancel-contact-link {
margin-left: 1em;
}
/* line 80, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 82, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #closet-hangers {
clear: both;
text-align: center;
}
/* line 85, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 87, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #closet-hangers .object .quantity {
-moz-opacity: 0.75;
-webkit-opacity: 0.75;
@ -694,16 +697,16 @@ body.closet_hangers-index #closet-hangers .object .quantity {
text-align: left;
top: 60px;
}
/* line 95, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 97, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #closet-hangers .object .quantity span, body.closet_hangers-index #closet-hangers .object .quantity input[type=number] {
font-size: 16px;
font-weight: bold;
}
/* line 99, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 101, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index #closet-hangers .object form {
display: none;
}
/* line 102, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 104, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index header {
border-bottom: 1px solid #aaddaa;
display: block;
@ -711,12 +714,12 @@ body.closet_hangers-index header {
padding: 0.25em 0;
position: relative;
}
/* line 109, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 111, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index header h3 {
font-size: 250%;
margin: 0;
}
/* line 113, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 115, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index header span.show, body.closet_hangers-index header span.hide {
color: #448844;
display: none;
@ -725,28 +728,28 @@ body.closet_hangers-index header span.show, body.closet_hangers-index header spa
right: 1em;
bottom: 0;
}
/* line 122, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 124, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index header:hover span.show, body.closet_hangers-index header:hover span.hide {
color: inherit;
text-decoration: underline;
}
/* line 126, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 128, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index .closet-hangers-group {
border-top: 1px solid #006600;
margin-bottom: 2em;
padding-bottom: 1em;
}
/* line 134, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 136, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user #closet-hangers .object:hover form {
display: inline;
}
/* line 137, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 139, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-hanger-destroy {
position: absolute;
right: 18px;
top: 0;
}
/* line 142, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 144, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-hanger-destroy input {
/* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */
-moz-border-radius: 5px;
@ -787,7 +790,7 @@ body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-han
body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-hanger-destroy input:hover {
background-color: #999999;
}
/* line 145, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 147, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity {
-moz-opacity: 1;
-webkit-opacity: 1;
@ -797,65 +800,65 @@ body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity {
top: 56px;
padding: 0;
}
/* line 151, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 153, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity span {
display: none;
}
/* line 154, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 156, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity input[type=number] {
padding: 2px;
width: 2em;
}
/* line 158, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 160, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity input[type=submit] {
font-size: 85%;
}
/* line 164, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 166, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js #closet-hangers .object:hover .quantity input[type=number] {
width: 2.5em;
}
/* line 167, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 169, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js #closet-hangers .object:hover .quantity input[type=submit] {
display: none;
}
/* line 170, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 172, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js #closet-hangers .object.loading {
background: #eeffee;
outline: 1px solid #006600;
}
/* line 174, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 176, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js #closet-hangers .object.loading .quantity span:after {
content: "…";
}
/* line 178, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 180, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js #closet-hangers-contact form {
display: none;
}
/* line 181, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js #closet-hangers-contact #edit-contact-link, body.closet_hangers-index.current-user.js #closet-hangers-contact #cancel-contact-link {
/* line 183, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js #closet-hangers-contact .edit-contact-link, body.closet_hangers-index.current-user.js #closet-hangers-contact #cancel-contact-link {
display: inline;
}
/* line 185, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 187, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js #closet-hangers-contact.editing form {
display: block;
}
/* line 188, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js #closet-hangers-contact.editing #edit-contact-link {
/* line 190, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js #closet-hangers-contact.editing .edit-contact-link {
display: none;
}
/* line 192, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 194, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js .closet-hangers-group header {
cursor: pointer;
}
/* line 195, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 197, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js .closet-hangers-group header .hide {
display: block;
}
/* line 199, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 201, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js .closet-hangers-group.hidden header .hide, body.closet_hangers-index.current-user.js .closet-hangers-group.hidden .closet-hangers-group-content {
display: none;
}
/* line 202, ../../../app/stylesheets/closet_hangers/_index.sass */
/* line 204, ../../../app/stylesheets/closet_hangers/_index.sass */
body.closet_hangers-index.current-user.js .closet-hangers-group.hidden header .show {
display: block;
}