molten-trunk/molten5/app/helpers/cases_helper.rb
# Generates an Array of case statuses that should be saved with created case reports. 
# The array of statuses reflects the statuses used in the current view. 
#
# - Not viewing a report => Status array from current contact
# - Viewing a report w/params[:status] empty => Status array from current report
# - Viewing a report w/params[:status] NOT empty => Status array from params[:status]
Generates an Array of case statuses that should be saved with created case reports.
The array of statuses reflects the statuses used in the current view.

Not viewing a report => Status array from current contact
Viewing a report w/params[:status] empty => Status array from current report
Viewing a report w/params[:status] NOT empty => Status array from params[:status]
Generates an Array of case statuses that should be saved with created case reports . The array of statuses reflects the statuses used in the current view . Not viewing a report = > Status array from current contact Viewing a report w / params [ : status ] empty = > Status array from current report Viewing a report w / params [ : status ] NOT empty = > Status array from params [ : status ]
def case_report_status_array
    if @case_report_status_array
      @case_report_status_array
    elsif @case_report.nil?
      @case_report_status_array = current_contact.set_case_filters
    elsif @case_report.status_array
      if params[:status].is_a?(Array)
        @case_report_status_array = params[:status]
      else
        @case_report_status_array = @case_report.status_array
      end
    else
      @case_report_status_array = current_contact.set_case_filters
    end
  end
def case_report_status_array if @case_report_status_array @case_report_status_array elsif @case_report . nil? @case_report_status_array = current_contact . set_case_filters elsif @case_report . status_array if params [ :status ] . is_a? ( Array ) @case_report_status_array = params [ :status ] else @case_report_status_array = @case_report . status_array end else @case_report_status_array = current_contact . set_case_filters end end
Generates an Array of case statuses that should be saved with created case reports.
Generates an Array of case statuses that should be saved with created case reports .