<% data = action_data @survey = data["survey"] @user = data["user"] @survey_answers = data["survey_answers"] @table_fields = data["table_fields"] @is_answer_list = data["is_answer_list"] %> <% if @user.nil? %>

"><%=t("survey.please_login_first")%>

<% else %>

<%= @survey.title %>

<%=t('survey.taken_by')%>: <%=@user.member_name%>

<% @table_fields.each do |f| %> <%= thead(f) %> <% end %> <% (@survey_answer_groups || @survey_answers).each do |sa| %> <% user = sa.user.nil? ? nil : (User.find(sa.user) rescue nil) %> <% if !user.nil? %> <% else %> <% end %> <% end %>
<%= user.member_name rescue user.name %>NA<%= (@is_answer_list ? sa.updated_at : sa.last_modified).strftime("%h %d, %Y - %H:%M") rescue nil %> <% if @answer_repeat && !@is_answer_list %> "><%= t("survey.view") %>(<%=sa.survey_answer_ids.count%>) <% else %> "><%= t("survey.view_answers") %> <% end %>
<%= create_pagination((@survey_answer_groups || @survey_answers).total_pages).html_safe %> <% end %>