diff --git a/app/models/person.rb b/app/models/person.rb index e83d416..1a9a740 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -27,7 +27,7 @@ class Person < Profile end N_('Contact information'); N_('Birth date'); N_('City'); N_('State'); N_('Country'); N_('Sex'); - settings_items :photo, :contact_information, :birth_date, :sex, :city, :state, :country + settings_items :photo, :contact_information, :birth_date, :sex, :city, :state, :country, :zip_code def self.conditions_for_profiles(conditions, person) new_conditions = sanitize_sql(['role_assignments.accessor_id = ?', person]) diff --git a/app/views/profile_editor/_organization.rhtml b/app/views/profile_editor/_organization.rhtml index 96def6c..4bc3978 100644 --- a/app/views/profile_editor/_organization.rhtml +++ b/app/views/profile_editor/_organization.rhtml @@ -1,8 +1,12 @@ -
+

<%= _('General information') %>

+ +
- <%= text_field_tag 'profile_data[nickname]', @profile_data.nickname, :id => 'profile_data_nickname', :size => 30, :maxlength => 16 %> -
+ <%= text_field_tag 'profile_data[nickname]', @profile_data.nickname, :id => 'profile_data_nickname', :size => 30, :maxlength => 16 %> + <%= _('A short name by which the organization is know.')%> +
+
<%= f.text_field(:acronym) %> <%= f.text_field(:foundation_year) %> diff --git a/app/views/profile_editor/_person.rhtml b/app/views/profile_editor/_person.rhtml index 5aec4f0..31ce177 100644 --- a/app/views/profile_editor/_person.rhtml +++ b/app/views/profile_editor/_person.rhtml @@ -1,11 +1,20 @@ +

<%= _('Personal information') %>

+ + <%= f.text_field(:nickname, :maxlength => 16, :size => 30) %> +
+ <%= _('A short name by which you like to be known. Will be used in friends listings, community member listings etc.') %> +
+ + <%= f.text_field(:name) %> <%= f.text_field(:contact_information) %> <%= f.text_field(:contact_phone) %> <%# use :size => 3 if you want 3 radios by line %> <%= f.radio_group :profile_data, :sex, [ ['male',_('Male')], ['female',_('Female')] ] %> <%= f.text_field(:birth_date) %> - <%= f.text_field(:address) %> + <%= labelled_form_field(_('Address (street and number)'), text_field(:profile_data, :address)) %> + <%= labelled_form_field(_('ZIP code'), text_field(:profile_data, :zip_code)) %> <%= f.text_field(:city) %> <%= f.text_field(:state) %> <%= f.text_field(:country) %> diff --git a/app/views/profile_editor/edit.rhtml b/app/views/profile_editor/edit.rhtml index e174caf..258781d 100644 --- a/app/views/profile_editor/edit.rhtml +++ b/app/views/profile_editor/edit.rhtml @@ -1,33 +1,36 @@ -

<%= _('Edit profile') %>

+

<%= _('Profile settings') %>

<%= error_messages_for :profile %> <% labelled_form_for :profile_data, @profile, :html => { :multipart => true } do |f| %> + <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %>
-

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

+

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

<% f.fields_for :image_builder, @profile.image do |i| %> <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %> <% end %>
-

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

+

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

<%= _('This profile is:') %> -

- <%= radio_button 'profile_data', 'public_profile', 'true' %> - <%= _('Public') %> -
-
- <%= radio_button 'profile_data', 'public_profile', 'false' %> - <%= _('Private') %> -

<% if profile.kind_of?(Person) %> - + + + + + @@ -59,7 +62,7 @@
<%= _('Public') %><%= _('Private') %>
+ <%= radio_button 'profile_data', 'public_profile', 'true' %> + + <%= radio_button 'profile_data', 'public_profile', 'false' %> +
<%= _('Activate Intranet access (restricted area only for me)') %> <%= _('Yes') %><%= _('Yes') %>
<% end %> - <%= select_categories(:profile_data, _('Select the categories of your interest'), 1) %> + <%= select_categories(:profile_data, _('Select the categories of your interest'), 2) %> <% button_bar do %> <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %> diff --git a/app/views/profile_editor/index.rhtml b/app/views/profile_editor/index.rhtml index dbaa9e8..8e2e1f4 100644 --- a/app/views/profile_editor/index.rhtml +++ b/app/views/profile_editor/index.rhtml @@ -8,7 +8,7 @@ <% file_manager do %> - <%= file_manager_button(_('Edit Profile'), 'icons-app/edit-profile.png', :controller => 'profile_editor', :action => 'edit') %> + <%= file_manager_button(_('Profile settings'), 'icons-app/edit-profile.png', :controller => 'profile_editor', :action => 'edit') %> <%= file_manager_button(_('Mail settings'), 'icons-app/mail.png', :controller => 'mailconf') if profile.person? && MailConf.enabled? %> diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index b0d67a6..22de4c7 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -228,6 +228,7 @@ table { } th, td { font-size: 14px; + padding: 2px 10px; } th { font-weight: bold; diff --git a/test/unit/person_test.rb b/test/unit/person_test.rb index 3f01e1c..e0d0f4e 100644 --- a/test/unit/person_test.rb +++ b/test/unit/person_test.rb @@ -68,7 +68,7 @@ class PersonTest < Test::Unit::TestCase should "have person info fields" do p = Person.new - [ :name, :photo, :contact_information, :birth_date, :sex, :address, :city, :state, :country ].each do |i| + [ :name, :photo, :contact_information, :birth_date, :sex, :address, :city, :state, :country, :zip_code ].each do |i| assert_respond_to p, i end end -- libgit2 0.21.2