Guest User

Untitled

a guest
Jun 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. - @page_title = "Edit your Profile"
  2. %script{:type => 'text/javascript', :src => '/javascripts/themes.js'}
  3. %script{:style => 'text/javascript'}
  4. - is_custom = @profile.background_image.blank? ? false : true
  5. = "var changeBackgroundSetting = #{is_custom.blank?};"
  6. %input{:type => 'hidden', :id => 'original_theme', :value => "#{@user.profile.theme}"}
  7. %script{:type => 'text/javascript', :charset => "utf-8"}
  8. = "var tabID = '#{params[:tab]}' || 'about';"
  9. = "document.observe('dom:loaded', function() { $(tabID).addClassName('active'); $$('.tab').each(function(oTab) { $(oTab).observe('click', function() { switchTabHiLite($(this)) }); }); });"
  10. #main.edit
  11. #breadcrumb
  12. = link_to 'My Profile', {:action => 'show', :controller => 'profiles', :id => @profile.id}
  13. %span.crumb »
  14. #titlebar
  15. %h1 Edit Profile
  16. %ul#tabs
  17. %li.tab{:id => 'about'}
  18. = link_to_remote 'About Me', :update => 'panel', :url => { :action => 'show_about', :id => @profile.id }
  19. %li.tab{:id => 'portrait'}
  20. = link_to_remote 'Portrait', :update => 'panel', :url => { :action => 'show_portrait', :id => @profile.id }
  21. - if @profile.instance_of? Profile
  22. %li.tab{:id => 'schools'}
  23. = link_to_remote 'Schools', :update => 'panel', :url => { :action => 'show_schools', :id => @profile.id }
  24. %li.tab{:id => 'teams'}
  25. = link_to_remote 'Teams', :update => 'panel', :url => { :action => 'show_teams', :id => @profile.id }
  26. - if @profile.instance_of?(Profile) || @profile.instance_of?(ProProfile)
  27. %li.tab{:id => 'favorites'}
  28. = link_to_remote 'Favorite Stuff', :update => 'panel', :url => { :action => 'show_favorites', :id => @profile.id }
  29. %li.tab{:id => 'privacy_permissions'}
  30. = link_to_remote 'Privacy & Permissions', :update => 'panel', :url => { :action => 'show_privacy_permissions', :id => @profile.id }
  31. %li.tab{:id => 'content_permissions'}
  32. = link_to_remote 'Sharing', :update => 'panel', :url => { :action => 'show_content_permissions', :id => @profile.id }
  33. %li.tab{:id => 'appearance'}
  34. = link_to_remote 'Appearance', :update => 'panel', :url => { :action => 'show_appearance', :id => @profile.id }
  35. #panel
  36. = render :partial => "/profiles/#{@profile.class.name.tableize.singularize}/" + (params[:tab] ? params[:tab].to_s : 'about')
Add Comment
Please, Sign In to add comment