Skip to content
Snippets Groups Projects
Commit 6d8b6701 authored by danielvincent's avatar danielvincent
Browse files

changed show layouts for album and photos. still needs work.

parent 554adeae
Branches
Tags
No related merge requests found
...@@ -9,27 +9,30 @@ ...@@ -9,27 +9,30 @@
}); });
}); });
.span-4.append-1.last %h2
= render "shared/aspect_friends" = @aspect
.friend_pictures.horizontal
= owner_image_link
- for friend in @friends
= person_image_link(friend)
.span-19.appends-1.last
#thumbnails
- for photo in @album_photos
.image_thumb
= link_to (image_tag photo.url(:thumb_medium)), object_path(photo)
.span-19.last .span-5.last
%h3 %h3
= link_to "#{@aspect} Albums", albums_path(:aspect => @aspect)
= @album.name = @album.name
="#{t('.updated')} #{how_long_ago(@album)}" ="#{t('.updated')} #{how_long_ago(@album)}"
.right = link_to "#{@aspect} Albums", albums_path(:aspect => @aspect)
-if current_user.owns? @album -if current_user.owns? @album
=render 'photos/new_photo' =render 'photos/new_photo'
= link_to t('.edit_album'), edit_album_path(@album), :class => 'button' = link_to t('.edit_album'), edit_album_path(@album), :class => 'button'
.album_id{:id => @album.id, :style => "display:hidden;"} .album_id{:id => @album.id, :style => "display:hidden;"}
-unless current_user.owns? @album -unless current_user.owns? @album
%h4= "#{t('.by')} #{@album.person.real_name}" %h4= "#{t('.by')} #{@album.person.real_name}"
#thumbnails
- for photo in @album_photos
.image_thumb
= link_to (image_tag photo.url(:thumb_medium)), object_path(photo)
...@@ -54,33 +54,23 @@ ...@@ -54,33 +54,23 @@
});//end document ready });//end document ready
.span-4.append-1.last %h2
= render "shared/aspect_friends" = @aspect
.friend_pictures.horizontal
.span-19.last = owner_image_link
%h3 - for friend in @friends
= link_to @photo.album.name, @photo.album = person_image_link(friend)
= @photo.image
.span-14.append-1.last
= link_to "<< #{t('.prev')}", url_to_prev(@photo, @album), :rel => 'prefetch' %div{:data=>{:guid=>@photo.id}}
|
= link_to "#{t('.full_size')}", @photo.url
|
= link_to "#{t('.next')} >>", url_to_next(@photo, @album), :rel => 'prefetch'
-if current_user.owns? @album
= link_to t('.edit_photo'), edit_photo_path(@photo), :class => "button"
%br
%br
%div{:id => @photo.id}
#show_photo #show_photo
-if current_user.owns? @photo -if current_user.owns? @photo
.edit_pane .edit_pane
.controls{:data=>{:actor=>"#{@photo.person.owner.id}",:actor_person=>"#{@photo.person.id}",:image_url=>"#{@photo.url(:thumb_medium)}"}} .controls{:data=>{:actor=>"#{@photo.person.owner.id}",:actor_person=>"#{@photo.person.id}",:image_url=>"#{@photo.url(:thumb_medium)}"}}
= link_to 'make profile photo', '#', :class => "make_profile_photo" = link_to 'make profile photo', '#', :class => "make_profile_photo"
|
= link_to 'edit', '#', :class => "make_profile_photo"
= linked_scaled_photo @photo, @album = linked_scaled_photo @photo, @album
-else -else
= linked_scaled_photo @photo, @album = linked_scaled_photo @photo, @album
...@@ -91,26 +81,37 @@ ...@@ -91,26 +81,37 @@
.description .description
= @photo.caption = @photo.caption
-if current_user.owns? @photo %h3
%div{:class => 'clear'} = link_to @photo.album.name, @photo.album
-if !@photo.caption or @photo.caption == "" = @photo.image
= link_to 'Add a description','javascript:void(0)', :id => "add-description", :class => "edit-desc"
= form_for @photo do |p|
= p.text_field :caption, :value => @photo.caption
= p.submit
%div{:class => 'clear'}
%h4{:class => "show_post_comments"} -if current_user.owns? @album
= "#{t('.comments')} (#{@photo.comments.count})" = link_to t('.edit_photo'), edit_photo_path(@photo), :class => "button"
= render "comments/comments", :post => @photo
#content_bottom -if current_user.owns? @photo
.back %div{:class => 'clear'}
= link_to "⇧ #{@album.name}", album_path(@album) -if !@photo.caption or @photo.caption == ""
= link_to 'Add a description','javascript:void(0)', :id => "add-description", :class => "edit-desc"
%br
%br
-if current_user.owns? @album = form_for @photo do |p|
.right = p.text_field :caption, :value => @photo.caption
= link_to t('.delete_photo'), @photo, :confirm => t('.are_you_sure'), :method => :delete, :class => 'button' = p.submit
%div{:class => 'clear'}
-if current_user.owns? @album
= link_to t('.delete_photo'), @photo, :confirm => t('.are_you_sure'), :method => :delete, :class => 'button'
.span-9.last
= link_to "<< #{t('.prev')}", url_to_prev(@photo, @album), :rel => 'prefetch'
|
= link_to "#{t('.full_size')}", @photo.url
|
= link_to "#{t('.next')} >>", url_to_next(@photo, @album), :rel => 'prefetch'
%br
%br
#stream.show
%li.message{:id => @photo.id}
= render "comments/comments", :post => @photo
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#left_pane #left_pane
%h2= @aspect %h2= @aspect
#friend_pictures .friend_pictures
= owner_image_link = owner_image_link
- for friend in @friends - for friend in @friends
= person_image_link(friend) = person_image_link(friend)
......
...@@ -2,6 +2,13 @@ ...@@ -2,6 +2,13 @@
-# licensed under the Affero General Public License version 3 or later. See -# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file. -# the COPYRIGHT file.
%h2
= @aspect
.friend_pictures.horizontal
- for friend in @friends
= person_image_link(friend)
.span-14.append-1.last .span-14.append-1.last
#stream #stream
%h1.show_text %h1.show_text
......
...@@ -544,10 +544,11 @@ li.message .from .right ...@@ -544,10 +544,11 @@ li.message .from .right
:margin-right 1em :margin-right 1em
#show_photo #show_photo
:text-align center
:min-height 200px
img img
:max-width 100% :max-width 100%
:-webkit-box-shadow 0 2px 4px #333
:border 10px solid #fff
:bottom 50px solid #fff
.caption .caption
:margin :margin
...@@ -994,7 +995,7 @@ ul#settings_nav ...@@ -994,7 +995,7 @@ ul#settings_nav
:color transparent :color transparent
#friend_pictures .friend_pictures
:margin :margin
:top 12px :top 12px
:line-height 1em :line-height 1em
...@@ -1003,6 +1004,15 @@ ul#settings_nav ...@@ -1003,6 +1004,15 @@ ul#settings_nav
:width 30px :width 30px
:height 30px :height 30px
.friend_pictures.horizontal
:display inline
:margin
:left 20px
img
:width 20px
:height 20px
#thumbnails #thumbnails
:line-height 14px :line-height 14px
...@@ -1104,7 +1114,9 @@ header ...@@ -1104,7 +1114,9 @@ header
:color rgba(51,51,51,0.9) :color rgba(51,51,51,0.9)
:padding 10px :padding 10px
:position absolute :position absolute
:right 0 :right 10px
:margin
:top 10px
a a
:font :font
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment