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-10-20 16:47:05 +04:00
<% form_for :user, @user, :url => { :action => "account" }, :builder => TabularFormBuilder, :lang => current_language do |f| %>
<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>
<% fields_for :pref, @user.pref, :builder => TabularFormBuilder, :lang => current_language do |pref_fields| %>
<p><%= pref_fields.check_box :hide_mail %></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| %>
<label><%= check_box_tag 'notified_project_ids[]', project.id, @user.notified_projects_ids.include?(project.id) %> <%= project.name %></label><br />
<% end %></p>
<p><em><%= l(:text_user_mail_option) %></em></p>
<% end %>
2007-11-12 19:43:49 +03:00
<p><label><%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified] %> I don't want to be notified of changes that I make myself.</label></p>
2007-10-20 16:47:05 +04:00
</div>
</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 %>