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

@@ -25,7 +25,7 @@
<div class="media">
<% unless neuigkeit_view.picture_robust.big_thumb.to_s.empty? %>
<div class="pull-left" href="#">
<p><br><%= link_to image_tag(neuigkeit_view.picture_robust.big_thumb.url),neuigkeit_view.picture_robust.try(:url) %>
<p><br><%= link_to image_tag(neuigkeit_view.picture_robust.big_thumb),neuigkeit_view.picture_robust.try(:url) %>
</p>
</div>
<% end %>

View File

@@ -3,7 +3,7 @@
<h1>
<%= @neuigkeit.title%>
</h1>
<%= image_tag @neuigkeit.picture.big_thumb.url(only_path:false) %>
<%= content_tag(:img,"",src: "http://"+ActionMailer::Base.default_url_options[:host].to_s+@neuigkeit.picture.big_thumb.url) %>
<%=url_for controller: "neuigkeiten",action: :show, :id=>@neuigkeit.id, only_path: false %>
<%= raw(@neuigkeit.text) %>
<%= render partial:"survey/questions/mail", object: @neuigkeit.questions.first unless @neuigkeit.questions.empty?%>

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 %>