tracks/app/controllers/feedlist_controller.rb

45 lines
1.1 KiB
Ruby
Raw Normal View History

class FeedlistController < ApplicationController
helper :feedlist
def index
@page_title = 'TRACKS::Feeds'
unless mobile?
init_data_for_sidebar
else
@projects = current_user.projects
@contexts = current_user.contexts
end
@active_projects = current_user.projects.active
@hidden_projects = current_user.projects.hidden
@completed_projects = current_user.projects.completed
@active_contexts = current_user.contexts.active
@hidden_contexts = current_user.contexts.hidden
respond_to do |format|
format.html { render :layout => 'standard' }
format.m { render :action => 'mobile_index' }
end
end
def get_feeds_for_context
2010-11-27 17:12:09 +01:00
@context = current_user.contexts.find params[:context_id]
respond_to do |format|
2011-02-03 22:44:26 +01:00
format.html { render :file => 'feedlist/get_feeds_for_context'}
2010-11-27 17:12:09 +01:00
format.js
end
end
def get_feeds_for_project
2010-11-27 17:12:09 +01:00
@project = current_user.projects.find params[:project_id]
respond_to do |format|
2011-02-03 22:44:26 +01:00
format.html { render :file => "feedlist/get_feeds_for_project"}
2010-11-27 17:12:09 +01:00
format.js
end
end
end