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

64 lines
2.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
= form_for @person do |person|
%h3
Your Profile
.description
This info will be available to whomever you connect with on Diaspora.
= person.error_messages
= person.fields_for :profile do |profile|
%h4
Your name
= profile.text_field :first_name, :value => @profile.first_name, :placeholder => "First name"
= profile.text_field :last_name, :value => @profile.last_name, :placeholder => "Last name"
%h4
Your birthday
%br
= date_select person, :birthday, :order => [:month, :day, :year], :start_year => 1930, :end_year => Time.now.year
%h4
Your bio
= profile.text_area :bio, :value => @profile.bio, :rows => 5, :placeholder => "Fill me out"
%h4
Your photo
%div#image_picker
= profile.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
.submit_block
= link_to t('.cancel'), edit_user_path(current_user)
= t('.or')
= person.submit t('.update_profile')