AutoCommit Mon Aug 10 17:03:04 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-10 17:03:04 +02:00
parent db53f4843d
commit 07b0755004
6 changed files with 34 additions and 41 deletions

View File

@@ -1,30 +1,20 @@
<% if defined?(wrap_in) && !wrap_in.blank? %>
<% unless defined?(wrap_in) && !wrap_in.blank?
wrap_in=:div
end
%>
<%= content_tag wrap_in do %>
<% cache("neuigkeit_" + neuigkeit.id.to_s + "_" + I18n.locale.to_s+neuigkeit.updated_at.try(:utc).try(:to_s)) do %>
<% c =[:linkbox] %>
<% c << "color-" + neuigkeit.rubrik.color.to_s + "-dark" unless neuigkeit.rubrik.color.nil? %>
<% c << "unpublished" unless neuigkeit.published? %>
<%= link_to [neuigkeit.rubrik,neuigkeit], {class: c} do %>
<%= render :partial=>"neuigkeiten/compact",:locals=> {:neuigkeit=> neuigkeit} %>
<% end %>
<%= content_tag wrap_in do %>
<% cache("neuigkeit_"+neuigkeit.id.to_s+"_"+I18n.locale.to_s+neuigkeit.updated_at.try(:utc).try(:to_s)) do %>
<% c =[:linkbox] %>
<% c << "color-"+neuigkeit.rubrik.color.to_s+"-dark" unless neuigkeit.rubrik.color.nil? %>
<% c << "unpublished" unless neuigkeit.published? %>
<%= link_to [neuigkeit.rubrik,neuigkeit], {class: c} do %>
<%= render :partial=>"neuigkeiten/compact",:locals=> {:neuigkeit=> neuigkeit} %>
<% end %>
<% end %>
<% end %>
<% else %>
<% cache("neuigkeit_"+neuigkeit.id.to_s+"_"+I18n.locale.to_s+neuigkeit.updated_at.try(:utc).try(:to_s)) do %>
<% c =[:linkbox] %>
<% c << "color-"+neuigkeit.rubrik.color.to_s+"-dark" unless neuigkeit.rubrik.color.nil? %>
<% c << "unpublished" unless neuigkeit.published? %>
<%= link_to [neuigkeit.rubrik,neuigkeit], {class: c} do %>
<%= render :partial=>"neuigkeiten/compact",:locals=> {:neuigkeit=> neuigkeit} %>
<% end %>
<% end %>
<% end %>
<% end %>

View File

@@ -46,7 +46,7 @@
<% end%>
<%= new_question_for(neuigkeit_view) %>
<%= render_attachments_for(neuigkeit_view) %>
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>

View File

@@ -2,8 +2,10 @@
<title>Fetsite - <%= @neuigkeit.title %> (<%= @neuigkeit.rubrik.name %>)</title>
<% set_meta_tags :author => fetprofile_path(@neuigkeit.author.fetprofile) unless @neuigkeit.author.fetprofile.nil? %>
<% unless @neuigkeit.picture_robust.url.nil? %>
<% picture_url=URI(root_url)
picture_url.path=@neuigkeit.picture_robust.url(:locale=>nil, :theme=>nil) %>
<%
picture_url=URI(root_url)
picture_url.path=@neuigkeit.picture_robust.url(:locale=>nil, :theme=>nil)
%>
<% end %>
<% set_meta_tags :og =>
{
@@ -20,6 +22,7 @@
<%= render 'rubriken/tabs' %>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
@@ -34,21 +37,21 @@
<%= notice %>
</p>
<%= render partial: "neuigkeit_view", object: @neuigkeit %>
</div>
<% @neuigkeit.questions.each do |q| %>
<%= render q if can? :show, q %>
<% end %>
<% @questions.each do |q| %>
<%= render q if can? :show, q %>
<% end %>
</div>
<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 %>
<a id="findlink-open" href="#"><%= fa_icon("link")%> Neue Verknüpfungen </a>
<% end %>
<%= link_to fa_icon("link") + "Neue Verknüpfung" , "#", id: "findlink-open" if can? :find_link, @neuigkeit %>
<% cache(cache_array_key(@neuigkeit.nlinks, "NLinks")) do %>
<%= render partial: 'neuigkeiten/nlink_list_whole', :object=>@neuigkeit.nlinks %>
<% end %>
<div id="findlink-body" class="ui-dialog" style="">
<% if can? :find_link, @neuigkeit %>
@@ -69,9 +72,9 @@ $(function(){
buttons: {
"Fertig": function() {
dialog.dialog( "close" );
}
}
}
});
$("#findlink-open").on("click",function(){dialog.dialog("open")})
});
});
</script>

View File

@@ -3,7 +3,7 @@
<b>Typ:</b>
<%= @survey_question.typ %>
</p>
<%= render @survey_question.parent unless @survey_question.parent.nil?|| !(@survey_question.parent.class == Neuigkeit) %>
<%= render @survey_question %>
<%= render_comments_for(@survey_question) %>