AutoCommit Sam Aug 1 14:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-01 14:03:01 +02:00
parent fb99d55734
commit cc764f68af
11 changed files with 183 additions and 9 deletions

View File

@@ -36,6 +36,9 @@
<%= render partial: "neuigkeit_view", object: @neuigkeit %>
</div>
</div>
<% @neuigkeit.questions.each do |q| %>
<%= render q%>
<% end %>
<div class="fb-like" data-href"<%= rubrik_neuigkeit_url(@rubrik,@neuigkeit,{themes: nil, locale: nil})%>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
<% if can? :find_link , @neuigkeit %>

View File

@@ -1,6 +1,10 @@
<%= stylesheet_link_tag "application", :media=>"all" %>
<h1>
<%= @neuigkeit.title%>
</h1>
<%= image_tag "http://www.fet.at"+@neuigkeit.picture.big_thumb.url %>
<%= image_tag @neuigkeit.picture.big_thumb.url(only_path:false) %>
<%=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?%>
<%= link_to "Auf Fet.at weiterlesen", rubrik_neuigkeit_url(@neuigkeit.rubrik, @neuigkeit,:locale=>:de, :theme=>nil,:host=> "www.fet.at") %>

View File

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

View File

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

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

View File

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