diaspora/app/views/users/edit.html.haml

132 lines
3.2 KiB
Text

-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :page_title do
= t('.edit_account')
#section_header
%h2
= t('settings')
%ul#settings_nav
%li=link_to t('profile'), edit_profile_path
%li=link_to t('account'), edit_user_path(current_user)
%li=link_to t('_services'), services_path
.span-19.prepend-5.last
%h2
= t('account')
.span-8.append-2
%h3
= t('.your_handle')
%p
%b= current_user.diaspora_handle
.span-8.last
%h3
= t('.your_email')
%p
= current_user.email
%br
%br
%hr
%br
%h3
= t('.change_password')
= form_for @user do |f|
= f.error_messages
%p
= f.label :current_password, t('.current_password')
= f.password_field :current_password
%p
= f.label :password, t('.new_password')
= f.password_field :password
%p
= f.label :password_confirmation, t('password_confirmation')
= f.password_field :password_confirmation
.submit_block
= link_to t('cancel'), edit_user_path(current_user)
= t('or')
= f.submit t('.change_password')
%br
%br
%hr
%br
%h3
= t('.change_language')
= form_for @user do |f|
= f.error_messages
%p
= f.select :language, available_language_options
= f.submit t('.change_language')
%br
%br
%hr
%br
%h3
= t('.email_notifications')
= form_for @user do |f|
= f.error_messages
= f.fields_for :email_preferences do |type|
#email_prefs
%p.checkbox_select
= type.label t('.also_commented')
= type.check_box :also_commented, {:checked => @email_prefs['also_commented']}, false, true
%br
%p.checkbox_select
= type.label t('.mentioned')
= type.check_box :mentioned, {:checked => @email_prefs['mentioned']}, false, true
%br
%p.checkbox_select
= type.label t('.comment_on_post')
= type.check_box :comment_on_post, {:checked => @email_prefs['comment_on_post']}, false, true
%br
%p.checkbox_select
= type.label t('.request_received')
= type.check_box :request_received, {:checked => @email_prefs['request_received']}, false, true
%br
%p.checkbox_select
= type.label t('.private_message')
= type.check_box :private_message, {:checked => @email_prefs['private_message']}, false, true
%br
%p.checkbox_select
= type.label t('.request_acceptence')
= type.check_box :request_acceptence, {:checked => @email_prefs['request_accpetence']}, false, true
%br
= f.submit t('.change')
%br
%br
%hr
%br
#account_data.span-9.append-2
%h3
= t('.export_data')
= link_to t('.download_xml'), users_export_path, :class => "button"
%br
= link_to t('.download_photos'), users_export_photos_path, :class => "button"
.span-8.last
%h3
= t('.close_account')
= link_to t('.close_account'), current_user,
:confirm => t('are_you_sure'), :method => :delete,
:class => "button"