Skip to content
Extraits de code Groupes Projets
Valider d7550568 rédigé par maxwell's avatar maxwell
Parcourir les fichiers

added pagination to photo picker on the user profile. still ugly, less sucky

parent 0c2fc54c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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
......
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