actually add the views. fix object_path
This commit is contained in:
parent
d7899d10e3
commit
83756c5713
3 changed files with 55 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ module ApplicationHelper
|
|||
return "" if object.nil?
|
||||
object = object.person if object.instance_of? User
|
||||
object = object.model if object.instance_of? PostsFake::Fake
|
||||
if object.activity_streams?
|
||||
if object.respond_to?(:activity_streams?) && object.activity_streams?
|
||||
class_name = object.class.name.underscore.split('/')
|
||||
eval("#{class_name.first}_#{class_name.last}_path(object, opts)")
|
||||
else
|
||||
|
|
|
|||
33
app/views/activity_streams/photos/show.html.haml
Normal file
33
app/views/activity_streams/photos/show.html.haml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
-# Copyright (c) 2010, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :head do
|
||||
= include_javascripts :photos
|
||||
|
||||
.span-16.append-4.prepend-4.last
|
||||
#original_post_info
|
||||
= render 'shared/author_info', :person => @photo.author, :post => @photo
|
||||
|
||||
#photo_container
|
||||
#show_photo{:data=>{:guid=>@photo.id}}
|
||||
= image_tag @photo.image_url
|
||||
%br
|
||||
%hr
|
||||
|
||||
.span-16.prepend-4.append-4.last
|
||||
%h5
|
||||
= t('_comments')
|
||||
|
||||
#photo_stream.stream.show
|
||||
// TODO(likes)
|
||||
/- if (defined?(current_user) && !current_user.liked?(@parent))
|
||||
/ %span.like_links
|
||||
/ = link_to t('shared.stream_element.like'), likes_path(:positive => 'true', :post_id => @parent.id), :method => :post, :class => "like_it", :remote => true
|
||||
/ |
|
||||
/ = link_to t('shared.stream_element.dislike'), likes_path(:positive => 'false', :post_id => @parent.id), :method => :post, :class => "dislike_it", :remote => true
|
||||
|
||||
%div{:data=>{:guid=>@photo.id}}
|
||||
.likes_container
|
||||
= render "likes/likes", :post_id => @photo.id, :likes => @photo.likes, :dislikes => @photo.dislikes
|
||||
= render "comments/comments", :post => @photo, :comments => @photo.comments, :always_expanded => true
|
||||
21
app/views/activity_streams/photos/show.mobile.haml
Normal file
21
app/views/activity_streams/photos/show.mobile.haml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
-# Copyright (c) 2010, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
#show_content{:data=>{:guid=>@photo.id}}
|
||||
= render 'shared/author_info', :person => @photo.author, :post => @photo
|
||||
|
||||
= image_tag @photo.image_url
|
||||
|
||||
.info
|
||||
%span.time
|
||||
= t('ago', :time => time_ago_in_words(@photo.created_at))
|
||||
|
||||
%br
|
||||
- if current_user.owns? @photo
|
||||
= link_to t('delete'), @photo, :confirm => t('are_you_sure'), :method => :delete
|
||||
- else
|
||||
= link_to t('hide'), post_visibility_path(:id => "42", :post_id => @photo.id), :confirm => t('are_you_sure'), :method => :put, :remote => true
|
||||
|
||||
.stream.show{:data=>{:guid=>@photo.id}}
|
||||
= render "comments/comments", :post => @photo, :comments => @photo.comments, :always_expanded => true
|
||||
Loading…
Reference in a new issue