hotfix for an error that would cause a 500. (this is a temp fix for fixing the photo cache counter on deletions)
This commit is contained in:
parent
27f580f241
commit
6ab03d33b4
2 changed files with 15 additions and 30 deletions
|
|
@ -1,19 +0,0 @@
|
|||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
|
||||
- if photos.size > 0
|
||||
.photo_attachments
|
||||
.big_stream_photo
|
||||
= link_to (image_tag photos.first.url(:scaled_full), :class => "stream-photo", 'data-small-photo' => photos.first.url(:thumb_medium), 'data-full-photo' => photos.first.url), photo_path(photos.first), :class => "stream-photo-link"
|
||||
- if photos.size > 1
|
||||
- if photos.size >= 8
|
||||
- for photo in photos[1..8]
|
||||
= link_to (image_tag photo.url(:thumb_small), :class => 'stream-photo thumb_small', 'data-small-photo' => photo.url(:thumb_medium), 'data-full-photo' => photo.url), photo_path(photo), :class => 'stream-photo-link'
|
||||
- else
|
||||
- for photo in photos[1..photos.size]
|
||||
= link_to (image_tag photo.url(:thumb_small), :class => 'stream-photo thumb_small', 'data-small-photo' => photo.url(:thumb_medium), 'data-full-photo' => photo.url), photo_path(photo), :class => 'stream-photo-link'
|
||||
|
||||
%div{:class => direction_for(post.text)}
|
||||
!= markdownify(post)
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- begin
|
||||
- if photos.size > 0
|
||||
.photo_attachments
|
||||
.big_stream_photo
|
||||
|
|
@ -13,6 +14,9 @@
|
|||
- else
|
||||
- for photo in photos[1..photos.size]
|
||||
= link_to (image_tag photo.url(:thumb_small), :class => 'stream-photo thumb_small', 'data-small-photo' => photo.url(:thumb_medium), 'data-full-photo' => photo.url), photo_path(photo), :class => 'stream-photo-link'
|
||||
- rescue
|
||||
- nil
|
||||
|
||||
|
||||
%div{:class => [direction_for(post.text), 'collapsible']}
|
||||
!= markdownify(post)
|
||||
|
|
|
|||
Loading…
Reference in a new issue