|
1 | | -%p= @hacker.username + "'s page" |
2 | | -%p |
3 | | - %img{:src => @hacker.gravatar_url} |
| 1 | +%h1= @hacker.username + "'s page" |
| 2 | +%img{:src => @hacker.gravatar_url} |
| 3 | +%h2 About #{@hacker.username}: |
| 4 | +%p= @hacker.about |
| 5 | +%hr |
4 | 6 | %p Following: <a href="/hackers/#{@hacker.username}/following">#{@hacker.following.count}</a> |
5 | 7 | %p Followers: <a href="/hackers/#{@hacker.username}/followers">#{@hacker.followers.count}</a> |
6 | | - |
7 | | -- if logged_in? && @hacker.username != current_user.username |
8 | | - %a{:href => "/messages/new/to/#{@hacker.username}" }= "Send #{@hacker.username} a message" |
9 | | - - if current_user.following? @hacker |
10 | | - %a{:href => "/hackers/#{@hacker.username}/unfollow"} Unfollow #{@hacker.username} |
| 8 | +%hr |
| 9 | +- if logged_in? |
| 10 | + - if @hacker.username != current_user.username |
| 11 | + %a{:href => "/messages/new/to/#{@hacker.username}" }= "Send #{@hacker.username} a message" |
| 12 | + - if current_user.following? @hacker |
| 13 | + %a{:href => "/hackers/#{@hacker.username}/unfollow"} Unfollow #{@hacker.username} |
| 14 | + - else |
| 15 | + %a{:href => "/hackers/#{@hacker.username}/follow"} Follow #{@hacker.username} |
11 | 16 | - else |
12 | | - %a{:href => "/hackers/#{@hacker.username}/follow"} Follow #{@hacker.username} |
| 17 | + %h2 Your Account |
| 18 | + %p You can use these forms to update your information: |
| 19 | + %br |
| 20 | + %p |
| 21 | + %form{:action => "/hackers/update", :method => "POST"} |
| 22 | + %table |
| 23 | + %tr |
| 24 | + %td |
| 25 | + %label{:for => "password[new]"} New Password |
| 26 | + %td |
| 27 | + %input{:type => "password", :name => "password[new]"} |
| 28 | + %tr |
| 29 | + %td |
| 30 | + %label{:for => "password[confirm]"} Confirm New Password |
| 31 | + %td |
| 32 | + %input{:type => "password", :name => "password[confirm]"} |
| 33 | + %tr |
| 34 | + %td |
| 35 | + %td |
| 36 | + %input{:type => "submit", :value => "Change password"} |
| 37 | + %hr |
| 38 | + %p |
| 39 | + %form{:action => "/hackers/update", :method => "POST"} |
| 40 | + %label{:for => "hacker[about]"} About Me |
| 41 | + %br |
| 42 | + %textarea{:name => "hacker[about]", :rows => 10, :cols => 40} |
| 43 | + %br |
| 44 | + %input{:type => "submit", :value => "Update About"} |
0 commit comments