Commit 03c8d87862f275f5b4330f862027c9ee66dfcd1b
1 parent
0db12ddd
Exists in
master
and in
28 other branches
Adding target name on contact message
(ActionItem2042)
Showing
2 changed files
with
13 additions
and
7 deletions
Show diff stats
app/models/contact.rb
| @@ -32,14 +32,15 @@ class Contact < ActiveRecord::Base #WithoutTable | @@ -32,14 +32,15 @@ class Contact < ActiveRecord::Base #WithoutTable | ||
| 32 | if contact.receive_a_copy | 32 | if contact.receive_a_copy |
| 33 | cc "#{contact.name} <#{contact.email}>" | 33 | cc "#{contact.name} <#{contact.email}>" |
| 34 | end | 34 | end |
| 35 | - subject contact.subject | 35 | + subject "[#{contact.dest.short_name(30)}] " + contact.subject |
| 36 | body :name => contact.name, | 36 | body :name => contact.name, |
| 37 | :email => contact.email, | 37 | :email => contact.email, |
| 38 | :city => contact.city, | 38 | :city => contact.city, |
| 39 | :state => contact.state, | 39 | :state => contact.state, |
| 40 | :message => contact.message, | 40 | :message => contact.message, |
| 41 | :environment => contact.dest.environment.name, | 41 | :environment => contact.dest.environment.name, |
| 42 | - :url => url_for(:host => contact.dest.environment.default_hostname, :controller => 'home') | 42 | + :url => url_for(:host => contact.dest.environment.default_hostname, :controller => 'home'), |
| 43 | + :target => contact.dest.name | ||
| 43 | end | 44 | end |
| 44 | end | 45 | end |
| 45 | 46 |
app/views/contact/sender/mail.rhtml
| 1 | -<%= _('Name: %s') % @name %> | ||
| 2 | -<%= _('e-Mail: %s') % @email %> | ||
| 3 | -<% if @city || @state %> | ||
| 4 | - <%= _('City and state: %s/%s') % [@city || '?', @state || '?'] %> | ||
| 5 | -<% end %> | 1 | +<%= _('This message was sent by %{sender} to %{target} on %{environment}.') % |
| 2 | + {:sender => @name, :target => @target, :environment => @environment} %> | ||
| 3 | +<%= _('Below here are the informations about the user who sent this message:')%> | ||
| 4 | +<ul> | ||
| 5 | + <li><%= content_tag('b', _('Name')+': ') + @name%></li> | ||
| 6 | + <li><%= content_tag('b', _('Email')+': ') + @email%></li> | ||
| 7 | + <% if @city || @state %> | ||
| 8 | + <li><%= content_tag('b', _('City and state')+': ') + (@city || '?')+'/'+(@state || '?') %></li> | ||
| 9 | + <% end %> | ||
| 10 | +</ul> | ||
| 6 | 11 | ||
| 7 | <%= _('Message:') %> | 12 | <%= _('Message:') %> |
| 8 | ------------------------------------------------------------------------------- | 13 | ------------------------------------------------------------------------------- |