From da95930c9ad0976398a904a8c748c35b18b07349 Mon Sep 17 00:00:00 2001 From: maxwell Date: Tue, 19 Oct 2010 20:23:20 -0700 Subject: [PATCH 1/5] added a bit to test email --- app/views/devise/mailer/invitation.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/devise/mailer/invitation.html.haml b/app/views/devise/mailer/invitation.html.haml index f7c1c7be5..7bfe190a6 100644 --- a/app/views/devise/mailer/invitation.html.haml +++ b/app/views/devise/mailer/invitation.html.haml @@ -48,7 +48,7 @@ %p Hello #{@resource.email}! %p - #{(@resource.inviters.count == 1)? ( @resource.inviters.first.real_name + " has") : (@resource.inviters.map{|inv| inv.real_name}.join(",") + " have")} invited you to #{root_url}, you can accept it through the link below. + #{(@resource.inviters.count == 1)? ( @resource.inviters.first.real_name + " has") : (@resource.inviters.map{|inv| inv.real_name + " (#{inv.diaspora_handle})"}.join(",") + " have")} invited you to join Diaspora at #{root_url}, you can accept it through the link below. - @resource.inviters.each do |inv| - if @resource.invite_messages[inv.id.to_s] = "#{inv.real_name}:" From bfe57b13cc6add544adc65f5c69df90dc9431115 Mon Sep 17 00:00:00 2001 From: maxwell Date: Tue, 19 Oct 2010 20:34:10 -0700 Subject: [PATCH 2/5] added diaspora handle to user profile page --- app/views/people/show.html.haml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index 83e7cf50d..8a76a63a6 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -12,6 +12,8 @@ = person_image_link(@person) %ul -unless @posts.first.nil? + %li + %b.small= @person.diaspora_handle %li %i= t(".last_seen",:how_long_ago => how_long_ago(@posts.first)) - if @person != current_user.person && current_user.friends.include?(@person) From f26dc039c9557e72c93b210b7ae87ea6626873b7 Mon Sep 17 00:00:00 2001 From: maxwell Date: Tue, 19 Oct 2010 20:43:45 -0700 Subject: [PATCH 3/5] removed empty hash from invite email --- app/views/invitations/_new.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/invitations/_new.haml b/app/views/invitations/_new.haml index 8619562a3..c53b84513 100644 --- a/app/views/invitations/_new.haml +++ b/app/views/invitations/_new.haml @@ -12,7 +12,7 @@ - else = invite.select(:aspects, @aspects_dropdown_array, :selected => @aspect.id) Message: - = invite.text_area :invite_messages + = invite.text_area :invite_messages, :value => "" %p= invite.submit "Send an invitation" From e7f84f5434a227fba326792753b4653b456227cf Mon Sep 17 00:00:00 2001 From: maxwell Date: Tue, 19 Oct 2010 20:46:26 -0700 Subject: [PATCH 4/5] fix hcard when parsing friend photo --- lib/hcard.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hcard.rb b/lib/hcard.rb index e858bdfc6..1bdd8a704 100644 --- a/lib/hcard.rb +++ b/lib/hcard.rb @@ -11,7 +11,7 @@ module HCard {:given_name => doc.css(".given_name").text, :family_name => doc.css(".family_name").text, :url => doc.css("#pod_location").text, - :photo => doc.css(".photo[src]").text} + :photo => doc.css(".photo[src]").attribute('src').text } end def self.find url From d0055cee37afcfb1e996045f17f733668d658a72 Mon Sep 17 00:00:00 2001 From: maxwell Date: Tue, 19 Oct 2010 21:07:10 -0700 Subject: [PATCH 5/5] changed a bit of text in the invite, also made it show on all aspects now that we have it fixed --- app/views/invitations/_new.haml | 4 +++- app/views/shared/_invitations.haml | 15 +++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/views/invitations/_new.haml b/app/views/invitations/_new.haml index c53b84513..77b07faa2 100644 --- a/app/views/invitations/_new.haml +++ b/app/views/invitations/_new.haml @@ -1,7 +1,8 @@ .span-12.last .modal_title_bar - %h4 Send invitation + %h4 Invite someone to join Diaspora! + %i if they accept, they will be added to the aspect you invited them = form_for User.new, :url => invitation_path(User) do |invite| %p = invite.label :email @@ -11,6 +12,7 @@ = invite.select(:aspects, @aspects_dropdown_array) - else = invite.select(:aspects, @aspects_dropdown_array, :selected => @aspect.id) + Message: = invite.text_area :invite_messages, :value => "" diff --git a/app/views/shared/_invitations.haml b/app/views/shared/_invitations.haml index b82cca104..40476eae7 100644 --- a/app/views/shared/_invitations.haml +++ b/app/views/shared/_invitations.haml @@ -1,8 +1,7 @@ -- unless @aspect == :all - %h4 Invites - = link_to "Invite a friend", "#invite_user_pane", :class => "invite_user_button", :title => "Invite a friend" - = "(#{invites} left)" - %br - .yo{ :style => "display:none;"} - #invite_user_pane - = render "invitations/new" +%h4 Invites += link_to "Invite a friend", "#invite_user_pane", :class => "invite_user_button", :title => "Invite a friend" += "(#{invites} left)" +%br +.yo{ :style => "display:none;"} + #invite_user_pane + = render "invitations/new"