forked from bofh/fetsite
AutoCommit Sam Aug 1 14:03:01 CEST 2015
This commit is contained in:
@@ -7,7 +7,7 @@ if current_user.nil?
|
||||
else
|
||||
value=(current_user.id.nil?)? false : choice.answers.where(user_id: current_user.id).count>0
|
||||
cstyle=(value) ? "true" :"false"
|
||||
t= link_to(raw("" + choice.html+ (( choice.picture.nil?) ? "":image_tag(choice.picture.thumb.url))), answer_survey_question_path(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_path(choice.question, params: {survey_question: {selected: [choice.id]}}),class: "choice-"+cstyle )
|
||||
end
|
||||
|
||||
%>
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
|
||||
<%= f.input :icon, :input_html=>{:id=>"iconfield"},:as=>:hidden %>
|
||||
|
||||
<label>Bild</label>
|
||||
<%= image_tag(@choice.picture.thumb.url) unless @choice.picture.nil? %>
|
||||
<%= f.file_field :picture %>
|
||||
<%= f.input :picture, as: :uploader %>
|
||||
<%= f.hidden_field :picture_cache %>
|
||||
|
||||
<% end %>
|
||||
|
||||
6
app/views/survey/questions/_mail.html.erb
Normal file
6
app/views/survey/questions/_mail.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<% question=mail %>
|
||||
<div class="contentbox">
|
||||
<b><%= question.title%></b> <%=question.text%></div>
|
||||
<% question.choices.each do |c| %>
|
||||
<li><%= render c %></li>
|
||||
<% end %>
|
||||
@@ -11,7 +11,7 @@
|
||||
<li><%= render c %></li>
|
||||
<% end %>
|
||||
</ul></div>
|
||||
<%= render partial: "answeredquestion", object: question if question.answers.where(user_id: current_user.id).count>0%>
|
||||
<%= render partial: "survey/questions/answeredquestion", object: question if question.answers.where(user_id: current_user.id).count>0%>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user