giving more pixels to photos on their show pages

This commit is contained in:
danielvincent 2010-12-21 12:39:37 -08:00
parent 4e3fe166d1
commit a6c5f420fa
5 changed files with 46 additions and 47 deletions

View file

@ -134,7 +134,14 @@ class PhotosController < ApplicationController
@parent = @photo.status_message @parent = @photo.status_message
#if photo is not an attachment, fetch comments for self #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 @parent = @photo
end end

View file

@ -5,9 +5,18 @@
- content_for :head do - content_for :head do
= include_javascripts :photos = include_javascripts :photos
= render 'shared/author_info', :person => @photo.person, :post => @photo
.span-15.append-1.last .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 #photo_container
#show_photo{:data=>{:guid=>@photo.id}} #show_photo{:data=>{:guid=>@photo.id}}
-if @ownership -if @ownership
@ -19,12 +28,13 @@
#caption #caption
= @photo.caption = @photo.caption
%hr
.photo_options{:data=>{:actor=>"#{@photo.person.owner.id}",:actor_person=>"#{@photo.person.id}",:image_url=>"#{@photo.url(:thumb_large)}"}} .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('.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" = link_to t('.edit'), '#', :id => "edit_photo_toggle"
%br %br
-if @ownership -if @ownership
@ -38,17 +48,16 @@
= button_to t('.delete_photo'), @photo, :confirm => t('are_you_sure'), :method => :delete = button_to t('.delete_photo'), @photo, :confirm => t('are_you_sure'), :method => :delete
.span-8.last .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 %p
= @photo.status_message.message = @photo.status_message.message
%p %p
- for photo in @photo.status_message.photos - for photo in @additional_photos
= link_to (image_tag photo.url(:thumb_small)), object_path(photo) = link_to (image_tag photo.url(:thumb_small)), object_path(photo)
%h4= t('_comments') %h4= t('_comments')

View file

@ -1,7 +1,7 @@
#author_info #author_info
= person_image_link(person) = person_image_link(person)
.from .from
%h3 %h4
= person.name = person.name
- if post.public? - if post.public?

View file

@ -3,8 +3,6 @@
-# the COPYRIGHT file. -# the COPYRIGHT file.
= render 'shared/author_info', :person => @status_message.person, :post => @status_message
.span-15.append-1.last .span-15.append-1.last
#show_text #show_text
%p %p
@ -24,6 +22,9 @@
= link_to t('.destroy'), @status_message, :confirm => t('are_you_sure'), :method => :delete = link_to t('.destroy'), @status_message, :confirm => t('are_you_sure'), :method => :delete
.span-8.last .span-8.last
#original_post_info
= render 'shared/author_info', :person => @status_message.person, :post => @status_message
%h4{:style=>"margin-bottom:5px;"}= t('_comments') %h4{:style=>"margin-bottom:5px;"}= t('_comments')
%ul{:class => 'stream show', :id => 'status_message_stream'} %ul{:class => 'stream show', :id => 'status_message_stream'}
%li.message{:data=>{:guid=>@status_message.id}} %li.message{:data=>{:guid=>@status_message.id}}

View file

@ -264,15 +264,17 @@ header
#author_info #author_info
:position relative :position relative
:margin
:bottom 12px
img img
:position relative :position relative
:top 3px :top 0px
:display inline-block :display inline-block
:height 40px :height 30px
:width 40px :width 30px
.avatar
:-webkit-box-shadow none
:box-shadow none
.from .from
:display inline-block :display inline-block
@ -292,12 +294,6 @@ header
:margin :margin
:right 2em :right 2em
.aspect_badge
:position relative
:top -2px
:font
:size small
:padding 2px 4px
li.message li.message
@ -681,29 +677,8 @@ li.message:hover
:background :background
:color #fff :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 img
:z-index 2
:position relative
:max-width 100% :max-width 100%
:margin
:bottom 10px
:border 1px solid #eee
:bottom 1px solid #ddd
#photo_spinner #photo_spinner
:z-index 1 :z-index 1
@ -1407,9 +1382,10 @@ input[type="search"]
:-moz-border-radius 5px :-moz-border-radius 5px
:border-radius 5px :border-radius 5px
.photo_options .photo_options
:color #999 :color #ddd
:text
:align center
ul.aspects ul.aspects
:margin 0 :margin 0
@ -2150,3 +2126,9 @@ ul.notifications_for_day
:background none :background none
:border :border
:bottom 1px solid #eee :bottom 1px solid #eee
#photo_controls
:color #ddd
:position relative
:margin
:bottom 1em