AutoCommit Sam Aug 1 16:03:03 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-01 16:03:03 +02:00
parent ab0559a45c
commit dae218c4ff
5 changed files with 19 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ if @user.nil?
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 )
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: {key: Key.find_or_create(@user, 3, choice.question).uuid, survey_question: {selected: [choice.id]}}),class: "choice-"+cstyle )
end
%>

View File

@@ -1,5 +1,5 @@
<% if current_user.nil? %>
<%= render partial: "answeredquestion", object: question %>
<%= render partial: "survey/questions/answeredquestion", object: question %>
<% else %>
<div class="contentbox" style="background: grey">
<div class="contentbox">