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

54 lines
1.4 KiB
Text

-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3. See
-# the COPYRIGHT file.
:javascript
$(document).keydown(function(e){
switch(e.keyCode) {
case 37:
window.location.replace( "#{url_to_prev(@photo,@album)}" );
break;
case 39:
window.location.replace( "#{url_to_next(@photo,@album)}" );
break;
}
});
= content_for :page_title do
= link_to "◂ #{@photo.album.name}", @photo.album
- content_for :left_pane do
= render "shared/aspect_friends"
- content_for :publish do
%h1
= @photo.image
= link_to "<< #{t('.prev')}", url_to_prev(@photo, @album)
|
= link_to "#{t('.full_size')}", @photo.url
|
= link_to "#{t('.next')} >>", url_to_next(@photo, @album)
.right
-if current_user.owns? @album
= link_to t('.edit_photo'), edit_photo_path(@photo), :class => "button"
%div{:id => @photo.id}
#show_photo
= linked_scaled_photo @photo, @album
.caption
= @photo.caption
#content_bottom
.back
= link_to "⇧ #{@album.name}", album_path(@album)
-if current_user.owns? @album
.right
= link_to t('.delete_photo'), @photo, :confirm => t('.are_you_sure'), :method => :delete, :class => 'button'
%h4{:class => "show_post_comments"}
= "#{t('.comments')} (#{@photo.comments.count})"
= render "comments/comments", :post => @photo