2007-10-20 16:47:05 +04:00
|
|
|
<div class="contextual">
|
|
|
|
<%= link_to(l(:button_change_password), :action => 'password') unless @user.auth_source_id %>
|
|
|
|
</div>
|
2006-07-29 13:32:58 +04:00
|
|
|
<h2><%=l(:label_my_account)%></h2>
|
2006-07-09 20:30:01 +04:00
|
|
|
<%= error_messages_for 'user' %>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2007-12-07 17:57:17 +03:00
|
|
|
<% form_for :user, @user, :url => { :action => "account" },
|
|
|
|
:builder => TabularFormBuilder,
|
|
|
|
:lang => current_language,
|
|
|
|
:html => { :id => 'my_account_form' } do |f| %>
|
2007-10-20 16:47:05 +04:00
|
|
|
<div class="splitcontentleft">
|
2006-12-05 01:02:30 +03:00
|
|
|
<h3><%=l(:label_information_plural)%></h3>
|
2007-10-20 16:47:05 +04:00
|
|
|
<div class="box tabular">
|
2006-12-05 01:02:30 +03:00
|
|
|
<p><%= f.text_field :firstname, :required => true %></p>
|
|
|
|
<p><%= f.text_field :lastname, :required => true %></p>
|
2007-10-20 16:47:05 +04:00
|
|
|
<p><%= f.text_field :mail, :required => true %></p>
|
2006-12-05 01:02:30 +03:00
|
|
|
<p><%= f.select :language, lang_options_for_select %></p>
|
2009-02-12 20:19:32 +03:00
|
|
|
<% if Setting.openid? %>
|
2009-02-11 22:07:07 +03:00
|
|
|
<p><%= f.text_field :identity_url %></p>
|
2009-02-12 20:19:32 +03:00
|
|
|
<% end %>
|
2009-01-17 14:18:04 +03:00
|
|
|
|
|
|
|
<% @user.custom_field_values.select(&:editable?).each do |value| %>
|
|
|
|
<p><%= custom_field_tag_with_label :user, value %></p>
|
|
|
|
<% end %>
|
2007-03-12 20:59:02 +03:00
|
|
|
</div>
|
|
|
|
|
2007-10-20 16:47:05 +04:00
|
|
|
<%= submit_tag l(:button_save) %>
|
|
|
|
</div>
|
2006-09-02 17:33:23 +04:00
|
|
|
|
2007-10-20 16:47:05 +04:00
|
|
|
<div class="splitcontentright">
|
|
|
|
<h3><%=l(:field_mail_notification)%></h3>
|
|
|
|
<div class="box">
|
|
|
|
<%= select_tag 'notification_option', options_for_select(@notification_options, @notification_option),
|
|
|
|
:onchange => 'if ($("notification_option").value == "selected") {Element.show("notified-projects")} else {Element.hide("notified-projects")}' %>
|
|
|
|
<% content_tag 'div', :id => 'notified-projects', :style => (@notification_option == 'selected' ? '' : 'display:none;') do %>
|
|
|
|
<p><% User.current.projects.each do |project| %>
|
2007-12-03 13:28:08 +03:00
|
|
|
<label><%= check_box_tag 'notified_project_ids[]', project.id, @user.notified_projects_ids.include?(project.id) %> <%=h project.name %></label><br />
|
2007-10-20 16:47:05 +04:00
|
|
|
<% end %></p>
|
|
|
|
<p><em><%= l(:text_user_mail_option) %></em></p>
|
|
|
|
<% end %>
|
2007-11-12 19:47:07 +03:00
|
|
|
<p><label><%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified] %> <%= l(:label_user_mail_no_self_notified) %></label></p>
|
2007-10-20 16:47:05 +04:00
|
|
|
</div>
|
2008-03-05 18:41:54 +03:00
|
|
|
|
|
|
|
<h3><%=l(:label_preferences)%></h3>
|
|
|
|
<div class="box tabular">
|
|
|
|
<% fields_for :pref, @user.pref, :builder => TabularFormBuilder, :lang => current_language do |pref_fields| %>
|
|
|
|
<p><%= pref_fields.check_box :hide_mail %></p>
|
2008-12-14 18:36:59 +03:00
|
|
|
<p><%= pref_fields.select :time_zone, ActiveSupport::TimeZone.all.collect {|z| [ z.to_s, z.name ]}, :include_blank => true %></p>
|
2008-03-05 18:41:54 +03:00
|
|
|
<p><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2007-10-20 16:47:05 +04:00
|
|
|
</div>
|
2007-03-12 20:59:02 +03:00
|
|
|
<% end %>
|
2007-09-22 17:17:49 +04:00
|
|
|
|
|
|
|
<% content_for :sidebar do %>
|
2007-10-20 16:47:05 +04:00
|
|
|
<%= render :partial => 'sidebar' %>
|
2007-09-22 17:17:49 +04:00
|
|
|
<% end %>
|
2007-12-07 21:42:40 +03:00
|
|
|
|
2008-01-03 01:41:53 +03:00
|
|
|
<% html_title(l(:label_my_account)) -%>
|