Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - @page_title = "Edit your Profile"
- %script{:type => 'text/javascript', :src => '/javascripts/themes.js'}
- %script{:style => 'text/javascript'}
- - is_custom = @profile.background_image.blank? ? false : true
- = "var changeBackgroundSetting = #{is_custom.blank?};"
- %input{:type => 'hidden', :id => 'original_theme', :value => "#{@user.profile.theme}"}
- %script{:type => 'text/javascript', :charset => "utf-8"}
- = "var tabID = '#{params[:tab]}' || 'about';"
- = "document.observe('dom:loaded', function() { $(tabID).addClassName('active'); $$('.tab').each(function(oTab) { $(oTab).observe('click', function() { switchTabHiLite($(this)) }); }); });"
- #main.edit
- #breadcrumb
- = link_to 'My Profile', {:action => 'show', :controller => 'profiles', :id => @profile.id}
- %span.crumb »
- #titlebar
- %h1 Edit Profile
- %ul#tabs
- %li.tab{:id => 'about'}
- = link_to_remote 'About Me', :update => 'panel', :url => { :action => 'show_about', :id => @profile.id }
- %li.tab{:id => 'portrait'}
- = link_to_remote 'Portrait', :update => 'panel', :url => { :action => 'show_portrait', :id => @profile.id }
- - if @profile.instance_of? Profile
- %li.tab{:id => 'schools'}
- = link_to_remote 'Schools', :update => 'panel', :url => { :action => 'show_schools', :id => @profile.id }
- %li.tab{:id => 'teams'}
- = link_to_remote 'Teams', :update => 'panel', :url => { :action => 'show_teams', :id => @profile.id }
- - if @profile.instance_of?(Profile) || @profile.instance_of?(ProProfile)
- %li.tab{:id => 'favorites'}
- = link_to_remote 'Favorite Stuff', :update => 'panel', :url => { :action => 'show_favorites', :id => @profile.id }
- %li.tab{:id => 'privacy_permissions'}
- = link_to_remote 'Privacy & Permissions', :update => 'panel', :url => { :action => 'show_privacy_permissions', :id => @profile.id }
- %li.tab{:id => 'content_permissions'}
- = link_to_remote 'Sharing', :update => 'panel', :url => { :action => 'show_content_permissions', :id => @profile.id }
- %li.tab{:id => 'appearance'}
- = link_to_remote 'Appearance', :update => 'panel', :url => { :action => 'show_appearance', :id => @profile.id }
- #panel
- = render :partial => "/profiles/#{@profile.class.name.tableize.singularize}/" + (params[:tab] ? params[:tab].to_s : 'about')
Add Comment
Please, Sign In to add comment