Skip to content
Extraits de code Groupes Projets
Valider 069b372c rédigé par danielvincent's avatar danielvincent
Parcourir les fichiers

photo show links to original post and siblings. status message shows all...

photo show links to original post and siblings.  status message shows all photos associated with it.  youtube player makes http/s call instead of just http.
parent bd0c21a6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -11,7 +11,7 @@ class PhotosController < ApplicationController ...@@ -11,7 +11,7 @@ class PhotosController < ApplicationController
def index def index
@aspect = :profile @aspect = :profile
@post_type = :photos @post_type = :photos
@person = Person.find(params[:person_id].to_id) @person = Person.find_by_id(params[:person_id])
if @person if @person
@profile = @person.profile @profile = @person.profile
...@@ -24,7 +24,8 @@ class PhotosController < ApplicationController ...@@ -24,7 +24,8 @@ class PhotosController < ApplicationController
@pending_request = current_user.pending_requests.find_by_person_id(@person.id) @pending_request = current_user.pending_requests.find_by_person_id(@person.id)
end end
@posts = current_user.visible_posts(:_type => 'Photo', :person_id => @person.id).paginate :page => params[:page], :order => 'created_at DESC' @posts = current_user.raw_visible_posts.all(:_type => 'Photo', :person_id => @person.id, :order => 'created_at DESC').paginate :page => params[:page], :order => 'created_at DESC'
render 'people/show' render 'people/show'
else else
......
...@@ -56,6 +56,20 @@ ...@@ -56,6 +56,20 @@
= link_to t('.delete_photo'), @photo, :confirm => t('are_you_sure'), :method => :delete, :class => 'button' = link_to t('.delete_photo'), @photo, :confirm => t('are_you_sure'), :method => :delete, :class => 'button'
.span-9.last .span-9.last
- if @photo.status_message_id
#original_post_info
%h4{:style=>"margin-bottom:5px;position:relative;"}
Original Post
=link_to 'view', @photo.status_message
%p
= @photo.status_message.message
- for photo in @photo.status_message.photos
= link_to (image_tag photo.url(:thumb_small)), object_path(photo)
%br
%h4{:style=>"margin-bottom:5px;"} Comments %h4{:style=>"margin-bottom:5px;"} Comments
%div{id => 'photo_stream', :class => 'stream show'} %div{id => 'photo_stream', :class => 'stream show'}
%li.message{:data=>{:guid=>@photo.id}} %li.message{:data=>{:guid=>@photo.id}}
......
...@@ -9,8 +9,12 @@ ...@@ -9,8 +9,12 @@
#show_text #show_text
%p %p
= markdownify(@status_message.message) = markdownify(@status_message.message)
.time
= how_long_ago(@status_message) - for photo in @status_message.photos
= link_to (image_tag photo.url(:thumb_small)), object_path(photo)
.time
= how_long_ago(@status_message)
- if current_user.owns? @status_message - if current_user.owns? @status_message
= 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
......
...@@ -124,7 +124,7 @@ function openVideo(type, videoid, link) { ...@@ -124,7 +124,7 @@ function openVideo(type, videoid, link) {
var container = document.createElement('div'), var container = document.createElement('div'),
$container = $(container); $container = $(container);
if(type == 'youtube.com') { if(type == 'youtube.com') {
$container.html('<a href="http://www.youtube.com/watch?v='+videoid+'" target="_blank">Watch this video on Youtube</a><br><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/'+videoid+'?fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'+videoid+'?fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>'); $container.html('<a href="//www.youtube.com/watch?v='+videoid+'" target="_blank">Watch this video on Youtube</a><br><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/'+videoid+'?fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'+videoid+'?fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>');
} else { } else {
$container.html('Invalid videotype <i>'+type+'</i> (ID: '+videoid+')'); $container.html('Invalid videotype <i>'+type+'</i> (ID: '+videoid+')');
} }
......
...@@ -240,12 +240,6 @@ header ...@@ -240,12 +240,6 @@ header
:-moz-border-radius 5px :-moz-border-radius 5px
:border-radius 5px :border-radius 5px
.stream_photo
img
:height 200px
:width 200px
.from .from
:font :font
:family 'Helvetica neue', Arial, Helvetica, sans-serif :family 'Helvetica neue', Arial, Helvetica, sans-serif
...@@ -1329,6 +1323,14 @@ input[type="search"] ...@@ -1329,6 +1323,14 @@ input[type="search"]
:size 18px :size 18px
:weight bold :weight bold
img
:-webkit-box-shadow 0 1px 2px #666
:-moz-box-shadow 0 1px 2px #666
:-webkit-border-radius 5px
:-moz-border-radius 5px
:border-radius 5px
.edit_pane .edit_pane
:display inline :display inline
...@@ -1912,3 +1914,21 @@ h3,h4 ...@@ -1912,3 +1914,21 @@ h3,h4
input input
:width 100% :width 100%
#original_post_info
p
:color #999
h4
a
:font
:size 12px
img
:-webkit-box-shadow 0 1px 2px #666
:-moz-box-shadow 0 1px 2px #666
:-webkit-border-radius 5px
:-moz-border-radius 5px
:border-radius 5px
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter