mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
27 lines
903 B
Ruby
27 lines
903 B
Ruby
class CalendarController < ApplicationController
|
|
skip_before_action :login_required, :only => [:show]
|
|
prepend_before_action :login_or_feed_token_required, :only => [:show]
|
|
|
|
def show
|
|
@source_view = 'calendar'
|
|
@page_title = t('todos.calendar_page_title')
|
|
|
|
@calendar = Todos::Calendar.new(current_user)
|
|
@projects = @calendar.projects
|
|
@count = current_user.todos.not_completed.are_due.count
|
|
@due_all = current_user.todos.not_completed.are_due.reorder("due")
|
|
|
|
respond_to do |format|
|
|
format.html
|
|
format.m {
|
|
cookies[:mobile_url]= { :value => request.fullpath, :secure => SITE_CONFIG['secure_cookies'] }
|
|
}
|
|
format.ics {
|
|
render :action => 'show', :layout => false, :content_type => Mime[:ics]
|
|
}
|
|
format.xml {
|
|
render :xml => @due_all.to_xml( *[todo_xml_params[0].merge({ :root => :todos })] )
|
|
}
|
|
end
|
|
end
|
|
end
|