reshares up top

This commit is contained in:
danielgrippi 2011-09-27 21:32:11 -07:00
parent 7d662fcc92
commit 42fcf3e394
3 changed files with 40 additions and 33 deletions

View file

@ -2,8 +2,18 @@
-# licensed under the Affero General Public License version 3 or later. See -# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file. -# the COPYRIGHT file.
.reshare - if post
- if post .photo_area
- if post.is_a?(StatusMessage)
-if post.photos.size > 0
.photo_attachments
- if post.photos.size > 1
.additional_photo_count
= "+ #{post.photos.size-1}"
= image_tag post.photos.first.url(:thumb_large), :class => "stream-photo big-stream-photo"
- elsif post.activity_streams?
= image_tag post.image_url
.content .content
.from .from
= person_image_link(post.author, :size => :thumb_small) = person_image_link(post.author, :size => :thumb_small)
@ -19,5 +29,7 @@
= link_to image_tag(post.image_url, 'data-small-photo' => post.image_url, 'data-full-photo' => post.image_url, :class => 'stream-photo'), post.object_url, :class => "stream-photo-link" = link_to image_tag(post.image_url, 'data-small-photo' => post.image_url, 'data-full-photo' => post.image_url, :class => 'stream-photo'), post.object_url, :class => "stream-photo-link"
- else - else
= render 'status_messages/status_message', :post => post, :photos => post.photos = render 'status_messages/status_message', :post => post, :photos => post.photos
- else - else
= t('.deleted') = t('.deleted')
%hr

View file

@ -4,6 +4,9 @@
.stream_element{:data=>{:guid=>post.id}} .stream_element{:data=>{:guid=>post.id}}
- if post.is_a?(Reshare)
= render 'reshares/reshare', :reshare => post, :post => post.root
.photo_area .photo_area
- if post.is_a?(StatusMessage) - if post.is_a?(StatusMessage)
-if post.photos.size > 0 -if post.photos.size > 0
@ -33,9 +36,7 @@
- if post.activity_streams? - if post.activity_streams?
= t('.via', :link => link_to("#{post.provider_display_name}", post.actor_url)).html_safe = t('.via', :link => link_to("#{post.provider_display_name}", post.actor_url)).html_safe
- if reshare?(post) - if post.is_a?(StatusMessage)
= render 'reshares/reshare', :reshare => post, :post => post.root
- elsif post.is_a?(StatusMessage)
= render 'status_messages/status_message', :post => post, :photos => post.photos = render 'status_messages/status_message', :post => post, :photos => post.photos
.bottom_bar .bottom_bar

View file

@ -15,7 +15,7 @@ a {
body { body {
background: #555555; background: #555555;
max-width: 100%; max-width: 100%;
margin-top: 45px; margin-top: 55px;
} }
.message { .message {
@ -28,7 +28,6 @@ body {
} }
.stream { .stream {
display: inline-block;
text-align: left; text-align: left;
max-width: 700px; max-width: 700px;
} }
@ -160,19 +159,10 @@ body {
padding: 0; padding: 0;
margin: 0; margin: 0;
img { img {
@include border-radius(3px);
margin: 0; margin: 0;
padding: 0; } } padding: 0; } }
.reshare {
.content {
border: {
left: 3px solid #ccc;
}
padding: {
left: 5px;
top: 0px; };
}
}
#main_stream { #main_stream {
font: { font: {
@ -223,6 +213,7 @@ body {
#author_info.profile { #author_info.profile {
box-shadow: inset 0 -1px 3px #111; box-shadow: inset 0 -1px 3px #111;
margin-top: -10px;
text-align: left; text-align: left;
h2 { h2 {
@ -370,6 +361,8 @@ footer {
float: right; } float: right; }
.stream_element .photo_attachments { .stream_element .photo_attachments {
@include border-radius(3px);
background: { background: {
color: #999; color: #999;
} }
@ -386,6 +379,7 @@ footer {
margin-top: 0; } margin-top: 0; }
.photo_area { .photo_area {
@include border-radius(3px);
text-align: center; } text-align: center; }
.image_link { .image_link {