From a01c1c74617f32a5315abeb3aaf2090c2a80ac98 Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 19 Oct 2010 23:54:12 -0700 Subject: [PATCH 1/2] Remove remove_all_aspects without ill effect --- app/models/user.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index aee21b543..cc9531c8c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -64,7 +64,7 @@ class User #after_create :seed_aspects - before_destroy :unfriend_everyone, :remove_person, :remove_all_aspects + before_destroy :unfriend_everyone, :remove_person def strip_username if username.present? @@ -436,8 +436,4 @@ class User end } end - - def remove_all_aspects - aspects.destroy_all - end end From d2945c83dc3cfd859a15fe443ec1d2f1a73e9894 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Wed, 20 Oct 2010 00:02:15 -0700 Subject: [PATCH 2/2] status message show is now a real show page. photo partial in stream shouldn't display a slideshow of album. --- app/views/layouts/application.html.haml | 2 +- app/views/photos/_photo.haml | 3 +-- app/views/status_messages/show.html.haml | 24 ++++++++++++++++-------- public/stylesheets/sass/application.sass | 21 +++++++++++++++++++-- 4 files changed, 37 insertions(+), 13 deletions(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 0defb3463..84fb4d812 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -62,5 +62,5 @@ .span-24.last = yield - .span-19.prepend-5.last + .span-24.last = render "posts/debug" diff --git a/app/views/photos/_photo.haml b/app/views/photos/_photo.haml index 01baaf74e..5b7d8462e 100644 --- a/app/views/photos/_photo.haml +++ b/app/views/photos/_photo.haml @@ -27,8 +27,7 @@ %br %br - = render "albums/album", :post => post.album, :current_user => current_user - = link_to (image_tag post.url(:thumb_medium)), object_path(post) + = link_to (image_tag post.url(:thumb_large)), object_path(post) .info %span.time= link_to(how_long_ago(post), photo_path(post)) diff --git a/app/views/status_messages/show.html.haml b/app/views/status_messages/show.html.haml index 4521bae5a..7046c69a2 100644 --- a/app/views/status_messages/show.html.haml +++ b/app/views/status_messages/show.html.haml @@ -2,14 +2,22 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -%h1 - = link_to @status_message.person.real_name, @status_message.person - = @status_message.message +.span-14.append-1.last + #stream + %h1.show_text + = person_image_link(@status_message.person) + = link_to @status_message.person.real_name, @status_message.person + = make_links(@status_message.message) -%h4= "#{t('.comments')} (#{@status_message.comments.count})" + = "Posted #{how_long_ago(@status_message)} to" + - for aspect in current_user.aspects_with_post( @status_message.id ) + = link_to aspect.name, aspect -= render "comments/comments", :post => @status_message - -%p - if current_user.owns? @status_message - = link_to t('.destroy'), @status_message, :confirm => t('are_you_sure?'), :method => :delete + %p + = link_to t('.destroy'), @status_message, :confirm => t('.are_you_sure'), :method => :delete + +.span-9.last + #stream.show + %li.message{:id => @status_message.id} + = render "comments/comments", :post => @status_message diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 5f1106f03..064017959 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -179,14 +179,13 @@ header :margin :left 425px -ul#stream +#stream :margin 0 :padding 0 > li :min-height 50px :list-style none :padding 12px 0 - :right 12px :border :bottom 1px solid #eee @@ -404,6 +403,20 @@ form :margin :right 1em +#stream.show + div.comments + :display block + ul.comment_set + :margin + :top 0 + > li + :border none + :padding 0 + &:hover + > li + :background none + :border none + #stream div.comments :display none @@ -1066,3 +1079,7 @@ header :font :size small +.show_text + img + :height 27px + :width 27px