edit.rhtml 2.96 KB
<h1><%= _('Profile settings for %s') % profile.name %></h1>

<%= error_messages_for :profile %>

<% labelled_form_for :profile_data, @profile, :html => { :id => 'profile-data', :multipart => true } do |f| %>

  <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %>

  <div id="profile_change_picture">
    <h2><%= _('Change picture') %></h2>
    <% f.fields_for :image_builder, @profile.image do |i| %>
      <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %>
    <% end %>
  </div>


  <h2><%= _('Privacy options') %></h2>
  <p>
    <%= _('This profile is:') %>
  </p>

  <% if profile.person? %>
  <table>
    <tr>
      <th></th>
      <th>
        <%= radio_button 'profile_data', 'public_profile', 'true' %>
        <label for="profile_data_public_profile_true"><u><%= _('Public') %></u></label>
      </th>
      <th style='padding: 2px 10px 2px 2px;'>
        <%= radio_button 'profile_data', 'public_profile', 'false' %>
        <label for="profile_data_public_profile_false"><u><%= _('Private') %></u></label>
      </th>
    </tr>
    <tr>
      <td> <%= _('Activate Intranet access (restricted area only for me)') %> </td><td><%= _('Yes') %></td><td><%= _('Yes') %></td>
    </tr>
    <tr>
      <td> <%= _('Show my website to all internet users') %> </td><td><%= _('Yes') %></td><td><%= _('No') %></td>
    </tr>
    <tr>
      <td> <%= _('Show my website to my contacts (persons)') %> </td><td><%= _('Yes') %></td><td><%= _('Yes') %></td>
    </tr>
    <tr>
      <td> <%= _('Include my contact in directory of people') %> </td><td><%= _('Yes') %></td><td><%= _('No') %></td>
    </tr>
  </table>
  <% else %>
  <table>
    <tr>
      <th></th>
      <th>
        <%= radio_button 'profile_data', 'public_profile', 'true' %>
        <label for="profile_data_public_profile_true"><u><%= _('Public') %></u></label>
      </th>
      <th style='padding: 2px 10px 2px 2px;'>
        <%= radio_button 'profile_data', 'public_profile', 'false' %>
        <label for="profile_data_public_profile_false"><u><%= _('Private') %></u></label>
      </th>
    </tr>
    <tr>
      <td> <%= _('Activate Intranet access (restricted area only for members)') %> </td><td><%= _('Yes') %></td><td><%= _('Yes') %></td>
    </tr>
    <tr>
      <td> <%= _('Show website of this group to all internet users') %> </td><td><%= _('Yes') %></td><td><%= _('No') %></td>
    </tr>
    <tr>
      <td> <%= _('Show my website to members') %> </td><td><%= _('Yes') %></td><td><%= _('Yes') %></td>
    </tr>
    <tr>
      <td> <%= _('Include this group directory of groups') %> </td><td><%= _('Yes') %></td><td><%= _('No') %></td>
    </tr>
  </table>
  <% end %>

  <%= 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 %>
<% end %>

<%# = generate_form :info, @info, {...} %>