%
data = action_data
@survey = data["survey"]
@chart_data = data["chart_data"]
@survey_questions = data["survey_questions"]
@survey_answers = data["survey_answers"]
%>
<% case @survey.result_type %>
<% when QuestionnaireSurvey::ResultChart %>
<%= @survey.title %> <%= t('survey.chart') %>
<%= t 'survey.results_count' %>: <%= @survey.survey_answers.count %>
<% @survey_questions.each do |question| %>
<% case question.type %>
<% when SurveyQuestion::Radio, SurveyQuestion::Check, ::SurveyQuestion::Select %>
-
<% when SurveyQuestion::Radiogroup %>
<% question.survey_question_options.each_with_index do |option,index| %>
-
<% end %>
<% end %>
<% end %>
<% when QuestionnaireSurvey::ResultExtern %>
<% when QuestionnaireSurvey::ResultFile %>
<%= @survey.title %> <%= t('survey.upload_file') %>
<%= link_to t(:view), @survey.upload_file.url, {:class => 'for_preview btn', :target => '_blank', :title => t(:view), "data-trigger" => :hover} if !@survey.upload_file.blank? %>
<% end %>