AutoCommit Sam Aug 1 15:03:01 CEST 2015
This commit is contained in:
15
app/views/survey/choices/_mail.html.erb
Normal file
15
app/views/survey/choices/_mail.html.erb
Normal 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 %>
|
||||
@@ -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 %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user