fix mobile feed page and speed up mobile home page

This commit is contained in:
Reinier Balt 2008-08-01 14:49:51 +02:00
parent db0f00c9a4
commit 8ede8030d3
3 changed files with 13 additions and 4 deletions

View file

@ -4,7 +4,13 @@ class FeedlistController < ApplicationController
def index
@page_title = 'TRACKS::Feeds'
init_data_for_sidebar unless mobile?
unless mobile?
init_data_for_sidebar
else
@projects = current_user.projects
@contexts = current_user.contexts
end
@active_projects = @projects.select{ |p| p.active? }
@hidden_projects = @projects.select{ |p| p.hidden? }

View file

@ -502,7 +502,7 @@ class TodosController < ApplicationController
:conditions => ['todos.user_id = ? AND todos.state = ? AND contexts.hide = ? AND (projects.state = ? OR todos.project_id IS NULL)',
current_user.id, 'active', false, 'active'],
:order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC",
:include => [ :project, :context ])
:include => [ :project, :context, :tags ])
end
def determine_down_count

View file

@ -27,6 +27,9 @@
<li><%= rss_formatted_link({:controller => 'projects', :action => 'index', :only_active_with_no_next_actions => true}) %>
<%= text_formatted_link({:controller => 'projects', :action => 'index', :only_active_with_no_next_actions => true}) %>
Active projects with no next actions</li>
<li><%= rss_formatted_link({:controller => 'todos', :action => 'index', :tag => 'starred'}) %>
<%= text_formatted_link({:controller => 'todos', :action => 'index', :tag => 'starred'}) %>
All starred, active actions</li>
<li><%= text_formatted_link({:controller => 'projects', :action => 'index', :projects_and_actions => true}) %>
Active projects with their actions
</li></ul>
Active projects with their actions</li>
</ul>