Commit 632a48c91213723aace07e2015fb14515941e940

Authored by Rodrigo Souto
Committed by Antonio Terceiro
1 parent 07ab0e42

Substituting 'Contact' by 'Send a message'

app/views/blocks/profile_info_actions/community.rhtml
... ... @@ -15,7 +15,7 @@
15 15  
16 16 <% if profile.enable_contact? %>
17 17 <li>
18   - <%= link_to content_tag('span', _('Contact us')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, :class => 'button with-text icon-menu-mail' %>
  18 + <%= link_to content_tag('span', _('Send a message')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, :class => 'button with-text icon-menu-mail' %>
19 19 </li>
20 20 <% end %>
21 21  
... ...
app/views/blocks/profile_info_actions/enterprise.rhtml
... ... @@ -5,6 +5,6 @@
5 5 <% end %>
6 6 <% end %>
7 7 <% if profile.enable_contact? %>
8   - <li> <%= link_to content_tag('span', _('Contact us')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, {:id => 'enterprise-contact-button', :class => 'button with-text icon-menu-mail'} %> </li>
  8 + <li> <%= link_to content_tag('span', _('Send a message')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, {:id => 'enterprise-contact-button', :class => 'button with-text icon-menu-mail'} %> </li>
9 9 <% end %>
10 10 </ul>
... ...
app/views/blocks/profile_info_actions/person.rhtml
... ... @@ -6,7 +6,7 @@
6 6 <% end %>
7 7  
8 8 <% if user.is_a_friend?(profile) && profile.enable_contact? %>
9   - <li> <%= link_to content_tag('span', _('Contact')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, :class => 'button with-text icon-menu-mail' %> </li>
  9 + <li> <%= link_to content_tag('span', _('Send a message')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, :class => 'button with-text icon-menu-mail' %> </li>
10 10 <% end %>
11 11  
12 12 <% end %>
... ...
app/views/contact/new.rhtml
1   -<h1><%= _('Contact %s') % profile.name %></h1>
  1 +<h1><%= _('Send a message to %s') % profile.name %></h1>
2 2  
3 3 <%= error_messages_for 'contact' %>
4 4  
... ...
test/functional/contact_controller_test.rb
... ... @@ -27,7 +27,7 @@ class ContactControllerTest &lt; Test::Unit::TestCase
27 27  
28 28 should 'display destinatary name in title' do
29 29 get :new, :profile => enterprise.identifier
30   - assert_tag :tag => 'h1', :content => "Contact #{enterprise.name}"
  30 + assert_tag :tag => 'h1', :content => "Send a message to #{enterprise.name}"
31 31 end
32 32  
33 33 should 'add form to create contact via post' do
... ...
test/functional/profile_controller_test.rb
... ... @@ -337,19 +337,19 @@ class ProfileControllerTest &lt; Test::Unit::TestCase
337 337 should 'display contact us for enterprises' do
338 338 ent = Enterprise.create!(:name => 'my test enterprise', :identifier => 'my-test-enterprise')
339 339 get :index, :profile => 'my-test-enterprise'
340   - assert_tag :tag => 'a', :attributes => { :href => "/contact/my-test-enterprise/new" }, :content => 'Contact us'
  340 + assert_tag :tag => 'a', :attributes => { :href => "/contact/my-test-enterprise/new" }, :content => 'Send a message'
341 341 end
342 342  
343 343 should 'not display contact us for non-enterprises' do
344 344 get :index, :profile => @profile.identifier
345   - assert_no_tag :tag => 'a', :attributes => { :href => "/contact/#{@profile.identifier}/new" }, :content => 'Contact us'
  345 + assert_no_tag :tag => 'a', :attributes => { :href => "/contact/#{@profile.identifier}/new" }, :content => 'Send a message'
346 346 end
347 347  
348 348 should 'display contact us only if enabled' do
349 349 ent = fast_create(Enterprise, :name => 'my test enterprise', :identifier => 'my-test-enterprise')
350 350 ent.update_attribute(:enable_contact_us, false)
351 351 get :index, :profile => 'my-test-enterprise'
352   - assert_no_tag :tag => 'a', :attributes => { :href => "/contact/my-test-enterprise/new" }, :content => 'Contact us'
  352 + assert_no_tag :tag => 'a', :attributes => { :href => "/contact/my-test-enterprise/new" }, :content => 'Send a message'
353 353 end
354 354  
355 355 should 'display contact button only if friends' do
... ...