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

67 lines
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.
#section_header
%h2
Settings
%ul#settings_nav
%li=link_to 'Profile', edit_person_path(current_user.person)
%li=link_to 'Account', edit_user_path(current_user)
%li=link_to 'Services', services_path
.span-19.prepend-5.last
%h2 Profile
= form_for @person do |person|
= person.error_messages
= person.fields_for :profile do |p|
%h3="#{t('.picture')}"
%div#image_picker
= p.hidden_field :image_url, :value => (@profile.image_url if @profile.image_url), :id => 'image_url_field'
- unless @photos.nil? || @photos.empty?
- for photo in @photos
- if @profile.image_url && @profile.image_url.include?(photo.url(:thumb_medium))
%div.small_photo{:id => photo.url(:thumb_medium), :class=>'selected'}
= check_box_tag 'checked_photo', true, true
= link_to image_tag(photo.url(:thumb_medium)), "#"
- else
%div.small_photo{:id => photo.url(:thumb_medium)}
= check_box_tag 'checked_photo'
= link_to image_tag(photo.url(:thumb_medium)), "#"
- else
=t('.you_dont_have_any_photos')
= link_to t('.albums'), albums_path(:aspect => 'all')
=t('.page_to_upload_some')
=will_paginate @photos
%br
%h3="#{t('.info')}"
%p
%b
="#{t('.diaspora_username')}:"
= @person.diaspora_handle
%p
= p.label :first_name
= p.text_field :first_name, :value => @profile.first_name
%p
= p.label :last_name
= p.text_field :last_name, :value => @profile.last_name
.submit_block
= link_to t('.cancel'), edit_user_path(current_user)
= t('.or')
= person.submit t('.update_profile')
#content_bottom
.back
= link_to "⇧ #{t('.home')}", root_path