bborn/communityengine

View on GitHub
app/views/users/welcome_photo.html.haml

Summary

Maintainability
Test Coverage
-@page_title=:profile_photo.l
-widget do
  %h4
    .small=:get_started.l + ' ' + :upload_a_profile_photo.l
  %p
    =:photo_message.l :site => configatron.community_name
  %ul.list-unstyled
    %li= link_to :skip_this_step.l, welcome_about_user_path(@user)
    %li= link_to :go_to_your_profile.l, user_path(@user)

= bootstrap_form_for @user, :url => user_path(:welcome => 'about'), :method => :put, :multipart => true, :layout => :horizontal do |f|
  -if @user.avatar_photo_url
    = image_tag @user.avatar_photo_url(:medium), :class => "pull-right"

  = f.fields_for :avatar, @avatar do |avatar_form|
    - if @user.vendor?
      =:vendor_avatar_hint.l
    = avatar_form.file_field :photo, :label => :choose_a_photo_to_upload.l, :help => :photos_should_be_x_pixels.l

  = f.primary :upload_and_continue_to_step_two.l