Merge branch 'master' of github.com:diaspora/diaspora_rails

This commit is contained in:
maxwell 2010-07-01 16:38:51 -07:00
commit 86c6cdcafa
7 changed files with 31 additions and 31 deletions

View file

@ -40,9 +40,10 @@ module ApplicationHelper
def owner_picture def owner_picture
default = "#{root_url}images/user/default.jpg" default = "#{root_url}images/user/default.jpg"
image = "#{root_url}images/user/#{User.first.profile.last_name.gsub(/ /,'').downcase}.jpg" image = "#{root_url}images/user/#{User.first.profile.last_name.gsub(/ /,'').downcase}.jpg"
unless File.exist?(image)
if File.exist?("public/images/user/#{User.first.profile.last_name.gsub(/ /,'').downcase}.jpg")
image_tag image, :id => "user_picture" image_tag image, :id => "user_picture"
else File.exist?(image) else
image_tag default, :id => "user_picture" image_tag default, :id => "user_picture"
end end
end end

View file

@ -1,8 +1,5 @@
%h3 your friends %h3 your friends
%ul#friend_stream %ul#friend_stream.nav
- for friend in @friends - for friend in @friends
= link_to friend.real_name, friend_path(friend) %li= link_to friend.real_name, friend_path(friend)
%br /= link_to "add a new friend", new_friend_path
%br
%hr
= link_to "add a new friend", new_friend_path

View file

@ -42,19 +42,16 @@
= link_to User.first.real_name, root_url = link_to User.first.real_name, root_url
%span.description %span.description
= my_latest_message = my_latest_message
#content.span-24.last #content.span-24.last
.span-5.append-1.last .span-5.append-1.last
= link_to owner_picture, root_path = link_to owner_picture, root_path
%ul#stream_filters.nav
%ul#stream_filters %li= link_to "status messages", status_messages_path
%a{ :href => status_messages_path, :title => "Recent status messages."} %li= link_to "bookmarks", bookmarks_path
%li status messages %li= link_to "blogs", blogs_path
%a{ :href => bookmarks_path, :title => "Recently shared links."}
%li bookmarks
%a{ :href => blogs_path, :title => "Recent blog posts."}
%li blogs
= render 'friends/sidebar' if user_signed_in? = render 'friends/sidebar' if user_signed_in?
.span-18 .span-18
= yield = yield
= render "posts/debug" = render "posts/debug"

View file

@ -32,20 +32,19 @@
.selected { .selected {
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
-moz-border-radius: 5px;
border: 1px solid #ccc; border: 1px solid #ccc;
border-top: 1px solid #333; border-top: 1px solid #333;
-webkit-box-shadow: 0 2px 1px #fff;
background-color: rgba( 255, 255, 255, 0.5); background-color: rgba( 255, 255, 255, 0.5);
-webkit-box-shadow: 0 2px 1px #fff;
-moz-box-shadow: 0 2px 1px #fff;
} }
#publisher #publisher
%ul#publisher_content_pickers %ul#publisher_content_pickers
%a{ :class => "status_message", :href => '#', :title => "new status message."} %li{ :class => "status_message selected" }= link_to "status message", "#"
%li{ :class => "selected" } status message %li{ :class => "bookmark" }= link_to "bookmark", "#"
%a{ :class => "bookmark", :href => '#', :title => "new bookmark."} %li{ :class => "blog" }= link_to "blog", "#"
%li bookmark
%a{ :class => "blog", :href => '#', :title => "new blog post."}
%li blog
#publisher_form #publisher_form
= form_for StatusMessage.new, :remote => true do |f| = form_for StatusMessage.new, :remote => true do |f|

View file

@ -2,30 +2,30 @@
$("#publisher_content_pickers .status_message").click(function(){ $("#publisher_content_pickers .status_message").click(function(){
if( $("#new_status_message").css("display") == "none" ) { if( $("#new_status_message").css("display") == "none" ) {
$("#publisher_content_pickers").children("a").children("li").removeClass("selected"); $("#publisher_content_pickers").children("li").removeClass("selected");
$("#publisher_form form").fadeOut(50); $("#publisher_form form").fadeOut(50);
$(this).children("a > li").toggleClass("selected"); $(this).toggleClass("selected");
$("#new_status_message").delay(50).fadeIn(200); $("#new_status_message").delay(50).fadeIn(200);
} }
}); });
$("#publisher_content_pickers .bookmark").click(function(){ $("#publisher_content_pickers .bookmark").click(function(){
if( $("#new_bookmark").css("display") == "none" ) { if( $("#new_bookmark").css("display") == "none" ) {
$("#publisher_content_pickers").children("a").children("li").removeClass("selected"); $("#publisher_content_pickers").children("li").removeClass("selected");
$("#publisher_form form").fadeOut(50); $("#publisher_form form").fadeOut(50);
$(this).children("li").toggleClass("selected"); $(this).toggleClass("selected");
$("#new_bookmark").delay(50).fadeIn(200); $("#new_bookmark").delay(50).fadeIn(200);
} }
}); });
$("#publisher_content_pickers .blog").click(function(){ $("#publisher_content_pickers .blog").click(function(){
if( $("#new_blog").css("display") == "none" ) { if( $("#new_blog").css("display") == "none" ) {
$("#publisher_content_pickers").children("a").children("li").removeClass("selected"); $("#publisher_content_pickers").children("li").removeClass("selected");
$("#publisher_form form").fadeOut(50); $("#publisher_form form").fadeOut(50);
$(this).children("li").toggleClass("selected"); $(this).toggleClass("selected");
$("#new_blog").delay(50).fadeIn(200); $("#new_blog").delay(50).fadeIn(200);
} }
}); });

View file

@ -229,3 +229,6 @@ label {
position: absolute; position: absolute;
top: 3px; top: 3px;
left: 0.48em; } left: 0.48em; }
ul.nav li > a {
display: block; }

View file

@ -271,3 +271,6 @@ label
:position absolute :position absolute
:top 3px :top 3px
:left 0.48em :left 0.48em
ul.nav li > a
:display block