added pagination to photo picker on the user profile. still ugly, less sucky
This commit is contained in:
parent
0c2fc54c0f
commit
d7550568ad
3 changed files with 3 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ class UsersController < ApplicationController
|
|||
def edit
|
||||
@user = User.first(:id => params[:id])
|
||||
@profile = @user.profile
|
||||
@photos = Photo.all
|
||||
@photos = Photo.paginate :page => params[:page], :order => 'created_at DESC'
|
||||
end
|
||||
|
||||
def update
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
.span-18.append-3.last
|
||||
= yield
|
||||
.span-3.last
|
||||
= link_to (person_image_tag(current_user), root_path)
|
||||
= link_to(person_image_tag(current_user), root_path)
|
||||
= link_to "Edit your profile", edit_user_path(current_user)
|
||||
%br
|
||||
%br
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
%div.small_photo{:id => photo.image.thumb_medium.url}
|
||||
= check_box_tag 'checked_photo'
|
||||
= link_to image_tag(photo.image.url(:thumb_medium)), "#"
|
||||
=will_paginate @photos
|
||||
|
||||
|
||||
%h3 Info
|
||||
|
|
|
|||
Loading…
Reference in a new issue