<%= _('Profile settings for %s') % profile.name %>

<%= error_messages_for :profile %> <% labelled_form_for :profile_data, @profile, :html => { :id => 'profile-data', :multipart => true } do |f| %> <% if user.has_permission?('manage_environment_templates', profile.environment) %>
<%= labelled_check_box(_('This profile is a template'), 'profile_data[is_template]', true, @profile.is_template) %>
<% end %> <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %>

<%= _('Change picture') %>

<%= unchangeable_privacy_field @profile %>
<% f.fields_for :image_builder, @profile.image do |i| %> <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %> <% end %>

<%= _('Privacy options') %>

<% if profile.person? %>
<%= labelled_radio_button _('Public — show my contents to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %>
<%= labelled_radio_button _('Private — show my contents only to friends'), 'profile_data[public_profile]', false, !@profile.public_profile? %>
<% else %>
<%= labelled_radio_button _('Public — show content of this group to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %>
<%= labelled_radio_button _('Private — show content of this group only to members'), 'profile_data[public_profile]', false, !@profile.public_profile? %>
<% end %> <% if environment.enabled?('allow_change_of_redirection_after_login') %>

<%= _('Page to redirect after login') %>

<%= select 'profile_data', 'redirection_after_login', Environment.login_redirection_options.map{|key,value|[value,key]}, { :selected => @profile.preferred_login_redirection} %> <% end %>

<%= _('Translations') %>

<%= labelled_check_box( _('Automaticaly redirect the visitor to the article translated to his/her language'), 'profile_data[redirect_l10n]', true, @profile.redirect_l10n )%> <%= @plugins.dispatch(:profile_editor_extras).each do |content| content.respond_to?(:call) ? content.call : content end.join("\n") %> <%= select_categories(:profile_data, _('Select the categories of your interest'), 2) %> <% button_bar do %> <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %> <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %> <% end %> <% if user && user.has_permission?('destroy_profile', profile) %> <% button_bar(:id => 'delete-profile') do %> <%= button(:remove, _('Delete profile'), {:action => :destroy_profile}) %> <% end %> <% end %> <% end %> <%# = generate_form :info, @info, {...} %>