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,17 +2,21 @@
|
||||||
-# 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.
|
||||||
|
|
||||||
- if photos.size > 0
|
- begin
|
||||||
.photo_attachments
|
- if photos.size > 0
|
||||||
.big_stream_photo
|
.photo_attachments
|
||||||
= 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"
|
.big_stream_photo
|
||||||
- if photos.size > 1
|
= 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 >= 8
|
- if photos.size > 1
|
||||||
- for photo in photos[1..8]
|
- if photos.size >= 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'
|
- for photo in photos[1..8]
|
||||||
- else
|
= 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'
|
||||||
- for photo in photos[1..photos.size]
|
- else
|
||||||
= 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'
|
- 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']}
|
%div{:class => [direction_for(post.text), 'collapsible']}
|
||||||
!= markdownify(post)
|
!= markdownify(post)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue