diaspora/app/views/users/edit.html.haml
2010-09-21 12:29:39 -07:00

71 lines
1.7 KiB
Text

-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3. See
-# the COPYRIGHT file.
- content_for :publish do
%h1
Editing profile
- content_for :left_pane do
\.
= form_for @user do |f|
= f.error_messages
= f.fields_for :profile do |p|
%h3 Picture
%div#image_picker
= p.hidden_field :image_url, :value => (@profile.image_url.sub(@user.url,'/') if @profile.image_url), :id => 'image_url_field'
- unless @photos.nil? || @photos.empty?
- for photo in @photos
- if @profile.image_url && (photo.url(:thumb_medium) == @profile.image_url.sub(@user.url,'/'))
%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
You don't have any photos! Go to the
= link_to "albums", albums_path(:aspect => 'all')
page to upload some.
=will_paginate @photos
%br
%h3 Info
%p
%b
DIASPORA USERNAME:
= @user.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
%br
%br
%h3 Connect with Facebook
%p
= link_to "Login to Facebook", @fb_access_url
#submit_block
= link_to "Cancel", root_path
or
= f.submit "Update Profile"
#content_bottom
.back
= link_to "⇧ home", root_path