Fixed #490 (in mobile view make todos per page configurable via preference).

Don't forget to rake db:migrate for this!



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@534 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2007-04-16 03:15:24 +00:00
parent 60dedb8992
commit bd9045c04f
5 changed files with 33 additions and 20 deletions

View file

@ -402,7 +402,7 @@ class TodosController < ApplicationController
@todos, @page = @user.todos.paginate(:all,
:conditions => ['state = ?', 'active' ], :include => [:context],
:order => 'due IS NULL, due ASC, todos.created_at ASC',
:page => params[:page], :per_page => 6)
:page => params[:page], :per_page => @prefs.mobile_todos_per_page)
@pagination_params = { :format => :m }
@pagination_params[:context_id] = @context.to_param if @context
@pagination_params[:project_id] = @project.to_param if @project