_add_friend.rhtml
1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<h2><%= _('New friend') %></h2>
<%= link_to( profile_image(task.requestor, :minor, :border => 0), task.requestor.public_profile_url ) %>
<%= _('%s wants to connect to you as a friend.') %
content_tag('strong', link_to( task.requestor.name, task.requestor.public_profile_url ) ) %>
<% form_for('task', task, :url => { :action => 'close', :id => task.id } ) do |f| %>
<div>
<%= radio_button_tag(:decision, 'finish', true,
:id => "decision-finish-#{task.id}",
:onclick => "Element.show('group-for-friend-#{task.id}')") %>
<label for="<%= "decision-finish-#{task.id}" %>"><b><%= _('Accept') %></b></label>
<%= radio_button_tag(:decision, 'cancel', false,
:id => "decision-cancel-#{task.id}",
:onclick => "Element.hide('group-for-friend-#{task.id}')") %>
<label for="<%= "decision-cancel-#{task.id}" %>"><b><%= _('Ignore') %></b></label>
<%
content_tag('div', :id => "group-for-friend-#{task.id}",
:help => _('You can type the first letters of an existing group and have the system present you the available options, or you can type the name of a new group if you want.')) do %>
<%= _('Classify your new friend:') %>
<%= text_field_with_local_autocomplete("task[group_for_friend]",
profile.suggested_friend_groups,
:id => "field-group-for-friend-#{task.id}") %>
<p class="friend-classify-suggestions">
<%= _('Suggestions: %s') % profile.suggested_friend_groups.join(', ') %>
</p>
<% end %>
</div>
<% button_bar do %>
<%= submit_button(:ok, _('Ok!')) %>
<% end %>
<% end %>