From 118d3720c4b7888959ba8525cf2302d7d00a4eef Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Wed, 10 Aug 2011 11:21:06 -0700 Subject: [PATCH] added view for activitystreams public post --- app/controllers/publics_controller.rb | 2 +- app/views/publics/activity_streams/photo.haml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 app/views/publics/activity_streams/photo.haml diff --git a/app/controllers/publics_controller.rb b/app/controllers/publics_controller.rb index 76dbe9188..4468fd349 100644 --- a/app/controllers/publics_controller.rb +++ b/app/controllers/publics_controller.rb @@ -87,7 +87,7 @@ class PublicsController < ApplicationController respond_to do |format| format.xml{ render :xml => @post.to_diaspora_xml } - format.any{ render "#{@post.class.to_s.underscore}", :layout => 'application'} + format.any{ render "publics/#{@post.class.to_s.underscore}", :layout => 'application'} end else flash[:error] = I18n.t('posts.show.not_found') diff --git a/app/views/publics/activity_streams/photo.haml b/app/views/publics/activity_streams/photo.haml new file mode 100644 index 000000000..50c7121f2 --- /dev/null +++ b/app/views/publics/activity_streams/photo.haml @@ -0,0 +1,17 @@ +-# Copyright (c) 2010, Diaspora Inc. This file is +-# licensed under the Affero General Public License version 3 or later. See +-# the COPYRIGHT file. + +#author_info + = person_image_link(@person) + .from + %h2 + = @person.name + +.span-14.append-1.last + #show_text + = 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" + + .time + = how_long_ago(@post) + = link_to t('posts.show.permalink'), public_post_path(@post)