62 lines
2 KiB
Text
62 lines
2 KiB
Text
-# 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
|
|
=javascript_include_tag 'photo'
|
|
|
|
|
|
= render 'shared/author_info', :person => @photo.person, :post => @photo
|
|
|
|
%ul#breadcrumb
|
|
%li= link_to "#{@photo.person.profile.first_name}'s #{t('_photos')}", person_photos_path(@photo.person)
|
|
%li= @photo.caption
|
|
|
|
/ we need to do next photo here
|
|
/- if @photo.album
|
|
/= link_to "<< #{t('.prev')}", url_to_prev(@photo, @album), :rel => 'prefetch', :id => "prev_photo"
|
|
/|
|
|
/= link_to "#{t('.full_size')}", @photo.url
|
|
/|
|
|
/= link_to "#{t('.next')} >>", url_to_next(@photo, @album), :rel => 'prefetch', :id => "next_photo"
|
|
|
|
.span-14.append-1.last
|
|
%div{:data=>{:guid=>@photo.id}}
|
|
#show_photo
|
|
|
|
-if @ownership
|
|
.edit_pane
|
|
.controls{:data=>{:actor=>"#{@photo.person.owner.id}",:actor_person=>"#{@photo.person.id}",:image_url=>"#{@photo.url(:thumb_medium)}"}}
|
|
= link_to t('.make_profile_photo'), '#', :class => "make_profile_photo"
|
|
= image_tag @photo.url(:scaled_full)
|
|
|
|
-else
|
|
= image_tag @photo.url(:scaled_full)
|
|
|
|
.caption
|
|
-if @ownership
|
|
-if @photo.caption and @photo.caption != ""
|
|
= link_to t('.edit_photo'),'javascript:void(0)', :id => "edit-desc", :class => "edit-desc"
|
|
.description
|
|
= @photo.caption
|
|
|
|
-if @ownership
|
|
%div{:class => 'clear'}
|
|
-if !@photo.caption or @photo.caption == ""
|
|
= link_to t('.add_a_description'),'javascript:void(0)', :id => "add-description", :class => "edit-desc"
|
|
|
|
%br
|
|
%br
|
|
|
|
= form_for @photo do |p|
|
|
= p.text_field :caption, :value => @photo.caption
|
|
= p.submit t('.update_photo')
|
|
%div{:class => 'clear'}
|
|
|
|
-if @ownership
|
|
= link_to t('.delete_photo'), @photo, :confirm => t('are_you_sure'), :method => :delete, :class => 'button'
|
|
|
|
.span-9.last
|
|
#stream.show
|
|
%li.message{:data=>{:guid=>@photo.id}}
|
|
= render "comments/comments", :post => @photo
|