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

Albums#index hidden from views. Photos must be accessed through a person.

parent 5e9d70f8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -9,8 +9,13 @@ class AlbumsController < ApplicationController ...@@ -9,8 +9,13 @@ class AlbumsController < ApplicationController
respond_to :json, :only => [:index, :show] respond_to :json, :only => [:index, :show]
def index def index
@albums = current_user.albums_by_aspect(@aspect).paginate :page => params[:page], :per_page => 9, :order => 'created_at DESC' if params[:person_id]
respond_with @albums, :aspect => @aspect @person = current_user.visible_people.find_by_person_id(params[:person_id])
end
@person ||= current_user.person
@albums = current_user.visible_posts(:_type => 'Album').paginate :page => params[:page], :per_page => 9, :order => 'created_at DESC'
respond_with @albums
end end
def create def create
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
-# 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.
.span-4.append-1.last .span-24.last
= render "shared/aspect_friends"
.span-15.last
= render "shared/publisher", :type => :album, :aspect => @aspect = render "shared/publisher", :type => :album, :aspect => @aspect
%div %div
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
-# the COPYRIGHT file. -# the COPYRIGHT file.
.span-4.append-1.last .span-4.append-1.last
= render "shared/aspect_friends" = render 'shared/aspect_friends', :people => @friends, :aspect => @aspect
.span-15.last .span-15.last
= render 'aspects/no_friends_message' = render 'aspects/no_friends_message'
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
-# the COPYRIGHT file. -# the COPYRIGHT file.
.span-4.append-1.last .span-4.append-1.last
= render "shared/aspect_friends" = render 'shared/aspect_friends', :people => @friends, :aspect => @aspect
.span-15.last .span-15.last
= render 'aspects/no_friends_message' = render 'aspects/no_friends_message'
......
...@@ -36,10 +36,7 @@ ...@@ -36,10 +36,7 @@
%br %br
%br %br
- if @person != current_user.person && @contact = link_to 'photos', person_photos_path(@person)
%ul
%li= link_to 'stream', person_path(@person)
%li= link_to 'photos', person_photos_path(@person)
.span-15.last .span-15.last
......
...@@ -4,18 +4,15 @@ ...@@ -4,18 +4,15 @@
#left_pane #left_pane
- if @aspect == :all %h2= aspect == :all ? "Everyone" : aspect
%h2= "Everyone"
- else
%h2= @aspect
.friend_pictures .friend_pictures
= owner_image_link = owner_image_link
- for friend in @friends - for friend in people
= person_image_link(friend) = person_image_link(friend)
-unless (@aspect == :all) -unless (aspect == :all)
= link_to (image_tag('add_friend_button.png', :title => "add to #{@aspect}")), "#add_request_pane", :class => 'add_request_button' = link_to (image_tag('add_friend_button.png', :title => "add to #{@aspect}")), "#add_request_pane", :class => 'add_request_button'
.fancybox_content .fancybox_content
...@@ -28,10 +25,7 @@ ...@@ -28,10 +25,7 @@
%br %br
%br %br
%ul %br
%li= link_to 'stream', aspect_or_all_path(@aspect)
%li= link_to t('.photos'), albums_path(:aspect => @aspect)
%br %br
= render "shared/invitations", :invites => @invites = render "shared/invitations", :invites => @invites
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