fixing some of the invite copy

This commit is contained in:
maxwell 2010-10-15 11:11:25 -07:00
parent 2a6279207e
commit 20f164fd45
6 changed files with 19 additions and 19 deletions

View file

@ -122,7 +122,6 @@ GEM
selenium-webdriver (>= 0.0.3) selenium-webdriver (>= 0.0.3)
childprocess (0.0.7) childprocess (0.0.7)
ffi (~> 0.6.3) ffi (~> 0.6.3)
columnize (0.3.1)
crack (0.1.8) crack (0.1.8)
cucumber (0.9.2) cucumber (0.9.2)
builder (~> 2.1.2) builder (~> 2.1.2)
@ -163,7 +162,6 @@ GEM
i18n (0.4.1) i18n (0.4.1)
json (1.4.6) json (1.4.6)
json_pure (1.4.6) json_pure (1.4.6)
linecache (0.43)
mail (2.2.7) mail (2.2.7)
activesupport (>= 2.3.6) activesupport (>= 2.3.6)
mime-types mime-types
@ -225,11 +223,6 @@ GEM
rspec-expectations (= 2.0.0) rspec-expectations (= 2.0.0)
rspec-rails (2.0.0) rspec-rails (2.0.0)
rspec (= 2.0.0) rspec (= 2.0.0)
ruby-debug (0.10.3)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.3.0)
ruby-debug-base (0.10.3)
linecache (>= 0.3)
rubyzip (0.9.4) rubyzip (0.9.4)
selenium-webdriver (0.0.29) selenium-webdriver (0.0.29)
childprocess (>= 0.0.7) childprocess (>= 0.0.7)
@ -287,7 +280,6 @@ DEPENDENCIES
roxml! roxml!
rspec (>= 2.0.0) rspec (>= 2.0.0)
rspec-rails (>= 2.0.0) rspec-rails (>= 2.0.0)
ruby-debug
sprinkle! sprinkle!
thin thin
webmock webmock

View file

@ -12,6 +12,7 @@ class InvitationsController < Devise::InvitationsController
flash[:error] = I18n.t 'invitations.create.no_more' flash[:error] = I18n.t 'invitations.create.no_more'
elsif e.message == "You already invited this person" elsif e.message == "You already invited this person"
flash[:error] = I18n.t 'invitations.create.already_sent' flash[:error] = I18n.t 'invitations.create.already_sent'
else else
raise e raise e
end end

View file

@ -14,4 +14,12 @@ module AspectsHelper
"<span class='grey' title=#{I18n.t('aspects.helper.aspect_not_empty')}>#{I18n.t('aspects.helper.remove')}</span>" "<span class='grey' title=#{I18n.t('aspects.helper.aspect_not_empty')}>#{I18n.t('aspects.helper.remove')}</span>"
end end
end end
def aspect_id(aspect)
if aspect.class == Aspect
aspect.id
else
:all
end
end
end end

View file

@ -1,9 +1,7 @@
%h2 Send invitation %h2 Send invitation
= form_for User.new, :url => invitation_path(User) do |f| = form_for User.new, :url => invitation_path(User) do |f|
/= devise_error_messages!
%p %p
= f.label :email = f.label :email
= f.text_field :email = f.text_field :email
= f.hidden_field :aspect_id, :value => @aspect.id = f.hidden_field :aspect_id, :value => aspect_id(@aspect)
%p= f.submit "Send an invitation" %p= f.submit "Send an invitation"
/= link_to "Home", after_sign_in_path_for(resource_name)

View file

@ -32,11 +32,4 @@
%br %br
%h4 Invites = render "shared/invitations", :invites => @invites
= link_to "Invite a friend!", "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend"
%br
= "You have #{@invites} invites."
.yo{ :style => "display:none;"}
#invite_user_pane
= render "invitations/new"

View file

@ -0,0 +1,8 @@
- unless @aspect == :all
%h4 Invites
= link_to "Invite a friend", "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend"
= "(#{invites} left)"
%br
.yo{ :style => "display:none;"}
#invite_user_pane
= render "invitations/new"