2014-10-06 05:55:25 +00:00
|
|
|
<% # encoding: utf-8 %>
|
|
|
|
|
|
|
|
<%
|
|
|
|
data = action_data
|
|
|
|
@survey = data["survey"]
|
|
|
|
@time_range = data["time_range"]
|
2015-11-30 10:11:58 +00:00
|
|
|
answer_present = data["answer_present"]
|
|
|
|
link_to_answer_set = data["link_to_answer_set"]
|
2021-09-12 12:20:03 +00:00
|
|
|
answer_repeat = data["answer_repeat"]
|
|
|
|
link_to_my_record = data["link_to_my_record"]
|
2014-10-06 05:55:25 +00:00
|
|
|
%>
|
|
|
|
|
|
|
|
<article class="show-survey" id="spen-survey">
|
|
|
|
|
|
|
|
<h1 class="show-title">
|
|
|
|
<span><%= @survey.title %></span>
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
<ul class="post-metadata list-unstyled">
|
|
|
|
<li class="metadata-date">
|
|
|
|
<i class="fa fa-calendar fa-fw"></i>
|
|
|
|
<span class="date"><%= @time_range %></span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<% if !@survey.description.blank? %>
|
|
|
|
<blockquote>
|
|
|
|
<p><%= nl2br(@survey.description) %></p>
|
|
|
|
</blockquote>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</article>
|
|
|
|
<% if !params[:page_no].blank? %>
|
|
|
|
<%= link_to t('back'), page_for_survey+"?page_no=#{params[:page_no]}", :class => 'btn btn-primary' %>
|
|
|
|
<% else %>
|
|
|
|
<%= link_to t('back'), page_for_survey, :class => 'btn btn-primary' %>
|
|
|
|
<% end %>
|
2015-11-30 10:11:58 +00:00
|
|
|
<% if !answer_present %>
|
2021-09-12 12:20:03 +00:00
|
|
|
<%= link_to t("survey.taken_survey"), OrbitHelper.url_to_show(@survey.to_param), :class => 'btn btn-primary' %>
|
2015-11-30 10:11:58 +00:00
|
|
|
<% else %>
|
2021-09-12 12:20:03 +00:00
|
|
|
<% if answer_repeat %>
|
2021-10-14 07:13:11 +00:00
|
|
|
<%= link_to t("survey.taken_survey"), OrbitHelper.url_to_show(@survey.to_param), :class => 'btn btn-primary' %>
|
2021-09-12 12:20:03 +00:00
|
|
|
<%= link_to t("survey.my_record"), link_to_my_record, :class => "btn btn-primary" %>
|
2021-10-14 07:13:11 +00:00
|
|
|
<% else %>
|
|
|
|
<%= link_to t("survey.view_answers"), link_to_answer_set, :class => "btn btn-primary" %>
|
2021-09-12 12:20:03 +00:00
|
|
|
<% end %>
|
2015-11-30 10:11:58 +00:00
|
|
|
<% end %>
|
2015-11-27 11:55:47 +00:00
|
|
|
|