Skip to content
Extraits de code Groupes Projets
edit.html.haml 1,25 ko
Newer Older
  • Learn to ignore specific revisions
  • %h1.big_text
      .back
        = link_to "⇧ home", root_path
    
      Editing your profile
    
    = form_for @user do |f|
    
    Raphael's avatar
    Raphael a validé
      = f.error_messages
    
      = f.fields_for :profile do |p|
    
    
        %h3 Picture
        %div#image_picker
          = p.hidden_field :image_url, :value => @profile.image_url, :id => 'image_url_field'
          - for photo in @photos
    
    Raphael's avatar
    Raphael a validé
            - if photo.url(:thumb_medium) == @profile.image_url
    
              %div.small_photo{:id => photo.url(:thumb_medium), :class=>'selected'}
    
                = check_box_tag 'checked_photo', true, true
    
    Raphael's avatar
    Raphael a validé
                = link_to image_tag(photo.url(:thumb_medium)), "#"
    
              %div.small_photo{:id => photo.url(:thumb_medium)}
    
    Raphael's avatar
    Raphael a validé
                = link_to image_tag(photo.url(:thumb_medium)), "#"
    
    Raphael's avatar
    Raphael a validé
        %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
    
      %p
        = f.label :email
        = f.text_field :email
    
    
      #submit_block
        = link_to "Cancel", root_path
        or
        = f.submit "Update Profile"
    
    #content_bottom
      .back
        = link_to "⇧ home", root_path