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 %>
|
||||
|
||||
Reference in New Issue
Block a user