AutoCommit Sam Aug 1 15:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-01 15:03:01 +02:00
parent cc764f68af
commit ab0559a45c
9 changed files with 52 additions and 10 deletions

View File

@@ -0,0 +1,15 @@
<% choice=mail %>
<%= div_tag_for(choice) do %>
<%
if @user.nil?
t=choice.text
else
value=(@user.id.nil?)? false : choice.answers.where(user_id: @user.id).count>0
cstyle=(value) ? "true" :"false"
t= link_to(raw("" + choice.html+ (( choice.picture.nil? || choice.picture.to_s.empty?) ? "":image_tag(choice.picture.thumb.url))), answer_survey_question_url(choice.question, params: {survey_question: {selected: [choice.id]}}),class: "choice-"+cstyle )
end
%>
<%= t %>
<% end %>

View File

@@ -1,6 +1,7 @@
<% question=mail %>
<div class="contentbox">
<b><%= question.title%></b> <%=question.text%></div>
<% question.choices.each do |c| %>
<li><%= render c %></li>
<% end %>
<% question.choices.each do |c| %>
<li><%= render partial:"survey/choices/mail",object: c %></li>
<% end %>