From 43658b4923d61e3d4d649f055c6a7f1191cdc56e Mon Sep 17 00:00:00 2001 From: Dan Hansen Date: Thu, 13 Jan 2011 01:03:37 -0600 Subject: [PATCH] only show prev/next if there is more than one photo, fixes #813 --- app/views/photos/show.html.haml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/photos/show.html.haml b/app/views/photos/show.html.haml index fc576dfa4..0493a9610 100644 --- a/app/views/photos/show.html.haml +++ b/app/views/photos/show.html.haml @@ -7,10 +7,11 @@ .span-15.append-1.last #photo_controls - .right - =link_to "← #{t('previous')}", @prev_photo, :rel => 'prefetch', :id => 'photo_show_left' - \/ - =link_to "#{t('next')} →", @next_photo, :rel => 'prefetch', :id => 'photo_show_right' + -if @additional_photos.length > 1 + .right + =link_to "← #{t('previous')}", @prev_photo, :rel => 'prefetch', :id => 'photo_show_left' + \/ + =link_to "#{t('next')} →", @next_photo, :rel => 'prefetch', :id => 'photo_show_right' - if @photo.status_message_id =link_to "← #{t('.view_original_post')}", @photo.status_message