Commit 5e3863acc5b8dcece636a1793006b35c35de1561

Authored by Antonio Terceiro
1 parent 8ccdebad

ActionItem989: duplicating the buttons in the top

But only if the friend list is empty, to avoid a bad visual result.
Showing 1 changed file with 15 additions and 9 deletions   Show diff stats
app/views/friends/index.rhtml
... ... @@ -2,6 +2,21 @@
2 2  
3 3 <h1><%= __("%s's friends") % profile.name %></h1>
4 4  
  5 +<% if @friends.empty? %>
  6 +<p>
  7 +<em>
  8 + <%= __('You have no friends yet.') %>
  9 + <%= link_to _('Do you want to see other people in this environment?'), :controller => 'search', :action => 'assets', :asset => 'people' %>
  10 +</em>
  11 +</p>
  12 +<% else %>
  13 + <% button_bar do %>
  14 + <%= button(:back, _('Go back'), :controller => 'profile_editor') %>
  15 + <%= button(:search, _('Find people'), :controller => 'search', :action => 'assets', :asset => 'people') %>
  16 + <%= button(:search, _('Invite people from my e-mail contacts'), :action => 'invite') %>
  17 + <% end %>
  18 +<% end %>
  19 +
5 20 <ul class="profile-list">
6 21 <% @friends.each do |friend| %>
7 22 <li>
... ... @@ -25,15 +40,6 @@
25 40 <% end %>
26 41 </ul>
27 42  
28   -<% if @friends.empty? %>
29   -<p>
30   -<em>
31   - <%= __('You have no friends yet.') %>
32   - <%= link_to _('Do you want to see other people in this environment?'), :controller => 'search', :action => 'assets', :asset => 'people' %>
33   -</em>
34   -</p>
35   -<% end %>
36   -
37 43 <% button_bar do %>
38 44 <%= button(:back, _('Go back'), :controller => 'profile_editor') %>
39 45 <%= button(:search, _('Find people'), :controller => 'search', :action => 'assets', :asset => 'people') %>
... ...