/app/views/users/edit.html.erb

https://github.com/zorigoo/alonetone · Ruby HTML · 122 lines · 95 code · 27 blank · 0 comment · 6 complexity · bafe076051d397bfba4d954c9168ab3b MD5 · raw file

  1. <%= error_messages_for :user %>
  2. <% render(:layout => 'user') do %>
  3. <% content_for :left do %>
  4. <div class="edit_profile box">
  5. <h2 class="box">Edit your profile</h2>
  6. <div class="static_content">
  7. <% form_for @user, :html => { :method => :put } do |f| -%>
  8. <label for="display_name">The name you want displayed on alonetone</label><br />
  9. <%= f.text_field :display_name %><br/><br/>
  10. <label for="user_bio">Tell us about yourself</label><br />
  11. <%= f.text_area :bio, :class=>'double_trouble',:cols => 40, :rows => 4%><br/><br/>
  12. <label for="user_bio">What city or town do you live in?</label><br />
  13. <%= f.text_field :city %><br/><br/>
  14. <label for="user_bio">What country?</label><br />
  15. <%= f.country_select :country, ['','United States'], :include => :blank %><br/><br/>
  16. <label for="user_website">Have a website?</label><br />
  17. http://<%= f.text_field :website %><br/><br/>
  18. <label for "user_myspace">Sport a myspace account?</label><br/>
  19. http://myspace.com/<%= f.text_field :myspace%><br/><br/>
  20. <label for="user_website">Did you set up your <%= link_to 'alonetone iTunes podcast?', halp_path(:itunes) %></label><br />
  21. http://<%= f.text_field :itunes %><br/><br/>
  22. <label for "user_myspace">Trendy (or dorky) enough to be on <%= link_to 'twitter', 'http://twitter.com'%>?</label><br/>
  23. http://twitter.com/<%= f.text_field :twitter%><br/><br/>
  24. <%= link_to("Change your login and alonetone address", '#edit_login', :class=>'slide_open_href')%><br/>
  25. <%= link_to("Change your password",'#edit_password',:class=>'slide_open_href') %>
  26. </div>
  27. <div id="edit_password" class="static_content" style="display:none">
  28. Enter your desired new password twice, please:<br/>
  29. <%= f.password_field :password %><br/>
  30. <%= f.password_field :password_confirmation %>
  31. </div>
  32. <div id="edit_login" class="static_content" style="display:none">
  33. Enter your new login. <br/>
  34. WARNING: Changing this will break any mp3 players
  35. you or anyone else has put on the web, as well as any links anyone has passed around
  36. to your music, as well as confuse google about where your music is for a few weeks.<br/>
  37. Basically, don't do this unless you have to, it makes life hard for folks finding your tunes.<br/>
  38. http://alonetone.com/<%= f.text_field :login %><br/>
  39. </div>
  40. <div class="static_content">
  41. <%= submit_tag "Update Your Profile" %>
  42. </div>
  43. <% end -%>
  44. </div>
  45. <% end %>
  46. <% content_for :right do %>
  47. <div class="box">
  48. <h2 class="box">Change your picture</h2>
  49. <div class="static_content">
  50. <%= image_tag @user.avatar(:small)%><br/>
  51. Upload a new photo. (400px by 400px square for best results)<br/>
  52. <% form_for :pic, :url => attach_pic_user_path(@user), :html => {:multipart => true, :method => :post} do |f| %>
  53. <%= f.file_field :uploaded_data %>
  54. <%= submit_tag "Upload new Pic" %>
  55. <% end %><br/>
  56. </div>
  57. </div>
  58. <h2 class="box">Settings</h2>
  59. <div class="static_content">
  60. <% form_for @user, :html => { :method => :put } do |f| -%>
  61. Display play counts blatently on all tracks? <br/>
  62. <%= select_tag('user[settings][display_listen_count]',
  63. options_for_select([['no thanks','false'], ['yes','true']],
  64. setting(:display_listen_count))) %>
  65. </div>
  66. <div class="static_content">
  67. Display most popular tracks on your home page?<br/>
  68. <%= select_tag('user[settings][most_popular]',
  69. options_for_select([['nope, stick with just the latest','false'], ['oh, pretty please!','true']],
  70. setting(:most_popular))) %>
  71. </div>
  72. <div class="static_content">
  73. Increase size of ego by 4x?<br/>
  74. <%= select_tag('user[settings][increase_ego]',
  75. options_for_select([['uhm, no thanks','false'], ['hell yes!','true']],
  76. setting(:increase_ego))) %>
  77. </div>
  78. <div class="static_content">
  79. Should we email you new comments on your tracks?<br/>
  80. <%= select_tag('user[settings][email_comments]',
  81. options_for_select([['of course, silly!','true'], ['I do not like email','false']],
  82. setting(:email_comments))) %>
  83. </div>
  84. <div class="static_content">
  85. Email notifications when folks you follow upload tracks?<br/>
  86. <%= select_tag('user[settings][email_new_tracks]',
  87. options_for_select([['please! it helps me keep track of the artists i love','true'], ['I told you already, I hate email','false']],
  88. setting(:email_new_tracks))) %>
  89. </div>
  90. <div class="static_content">
  91. <%= submit_tag "Save your alonetone settings" %>
  92. </div>
  93. <% end %>
  94. <% end %>
  95. <% end %>