From aee17798c152d23504a63cc42ca25dc4b7424ba3 Mon Sep 17 00:00:00 2001
From: Maxwell Salzberg <maxwell@joindiaspora.com>
Date: Sat, 17 Mar 2012 17:10:08 -0700
Subject: [PATCH] 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

---
 app/controllers/invitations_controller.rb |  1 -
 app/views/invitations/new.html.haml       | 35 +++++++----------------
 config/locales/diaspora/en.yml            |  2 +-
 3 files changed, 11 insertions(+), 27 deletions(-)

diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb
index 2d66b9f6a8..8f9e4b9b35 100644
--- a/app/controllers/invitations_controller.rb
+++ b/app/controllers/invitations_controller.rb
@@ -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
diff --git a/app/views/invitations/new.html.haml b/app/views/invitations/new.html.haml
index 3c7b181dd4..9262082391 100644
--- a/app/views/invitations/new.html.haml
+++ b/app/views/invitations/new.html.haml
@@ -5,23 +5,27 @@
   .span-12.last
     %h2
       = t('.invite_someone_to_join')
-      .description
-        = t('.if_they_accept_info')
-        %br
+      %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
@@ -29,23 +33,4 @@
         = text_area_tag 'email_inviter[message]',nil, :rows => 3, :value => t('.check_out_diaspora')
 
         %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
+          = submit_tag t('.send_an_invitation')
\ No newline at end of file
diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml
index 15c12ac631..9b73ba8db3 100644
--- a/config/locales/diaspora/en.yml
+++ b/config/locales/diaspora/en.yml
@@ -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"
-- 
GitLab