account.rhtml
57 lines
| 2.5 KiB
| text/html+ruby
|
RhtmlLexer
|
r842 | <div class="contextual"> | ||
<%= link_to(l(:button_change_password), :action => 'password') unless @user.auth_source_id %> | ||||
</div> | ||||
|
r10 | <h2><%=l(:label_my_account)%></h2> | ||
|
r5 | <%= error_messages_for 'user' %> | ||
|
r330 | |||
|
r947 | <% form_for :user, @user, :url => { :action => "account" }, | ||
:builder => TabularFormBuilder, | ||||
:lang => current_language, | ||||
:html => { :id => 'my_account_form' } do |f| %> | ||||
|
r842 | <div class="splitcontentleft"> | ||
|
r64 | <h3><%=l(:label_information_plural)%></h3> | ||
|
r842 | <div class="box tabular"> | ||
|
r64 | <p><%= f.text_field :firstname, :required => true %></p> | ||
<p><%= f.text_field :lastname, :required => true %></p> | ||||
|
r842 | <p><%= f.text_field :mail, :required => true %></p> | ||
|
r64 | <p><%= f.select :language, lang_options_for_select %></p> | ||
|
r2381 | <p><%= f.text_field :identity_url %></p> | ||
|
r2274 | |||
<% @user.custom_field_values.select(&:editable?).each do |value| %> | ||||
<p><%= custom_field_tag_with_label :user, value %></p> | ||||
<% end %> | ||||
|
r330 | </div> | ||
|
r842 | <%= submit_tag l(:button_save) %> | ||
</div> | ||||
|
r19 | |||
|
r842 | <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| %> | ||||
|
r936 | <label><%= check_box_tag 'notified_project_ids[]', project.id, @user.notified_projects_ids.include?(project.id) %> <%=h project.name %></label><br /> | ||
|
r842 | <% end %></p> | ||
<p><em><%= l(:text_user_mail_option) %></em></p> | ||||
<% end %> | ||||
|
r887 | <p><label><%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified] %> <%= l(:label_user_mail_no_self_notified) %></label></p> | ||
|
r842 | </div> | ||
|
r1183 | |||
<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> | ||||
|
r2132 | <p><%= pref_fields.select :time_zone, ActiveSupport::TimeZone.all.collect {|z| [ z.to_s, z.name ]}, :include_blank => true %></p> | ||
|
r1183 | <p><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p> | ||
<% end %> | ||||
</div> | ||||
|
r842 | </div> | ||
|
r330 | <% end %> | ||
|
r736 | |||
<% content_for :sidebar do %> | ||||
|
r842 | <%= render :partial => 'sidebar' %> | ||
|
r736 | <% end %> | ||
|
r951 | |||
|
r1019 | <% html_title(l(:label_my_account)) -%> | ||