Class: CalendarsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- CalendarsController
- Includes:
- QueriesHelper, SortHelper
- Defined in:
- app/controllers/calendars_controller.rb
Instance Method Summary collapse
Methods included from SortHelper
#sort_clause, #sort_clear, #sort_header_tag, #sort_init, #sort_link, #sort_name, #sort_update
Methods included from QueriesHelper
#column_content, #column_header, #operators_for_select, #retrieve_query
Methods inherited from ApplicationController
accept_key_auth, #accept_key_auth_actions, #api_key_from_request, #api_offset_and_limit, #api_request?, #authorize, #authorize_global, #back_url, #check_if_login_required, #check_project_privacy, #check_project_uniqueness, #default_template, #delete_broken_cookies, #deny_access, #filename_for_content_disposition, #find_current_user, #find_issues, #find_model_object, #find_optional_project, #find_project, #find_project_by_project_id, #find_project_from_association, #invalid_authenticity_token, #logged_user=, model_object, #object_errors_to_json, #parse_qvalues, #per_page_option, #pick_layout, #query_statement_invalid, #redirect_back_or_default, #render_403, #render_404, #render_attachment_warning_if_needed, #render_error, #render_feed, #render_validation_errors, #require_admin, #require_login, #set_flash_from_bulk_issue_save, #set_localization, #use_layout, #user_setup
Methods included from Redmine::MenuManager::MenuController
#current_menu_item, included, #menu_items, #redirect_to_project_menu_item
Methods included from Redmine::Search::Controller
#default_search_scope, #default_search_scopes, included
Methods included from Redmine::I18n
#current_language, #day_name, #find_language, #format_date, #format_time, included, #l, #l_hours, #l_or_humanize, #ll, #month_name, #set_language_if_valid, #valid_languages
Instance Method Details
#show ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'app/controllers/calendars_controller.rb', line 14 def show if params[:year] and params[:year].to_i > 1900 @year = params[:year].to_i if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13 @month = params[:month].to_i end end @year ||= Date.today.year @month ||= Date.today.month @calendar = Redmine::Helpers::Calendar.new(Date.civil(@year, @month, 1), current_language, :month) retrieve_query @query.group_by = nil if @query.valid? events = [] events += @query.issues(:include => [:tracker, :assigned_to, :priority], :conditions => ["((start_date BETWEEN ? AND ?) OR (due_date BETWEEN ? AND ?))", @calendar.startdt, @calendar.enddt, @calendar.startdt, @calendar.enddt] ) events += @query.versions(:conditions => ["effective_date BETWEEN ? AND ?", @calendar.startdt, @calendar.enddt]) @calendar.events = events end render :action => 'show', :layout => false if request.xhr? end |
#update ⇒ Object
40 41 42 |
# File 'app/controllers/calendars_controller.rb', line 40 def update show end |