diff --git a/app/views/photos/show.html.haml b/app/views/photos/show.html.haml index 269ce942d..10815c4a1 100644 --- a/app/views/photos/show.html.haml +++ b/app/views/photos/show.html.haml @@ -5,7 +5,7 @@ - content_for :head do = include_javascripts :photos -.span-15.append-1.last +.span-16.append-4.prepend-4.last #photo_controls -if @additional_photos && @additional_photos.length > 1 .right @@ -13,10 +13,8 @@ \/ =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 - - else - \. + #original_post_info + = render 'shared/author_info', :person => @photo.person, :post => @photo #photo_container #show_photo{:data=>{:guid=>@photo.id}} @@ -29,13 +27,30 @@ #caption = @photo.caption + - if @ownership + .photo_options{:data=>{:actor=>"#{@photo.person.owner.id}",:actor_person=>"#{@photo.person.id}",:image_url=>"#{@photo.url(:thumb_large)}"}} + = link_to t('.make_profile_photo'), {:controller => "photos", :action => "make_profile_photo", :photo_id => @photo.id}, :remote => true, :class => 'make_profile_photo' + | + = link_to t('.edit'), '#', :id => "edit_photo_toggle" + %br + %hr - - if @ownership - .photo_options{:data=>{:actor=>"#{@photo.person.owner.id}",:actor_person=>"#{@photo.person.id}",:image_url=>"#{@photo.url(:thumb_large)}"}} - = link_to t('.make_profile_photo'), {:controller => "photos", :action => "make_profile_photo", :photo_id => @photo.id}, :remote => true, :class => 'make_profile_photo' - | - = link_to t('.edit'), '#', :id => "edit_photo_toggle" + - if @photo.status_message_id + + .span-8.last + %p + = markdownify(@photo.status_message.message) + %span{:style=>'font-size:smaller'} + =link_to t('.collection_permalink'), @photo.status_message + %br + %br + + .span-7.prepend-1 + .show_photo_attachments + - for photo in @additional_photos + = link_to (image_tag photo.url(:thumb_small)), object_path(photo) + #photo_edit_options %h4= t('.edit_delete_photo') @@ -46,20 +61,9 @@ %p = button_to t('.delete_photo'), @photo, :confirm => t('are_you_sure'), :method => :delete -.span-8.last - - #original_post_info - = render 'shared/author_info', :person => @photo.person, :post => @photo - - - if @photo.status_message_id - %p - = markdownify(@photo.status_message.message) - - %p - - for photo in @additional_photos - = link_to (image_tag photo.url(:thumb_small)), object_path(photo) - - %h4= t('_comments') +.span-16.prepend-4.append-4.last + %h5 + = t('_comments') #photo_stream.stream.show %div{:data=>{:guid=>@parent.id}} diff --git a/app/views/shared/_author_info.html.haml b/app/views/shared/_author_info.html.haml index 7205012c5..8f2e7c3f0 100644 --- a/app/views/shared/_author_info.html.haml +++ b/app/views/shared/_author_info.html.haml @@ -1,7 +1,7 @@ #author_info.show = person_image_link(person) .from - %h4 + %h5 = person.name #person_nav_links diff --git a/app/views/status_messages/show.html.haml b/app/views/status_messages/show.html.haml index 0bc6b590b..a5dc196c4 100644 --- a/app/views/status_messages/show.html.haml +++ b/app/views/status_messages/show.html.haml @@ -3,7 +3,10 @@ -# the COPYRIGHT file. -.span-15.append-1.last +.span-16.append-4.prepend-4.last + #original_post_info + = render 'shared/author_info', :person => @status_message.person, :post => @status_message + #show_text %p = markdownify(@status_message.message, :youtube_maps => @status_message[:youtube_titles]) @@ -21,12 +24,9 @@ - if current_user.owns? @status_message = link_to t('.destroy'), @status_message, :confirm => t('are_you_sure'), :method => :delete -.span-8.last - #original_post_info - = render 'shared/author_info', :person => @status_message.person, :post => @status_message - - %h4= t('_comments') + %h5 + = t('_comments') #status_message_stream.stream.show %div{:data=>{:guid=>@status_message.id}} = render "comments/comments", :post_id => @status_message.id, :comments => @status_message.comments, :always_expanded => true diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 9b50272b5..4c732af84 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -277,7 +277,7 @@ en: edit: "edit" edit_delete_photo: "Edit photo description / delete photo" permalink: "permalink" - view_original_post: "view original post" + collection_permalink: "collection permalink" edit: editing: "Editing" photo: diff --git a/public/javascripts/photo-show.js b/public/javascripts/photo-show.js index 765598f03..03aef114c 100644 --- a/public/javascripts/photo-show.js +++ b/public/javascripts/photo-show.js @@ -55,12 +55,15 @@ $(document).ready(function() { $(document).keyup(function(e){ //left if(e.keyCode == 37) { - document.location = $("#photo_show_left").attr('href'); + if( $("#photo_show_left").length > 0 ){ + document.location = $("#photo_show_left").attr('href'); + } //right } else if(e.keyCode == 39) { - document.location = $("#photo_show_right").attr('href'); - + if( $("#photo_show_right").length > 0 ){ + document.location = $("#photo_show_right").attr('href'); + } } }); diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 3d3985b64..b8dcb350f 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -273,6 +273,19 @@ header :font :weight lighter +.show_photo_attachments + :border + :bottom 1px solid #eee + :padding + :top 6px + :bottom 16px + :margin + :bottom 2em + img + :margin + :right 1px + :bottom -1px + #author_info :position relative @@ -283,28 +296,26 @@ header :height 30px :width 30px - .avatar - :-webkit-box-shadow none - :box-shadow none - .from :display inline-block - :padding 10px - :top 0 &.profile .from :padding 0 h3, - h4 + h4, + h5 :display inline-block &.show a :margin :right 1em - h4 + :font + :weight normal + h4, + h5 :margin 0 :padding 0 @@ -517,6 +528,7 @@ header > li :border none :padding 0 + :word-wrap break-word &:hover > li :background none @@ -524,7 +536,8 @@ header ul.comments textarea - :width 275px + :width 425px + :max-width 97% .stream ul.comments .avatar @@ -687,7 +700,6 @@ a.paginate, #infscr-loading img :max-width 100% - :-webkit-box-shadow 0 2px 5px #666 #photo_spinner :z-index 1 @@ -1423,15 +1435,6 @@ input[type="search"] :size 18px :weight bold - img - :-webkit-box-shadow 0 1px 2px #666 - :-moz-box-shadow 0 1px 2px #666 - :box-shadow 0 1px 2px #666 - - :-webkit-border-radius 5px - :-moz-border-radius 5px - :border-radius 5px - .photo_options :color #ddd :text @@ -2043,6 +2046,8 @@ h3,h4 #original_post_info p :color #999 + :margin + :bottom 2em .what_is_this :position relative @@ -2206,8 +2211,7 @@ h3,h4 #photo_controls :color #ddd :position relative - :margin - :bottom 1em + :z-index 10 ul.show_comments :margin