better invite emails wip
This commit is contained in:
parent
f2e25c5fc5
commit
6f20e11a67
5 changed files with 35 additions and 31 deletions
|
|
@ -23,7 +23,7 @@ class InvitationsController < Devise::InvitationsController
|
|||
#NOTE should we try and find users by email here? probs
|
||||
aspect = current_user.aspects.find(aspect_id)
|
||||
|
||||
invites = Invitation.batch_invite(emails, :sender => current_user, :aspect => aspect, :service => 'email')
|
||||
invites = Invitation.batch_invite(emails, :message => message, :sender => current_user, :aspect => aspect, :service => 'email')
|
||||
|
||||
flash[:notice] = extract_messages(invites)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class Invitation < ActiveRecord::Base
|
|||
belongs_to :recipient, :class_name => 'User'
|
||||
belongs_to :aspect
|
||||
|
||||
attr_accessible :sender, :recipient, :aspect, :service, :identifier, :admin
|
||||
attr_accessible :sender, :recipient, :aspect, :service, :identifier, :admin, :message
|
||||
|
||||
before_validation :set_email_as_default_service
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
%p
|
||||
- if @invs.count == 1
|
||||
= t('.has_invited_you', :name => @invs.first.sender.name + " (#{@invs.first.sender.diaspora_handle})")
|
||||
- else
|
||||
= t('.have_invited_you', :names => (@invs.map{|inv| inv.sender.name + " (#{inv.sender.diaspora_handle})"}.join(",")))
|
||||
= t('.accept_at', :url => root_url)
|
||||
- if @invs.count == 1
|
||||
= person_image_link(@invs.first.sender.person, :size => :thumb_small)
|
||||
= t('.has_invited_you', :name => @invs.first.sender.name + " (#{@invs.first.sender.diaspora_handle})")
|
||||
- else
|
||||
= t('.have_invited_you', :names => (@invs.map{|inv| inv.sender.name + " (#{inv.sender.diaspora_handle})"}.to_sentence))
|
||||
- @invs.each do |inv|
|
||||
- unless inv.message.blank?
|
||||
= "#{inv.sender.name}:"
|
||||
= "\"#{inv.message}\""
|
||||
%p
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
<head>
|
||||
<title> Accept Your Diaspora* Invite!</title>
|
||||
</head>
|
||||
<p style="background-color: rgb(255, 255, 255); text-align: center; font-size: 11px;">Email not displaying correctly? <a href="<%=invite_email_url(:invitation_token => @resource.invitation_token) %>" style="color: #3F8FBA; text-decoration: none;">View it</a> in your browser</p>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td style="padding: 30px 15px 0pt; background-color: rgb(221, 221, 221);">
|
||||
|
|
@ -10,14 +13,38 @@
|
|||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="padding: 10px 0pt 0px 20px; background: rgb(255, 255, 255) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-size: 44px; font-weight: bold; color: rgb(0, 0, 0);">
|
||||
Finally - it's here.<br>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td style="padding: 0px 20px 0pt; background: rgb(255, 255, 255) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="600" height='389'>
|
||||
<a href="<%= accept_invitation_url(@resource, :invitation_token => @resource.invitation_token)%>" target="_blank"><img src="http://dl.dropbox.com/u/15865/diaspora_shots.jpg" style="border: 0pt none ; display: block;" width="560">
|
||||
</a></td></tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<% if @resource.invitations_to_me.any?{|x| !x.admin?} %>
|
||||
<% @invs = @resource.invitations_to_me %>
|
||||
<tr>
|
||||
<td style="padding: 10px 0pt 0px 20px; background: rgb(255, 255, 255) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-size: 20px; font-weight: bold; color: rgb(0, 0, 0);">
|
||||
<%= render :partial => 'devise/mailer/inviters' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr><td style="padding: 0pt 30px; background: rgb(255, 255, 255) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; line-height: 20px;">
|
||||
The social network you have been waiting for has arrived. Revamped, more secure, and more fun, <strong>DIASPORA*</strong> is ready to help you share and explore the web in a whole new way.
|
||||
<br>
|
||||
|
|
@ -124,3 +151,4 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
- @invs = @resource.invitations_to_me
|
||||
-unless @invs.first.admin?
|
||||
!!!
|
||||
%html
|
||||
%head
|
||||
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
|
||||
= render :partial => 'notifier/notifier_css'
|
||||
%body
|
||||
%header
|
||||
= image_tag AppConfig[:pod_url] + 'images/logo_caps.png'
|
||||
#container
|
||||
%p
|
||||
= t('devise.mailer.welcome', :email => @resource.email)
|
||||
= render :partial => 'inviters'
|
||||
|
||||
%p= link_to t('.accept'), accept_invitation_url(@resource, :invitation_token => @resource.invitation_token), :class => "large_text"
|
||||
%p.small
|
||||
= t('.ignore')
|
||||
%br/
|
||||
= t('.no_account_till')
|
||||
-else
|
||||
= render :partial => 'devise/mailer/batch_invites'
|
||||
Loading…
Reference in a new issue