Class: FeedlistController

Inherits:
ApplicationController show all
Defined in:
app/controllers/feedlist_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#admin_login_required, #all_done_todos_for, #boolean_param, cas_enabled?, #cas_enabled?, #count_deferred_todos, #count_undone_todos, #count_undone_todos_phrase, #done_todos_for, #enable_mobile_content_negotiation, #for_autocomplete, #format_date, #format_dependencies_as_json_for_auto_complete, #handle_unverified_request, #init_data_for_sidebar, #init_not_done_counts, #init_project_hidden_todo_counts, #mobile?, #notify, openid_enabled?, #openid_enabled?, #parse_date_per_user_prefs, prefered_auth?, #prefered_auth?, #redirect_back_or_home, #render_failure, #sanitize, #set_charset, #set_group_view_by, #set_locale, #set_session_expiration, #set_time_zone, #set_zindex_counter, #todo_xml_params

Methods included from LoginSystem

#access_denied, #authorize?, #basic_auth_denied, #current_user, #get_basic_auth_data, #get_current_user, #logged_in?, #login_from_cookie, #login_optional, #login_or_feed_token_required, #login_required, #logout_user, #prefs, #protect?, #redirect_back_or_default, #redirect_to_login, #set_current_user, #store_location

Instance Method Details

#get_feeds_for(object) ⇒ Object (private)



38
39
40
41
42
43
# File 'app/controllers/feedlist_controller.rb', line 38

def get_feeds_for(object)
  respond_to do |format|
    format.html { render :file => "feedlist/get_feeds_for_#{object.class.name.downcase}"}
    format.js
  end
end

#get_feeds_for_contextObject



28
29
30
# File 'app/controllers/feedlist_controller.rb', line 28

def get_feeds_for_context
  get_feeds_for(@context = current_user.contexts.find(params[:context_id]))
end

#get_feeds_for_projectObject



32
33
34
# File 'app/controllers/feedlist_controller.rb', line 32

def get_feeds_for_project
  get_feeds_for(@project = current_user.projects.find(params[:project_id]))
end

#indexObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/controllers/feedlist_controller.rb', line 5

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
    format.m
  end
end