diaspora/app/views/photos/show.html.haml

64 lines
2.1 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 Photos", person_photos_path(@photo.person)
- if !@photo.album_id.nil?
%li= link_to @album.name, album_path(@album)
- else
%li= link_to "uploads", album_path("uploads")
%li= @photo.caption
- 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 'make profile photo', '#', :class => "make_profile_photo"
= linked_scaled_photo @photo, @album
-else
= linked_scaled_photo @photo, @album
.caption
-if @ownership
-if @photo.caption and @photo.caption != ""
= link_to 'Edit','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 '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
%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