giving more pixels to photos on their show pages
This commit is contained in:
parent
4e3fe166d1
commit
a6c5f420fa
5 changed files with 46 additions and 47 deletions
|
|
@ -134,7 +134,14 @@ class PhotosController < ApplicationController
|
|||
@parent = @photo.status_message
|
||||
|
||||
#if photo is not an attachment, fetch comments for self
|
||||
unless @parent
|
||||
if @parent
|
||||
@additional_photos = @photo.status_message.photos
|
||||
if @additional_photos
|
||||
@next_photo = @additional_photos[@additional_photos.index(@photo)+1]
|
||||
@prev_photo = @additional_photos[@additional_photos.index(@photo)-1]
|
||||
@next_photo ||= @additional_photos.first
|
||||
end
|
||||
else
|
||||
@parent = @photo
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,18 @@
|
|||
- content_for :head do
|
||||
= include_javascripts :photos
|
||||
|
||||
= render 'shared/author_info', :person => @photo.person, :post => @photo
|
||||
|
||||
.span-15.append-1.last
|
||||
#photo_controls
|
||||
.right
|
||||
=link_to "← previous", @prev_photo, :rel => 'prefetch'
|
||||
\/
|
||||
=link_to "next →", @next_photo, :rel => 'prefetch'
|
||||
|
||||
- if @photo.status_message_id
|
||||
=link_to "← view original post", @photo.status_message
|
||||
- else
|
||||
\.
|
||||
|
||||
#photo_container
|
||||
#show_photo{:data=>{:guid=>@photo.id}}
|
||||
-if @ownership
|
||||
|
|
@ -19,12 +28,13 @@
|
|||
#caption
|
||||
= @photo.caption
|
||||
|
||||
%hr
|
||||
|
||||
.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
|
||||
|
||||
-if @ownership
|
||||
|
|
@ -38,17 +48,16 @@
|
|||
= button_to t('.delete_photo'), @photo, :confirm => t('are_you_sure'), :method => :delete
|
||||
|
||||
.span-8.last
|
||||
- if @photo.status_message_id
|
||||
#original_post_info
|
||||
%h4{:style=>"position:relative;"}
|
||||
= t('.original_post')
|
||||
= link_to "#{t('.view')} →", @photo.status_message
|
||||
|
||||
#original_post_info
|
||||
= render 'shared/author_info', :person => @photo.person, :post => @photo
|
||||
|
||||
- if @photo.status_message_id
|
||||
%p
|
||||
= @photo.status_message.message
|
||||
|
||||
%p
|
||||
- for photo in @photo.status_message.photos
|
||||
- for photo in @additional_photos
|
||||
= link_to (image_tag photo.url(:thumb_small)), object_path(photo)
|
||||
|
||||
%h4= t('_comments')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#author_info
|
||||
= person_image_link(person)
|
||||
.from
|
||||
%h3
|
||||
%h4
|
||||
= person.name
|
||||
|
||||
- if post.public?
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
-# the COPYRIGHT file.
|
||||
|
||||
|
||||
= render 'shared/author_info', :person => @status_message.person, :post => @status_message
|
||||
|
||||
.span-15.append-1.last
|
||||
#show_text
|
||||
%p
|
||||
|
|
@ -24,6 +22,9 @@
|
|||
= 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{:style=>"margin-bottom:5px;"}= t('_comments')
|
||||
%ul{:class => 'stream show', :id => 'status_message_stream'}
|
||||
%li.message{:data=>{:guid=>@status_message.id}}
|
||||
|
|
|
|||
|
|
@ -264,15 +264,17 @@ header
|
|||
|
||||
#author_info
|
||||
:position relative
|
||||
:margin
|
||||
:bottom 12px
|
||||
|
||||
img
|
||||
:position relative
|
||||
:top 3px
|
||||
:top 0px
|
||||
:display inline-block
|
||||
:height 40px
|
||||
:width 40px
|
||||
:height 30px
|
||||
:width 30px
|
||||
|
||||
.avatar
|
||||
:-webkit-box-shadow none
|
||||
:box-shadow none
|
||||
|
||||
.from
|
||||
:display inline-block
|
||||
|
|
@ -292,12 +294,6 @@ header
|
|||
:margin
|
||||
:right 2em
|
||||
|
||||
.aspect_badge
|
||||
:position relative
|
||||
:top -2px
|
||||
:font
|
||||
:size small
|
||||
:padding 2px 4px
|
||||
|
||||
|
||||
li.message
|
||||
|
|
@ -681,29 +677,8 @@ li.message:hover
|
|||
:background
|
||||
:color #fff
|
||||
|
||||
:padding 10px
|
||||
:bottom 30px
|
||||
:margin
|
||||
:bottom 2em
|
||||
|
||||
:-webkit-box-shadow 0 2px 4px #333
|
||||
:-moz-box-shadow 0 2px 4px #333
|
||||
:box-shadow 0 2px 4px #333
|
||||
|
||||
:-webkit-border-radius 3px
|
||||
:-moz-border-radius 3px
|
||||
:border-radius 3px
|
||||
|
||||
:max-width 100%
|
||||
|
||||
img
|
||||
:z-index 2
|
||||
:position relative
|
||||
:max-width 100%
|
||||
:margin
|
||||
:bottom 10px
|
||||
:border 1px solid #eee
|
||||
:bottom 1px solid #ddd
|
||||
|
||||
#photo_spinner
|
||||
:z-index 1
|
||||
|
|
@ -1407,9 +1382,10 @@ input[type="search"]
|
|||
:-moz-border-radius 5px
|
||||
:border-radius 5px
|
||||
|
||||
|
||||
.photo_options
|
||||
:color #999
|
||||
:color #ddd
|
||||
:text
|
||||
:align center
|
||||
|
||||
ul.aspects
|
||||
:margin 0
|
||||
|
|
@ -2150,3 +2126,9 @@ ul.notifications_for_day
|
|||
:background none
|
||||
:border
|
||||
:bottom 1px solid #eee
|
||||
|
||||
#photo_controls
|
||||
:color #ddd
|
||||
:position relative
|
||||
:margin
|
||||
:bottom 1em
|
||||
|
|
|
|||
Loading…
Reference in a new issue