rearrange some of the invite link stuff. This still needs some serious love but we now place emphisis on the link, rather than the email form

This commit is contained in:
Maxwell Salzberg 2012-03-17 17:10:08 -07:00
parent 5868ff06f1
commit aee17798c1
3 changed files with 11 additions and 27 deletions

View file

@ -8,7 +8,6 @@ class InvitationsController < ApplicationController
def new
@invite_code = current_user.invitation_code
@sent_invitations = current_user.invitations_from_me.includes(:recipient)
respond_to do |format|
format.html do
render :layout => false

View file

@ -5,23 +5,27 @@
.span-12.last
%h2
= t('.invite_someone_to_join')
.description
= t('.if_they_accept_info')
%br
.span-7.append-1.last
%b= t('.paste_link')
%br
%br
= invite_link(@invite_code)
= t('.codes_left', :count => @invite_code.count)
%br
%br
#email_invitation
= form_tag new_user_invitation_path do
%h4
= t('email')
= text_field_tag 'email_inviter[emails]' ,nil, :title => t('.comma_seperated_plz'), :placeholder => 'foo@bar.com, max@foo.com...'
%br
%br
%h4
= t('.language')
= select_tag('email_inviter[locale]', options_from_collection_for_select(available_language_options, "second", "first", :selected => current_user.language))
%br
%br
%h4
@ -30,22 +34,3 @@
%p
= submit_tag t('.send_an_invitation')
.clearfix
.span-7.prepend-3.last
= t('.paste_link')
= invite_link(@invite_code)
= t('.codes_left', :count => @invite_code.count)
%br
%br
- unless @sent_invitations.empty?
.span-6.prepend-3.last
#already_invited_pane
%h4
= t('.already_invited')
- for invitation in @sent_invitations
= invitation.recipient_identifier
= link_to t('.resend'), invitation_resend_path(invitation), :confirm => t('are_you_sure')
%br

View file

@ -339,7 +339,7 @@ en:
personal_message: "Personal message"
send_an_invitation: "Send an invitation"
send_invitation: "Send invitation"
paste_link: "or paste them this link!"
paste_link: "Share this link with your friends to invite them to Diaspora*, or email them the link directly."
codes_left:
zero: "No invites left on this code"
one: "One invite left on this code"