Albums#index hidden from views. Photos must be accessed through a person.
This commit is contained in:
parent
5e9d70f88c
commit
3e001c74d6
6 changed files with 15 additions and 22 deletions
|
|
@ -9,8 +9,13 @@ class AlbumsController < ApplicationController
|
|||
respond_to :json, :only => [:index, :show]
|
||||
|
||||
def index
|
||||
@albums = current_user.albums_by_aspect(@aspect).paginate :page => params[:page], :per_page => 9, :order => 'created_at DESC'
|
||||
respond_with @albums, :aspect => @aspect
|
||||
if params[:person_id]
|
||||
@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
|
||||
|
||||
def create
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
.span-4.append-1.last
|
||||
= render "shared/aspect_friends"
|
||||
|
||||
.span-15.last
|
||||
.span-24.last
|
||||
= render "shared/publisher", :type => :album, :aspect => @aspect
|
||||
|
||||
%div
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
-# the COPYRIGHT file.
|
||||
|
||||
.span-4.append-1.last
|
||||
= render "shared/aspect_friends"
|
||||
= render 'shared/aspect_friends', :people => @friends, :aspect => @aspect
|
||||
|
||||
.span-15.last
|
||||
= render 'aspects/no_friends_message'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
-# the COPYRIGHT file.
|
||||
|
||||
.span-4.append-1.last
|
||||
= render "shared/aspect_friends"
|
||||
= render 'shared/aspect_friends', :people => @friends, :aspect => @aspect
|
||||
|
||||
.span-15.last
|
||||
= render 'aspects/no_friends_message'
|
||||
|
|
|
|||
|
|
@ -36,10 +36,7 @@
|
|||
|
||||
%br
|
||||
%br
|
||||
- if @person != current_user.person && @contact
|
||||
%ul
|
||||
%li= link_to 'stream', person_path(@person)
|
||||
%li= link_to 'photos', person_photos_path(@person)
|
||||
= link_to 'photos', person_photos_path(@person)
|
||||
|
||||
|
||||
.span-15.last
|
||||
|
|
|
|||
|
|
@ -4,18 +4,15 @@
|
|||
|
||||
|
||||
#left_pane
|
||||
- if @aspect == :all
|
||||
%h2= "Everyone"
|
||||
- else
|
||||
%h2= @aspect
|
||||
%h2= aspect == :all ? "Everyone" : aspect
|
||||
|
||||
.friend_pictures
|
||||
= owner_image_link
|
||||
|
||||
- for friend in @friends
|
||||
- for friend in people
|
||||
= 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'
|
||||
|
||||
.fancybox_content
|
||||
|
|
@ -28,10 +25,7 @@
|
|||
|
||||
%br
|
||||
%br
|
||||
%ul
|
||||
%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
|
||||
|
|
|
|||
Loading…
Reference in a new issue