fixing up public image show
This commit is contained in:
parent
f4fa3191bc
commit
b8ece9381a
3 changed files with 14 additions and 6 deletions
|
|
@ -10,12 +10,20 @@ class PostsController < ApplicationController
|
|||
|
||||
def show
|
||||
@post = Post.first(:id => params[:id], :public => true)
|
||||
@landing_page = true
|
||||
|
||||
if @post
|
||||
@landing_page = true
|
||||
@person = @post.person
|
||||
if @person.owner_id
|
||||
I18n.locale = @person.owner.language
|
||||
render "posts/#{@post.class.to_s.underscore}", :layout => true
|
||||
else
|
||||
flash[:error] = "that post does not exsist!"
|
||||
redirect_to root_url
|
||||
end
|
||||
else
|
||||
flash[:error] = "that post does not exsist!"
|
||||
redirect_to root_url
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
= include_javascripts :photos
|
||||
|
||||
#author_info
|
||||
= person_image_link(@post.person)
|
||||
= person_image_link(@person)
|
||||
.from
|
||||
%h2
|
||||
= @post.person.name
|
||||
= @person.name
|
||||
.span-14.append-1.last
|
||||
#show_photo{:data=>{:guid=>@post.id}}
|
||||
= image_tag @post.url(:scaled_full)
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
-# the COPYRIGHT file.
|
||||
|
||||
#author_info
|
||||
= person_image_link(@post.person)
|
||||
= person_image_link(@person)
|
||||
.from
|
||||
%h2
|
||||
= @post.person.name
|
||||
= @person.name
|
||||
|
||||
.span-14.append-1.last
|
||||
#show_text
|
||||
|
|
|
|||
Loading…
Reference in a new issue