2007-03-30 04:36:52 +00:00
|
|
|
class FeedlistController < ApplicationController
|
|
|
|
helper :feedlist
|
|
|
|
|
|
|
|
def index
|
|
|
|
@page_title = 'TRACKS::Feeds'
|
2014-08-14 21:05:05 -05:00
|
|
|
|
2008-08-01 14:49:51 +02:00
|
|
|
unless mobile?
|
2012-05-12 13:37:36 +02:00
|
|
|
init_data_for_sidebar
|
2008-08-01 14:49:51 +02:00
|
|
|
else
|
|
|
|
@projects = current_user.projects
|
|
|
|
@contexts = current_user.contexts
|
|
|
|
end
|
2014-08-14 21:05:05 -05:00
|
|
|
|
2008-11-29 15:35:17 +01:00
|
|
|
@active_projects = current_user.projects.active
|
|
|
|
@hidden_projects = current_user.projects.hidden
|
|
|
|
@completed_projects = current_user.projects.completed
|
2014-08-14 21:05:05 -05:00
|
|
|
|
2008-11-29 15:35:17 +01:00
|
|
|
@active_contexts = current_user.contexts.active
|
|
|
|
@hidden_contexts = current_user.contexts.hidden
|
2014-08-14 21:05:05 -05:00
|
|
|
|
2008-04-19 19:15:07 +00:00
|
|
|
respond_to do |format|
|
2012-09-03 20:24:20 +02:00
|
|
|
format.html
|
2012-05-12 13:37:36 +02:00
|
|
|
format.m
|
2008-04-19 19:15:07 +00:00
|
|
|
end
|
2007-03-30 04:36:52 +00:00
|
|
|
end
|
2014-08-14 21:05:05 -05:00
|
|
|
|
2008-07-24 20:51:50 +02:00
|
|
|
def get_feeds_for_context
|
2013-05-11 10:49:38 +02:00
|
|
|
get_feeds_for(@context = current_user.contexts.find(params[:context_id]))
|
2008-07-24 20:51:50 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def get_feeds_for_project
|
2013-05-11 10:49:38 +02:00
|
|
|
get_feeds_for(@project = current_user.projects.find(params[:project_id]))
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def get_feeds_for(object)
|
2010-11-27 17:12:09 +01:00
|
|
|
respond_to do |format|
|
2025-04-26 14:02:49 +03:00
|
|
|
format.html { render :template => "feedlist/get_feeds_for_#{object.class.name.downcase}" }
|
2010-11-27 17:12:09 +01:00
|
|
|
format.js
|
|
|
|
end
|
2008-07-24 20:51:50 +02:00
|
|
|
end
|
2007-03-30 04:36:52 +00:00
|
|
|
end
|