AutoCommit Mon Jun 8 12:03:12 CEST 2015
This commit is contained in:
@@ -21,6 +21,10 @@ class NeuigkeitenController < ApplicationController
|
|||||||
@neuigkeit.assign_attributes(@neuigkeit.translation.versions.reverse[params[:version].to_i].reify.attributes.select{|k,v| @neuigkeit.translated_attribute_names.include? k.to_sym })
|
@neuigkeit.assign_attributes(@neuigkeit.translation.versions.reverse[params[:version].to_i].reify.attributes.select{|k,v| @neuigkeit.translated_attribute_names.include? k.to_sym })
|
||||||
end
|
end
|
||||||
@calentries1=@neuigkeit.calentries
|
@calentries1=@neuigkeit.calentries
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
72
app/views/neuigkeiten/_neuigkeit_edit.html.erb
Normal file
72
app/views/neuigkeiten/_neuigkeit_edit.html.erb
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<div id="neuigkeit_<%= neuigkeit_edit.id%>" class="contentbox" itemscope itemtype="http://schema.org/Article">
|
||||||
|
<div id="toolBar" ></div>
|
||||||
|
<%= semantic_form_for [@neuigkeit.rubrik,@neuigkeit] do |f| %>
|
||||||
|
|
||||||
|
<meta itemprop="about" content="<%= @neuigkeit.text_first_words %>"/>
|
||||||
|
<meta itemprop="sameAs" content="<%= neuigkeit_url(@neuigkeit,:theme=>nil)%>"/>
|
||||||
|
<meta itemprop="url" content="<%= neuigkeit_url(@neuigkeit,:theme=>nil)%>"/>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<span itemprop="articleSection">
|
||||||
|
<%= ff_icon(@neuigkeit.rubrik.icon) unless @neuigkeit.rubrik.icon.nil? or @neuigkeit.rubrik.icon.empty? %> <%= @neuigkeit.rubrik.name %>
|
||||||
|
</span>
|
||||||
|
<span class="pull-right">
|
||||||
|
<span itemprop="author"><%= @neuigkeit.author.email.to_s unless @neuigkeit.try(:author).try(:email).to_s %>
|
||||||
|
<%= @neuigkeit.author.text %></span>
|
||||||
|
<% unless @neuigkeit.try(:datum).try(:to_date).nil? %>
|
||||||
|
<%= " "+ I18n.t("neuigkeit.am")+" " %><span itemprop="datePublished"><%= I18n.l(@neuigkeit.try(:datum).try(:to_date)) %>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% unless @neuigkeit.published? %>
|
||||||
|
<div class="sticker sticker-red"> Not Published</div>
|
||||||
|
<% end %>
|
||||||
|
<% unless @neuigkeit.origurl.nil? || @neuigkeit.origurl.empty? %>
|
||||||
|
<div class="alert"><%= link_to "Zitiert von "+ @neuigkeit.origurl, @neuigkeit.origurl %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="media">
|
||||||
|
<% unless @neuigkeit.picture_robust.big_thumb.to_s.empty? %>
|
||||||
|
<div class="pull-left" href="#">
|
||||||
|
<p><br><%= link_to image_tag(@neuigkeit.picture_robust.big_thumb.url),@neuigkeit.picture_robust.try(:url) %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="media-body">
|
||||||
|
<h1 itemprop="name">
|
||||||
|
<%= @neuigkeit.title%> edit
|
||||||
|
</h1>
|
||||||
|
<div itemprop="articleBody" class="editable" data-target="#neuigkeit_text">
|
||||||
|
<%= raw(@neuigkeit.text) %>
|
||||||
|
</div>
|
||||||
|
<%= f.input :text, :as=> :hidden %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="calentries">
|
||||||
|
<% unless @calentries1.nil? %>
|
||||||
|
<% @calentries1.each do |ce|%>
|
||||||
|
<%= render ce unless ce.nil? %>
|
||||||
|
<% end %>
|
||||||
|
<% 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>
|
||||||
|
<% unless @neuigkeit.meeting.nil? %>
|
||||||
|
<%= render @neuigkeit.meeting %>
|
||||||
|
<% end%>
|
||||||
|
<div id="calentry_new" ><%= link_to "new Calentry", new_calentry_path(:object_id=>@neuigkeit.id, :object_type=>"Neuigkeit"), :remote=>true if can? :edit, @neuigkeit %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<%= render_attachments_for(@neuigkeit) %>
|
||||||
|
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
||||||
|
<%= render partial: 'nlink_list_whole', :object=>@neuigkeit.nlinks %>
|
||||||
|
<% if can? :find_link , @neuigkeit %>
|
||||||
|
<a id="findlink-open" href="#"><%= fa_icon("link")%> Neue Verknüpfungen </a>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<%= tinymce :inline_div %>
|
||||||
|
<%= tinymce :inline_simple %>
|
||||||
|
<script>
|
||||||
|
$(function(){$('#toolBar').stick_in_parent();})</script>
|
||||||
60
app/views/neuigkeiten/_neuigkeit_view.html.erb
Normal file
60
app/views/neuigkeiten/_neuigkeit_view.html.erb
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<div id="neuigkeit_<%= neuigkeit_view.id%>" class="contentbox" itemscope itemtype="http://schema.org/Article">
|
||||||
|
<meta itemprop="about" content="<%= @neuigkeit.text_first_words %>"/>
|
||||||
|
<meta itemprop="sameAs" content="<%= neuigkeit_url(@neuigkeit,:theme=>nil)%>"/>
|
||||||
|
<meta itemprop="url" content="<%= neuigkeit_url(@neuigkeit,:theme=>nil)%>"/>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<span itemprop="articleSection">
|
||||||
|
<%= ff_icon(@neuigkeit.rubrik.icon) unless @neuigkeit.rubrik.icon.nil? or @neuigkeit.rubrik.icon.empty? %> <%= @neuigkeit.rubrik.name %>
|
||||||
|
</span>
|
||||||
|
<span class="pull-right">
|
||||||
|
<span itemprop="author"><%= @neuigkeit.author.email.to_s unless @neuigkeit.try(:author).try(:email).to_s %>
|
||||||
|
<%= @neuigkeit.author.text %></span>
|
||||||
|
<% unless @neuigkeit.try(:datum).try(:to_date).nil? %>
|
||||||
|
<%= " "+ I18n.t("neuigkeit.am")+" " %><span itemprop="datePublished"><%= I18n.l(@neuigkeit.try(:datum).try(:to_date)) %>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% unless @neuigkeit.published? %>
|
||||||
|
<div class="sticker sticker-red"> Not Published</div>
|
||||||
|
<% end %>
|
||||||
|
<% unless @neuigkeit.origurl.nil? || @neuigkeit.origurl.empty? %>
|
||||||
|
<div class="alert"><%= link_to "Zitiert von "+ @neuigkeit.origurl, @neuigkeit.origurl %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="media">
|
||||||
|
<% unless @neuigkeit.picture_robust.big_thumb.to_s.empty? %>
|
||||||
|
<div class="pull-left" href="#">
|
||||||
|
<p><br><%= link_to image_tag(@neuigkeit.picture_robust.big_thumb.url),@neuigkeit.picture_robust.try(:url) %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="media-body">
|
||||||
|
<h1 itemprop="name">
|
||||||
|
<%= @neuigkeit.title%>
|
||||||
|
</h1>
|
||||||
|
<div itemprop="articleBody">
|
||||||
|
<%= raw(@neuigkeit.text) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="calentries">
|
||||||
|
<% @calentries1.each do |ce|%>
|
||||||
|
<%= render ce unless ce.nil? %>
|
||||||
|
<% 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>
|
||||||
|
<% unless @neuigkeit.meeting.nil? %>
|
||||||
|
<%= render @neuigkeit.meeting %>
|
||||||
|
<% end%>
|
||||||
|
<div id="calentry_new" ><%= link_to "new Calentry", new_calentry_path(:object_id=>@neuigkeit.id, :object_type=>"Neuigkeit"), :remote=>true if can? :edit, @neuigkeit %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<%= render_attachments_for(@neuigkeit) %>
|
||||||
|
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
||||||
|
<%= render partial: 'nlink_list_whole', :object=>@neuigkeit.nlinks %>
|
||||||
|
<% if can? :find_link , @neuigkeit %>
|
||||||
|
<a id="findlink-open" href="#"><%= fa_icon("link")%> Neue Verknüpfungen </a>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
1
app/views/neuigkeiten/edit.js.erb
Normal file
1
app/views/neuigkeiten/edit.js.erb
Normal file
@@ -0,0 +1 @@
|
|||||||
|
$('#neuigkeit_<%= @neuigkeit.id %>').replaceWith("<%= escape_javascript( render partial:"neuigkeit_edit", object: @neuigkeit )%>");
|
||||||
@@ -31,8 +31,11 @@ end
|
|||||||
}(document, 'script', 'facebook-jssdk'));</script>
|
}(document, 'script', 'facebook-jssdk'));</script>
|
||||||
|
|
||||||
<div class="content-column content-wrap">
|
<div class="content-column content-wrap">
|
||||||
|
<%= link_to "Refresh", neuigkeit_path(@neuigkeit), remote: true %>
|
||||||
|
|
||||||
|
<%= link_to "Edit", edit_rubrik_neuigkeit_path(@neuigkeit), remote: true if can? :edit, @neuigkeit %>
|
||||||
<p id="notice"><%= notice %></p>
|
<p id="notice"><%= notice %></p>
|
||||||
<div class="contentbox" itemscope itemtype="http://schema.org/Article">
|
<div id ="neuigkeit_<%= @neuigkeit.id %>"class="contentbox" itemscope itemtype="http://schema.org/Article">
|
||||||
<meta itemprop="about" content="<%= @neuigkeit.text_first_words %>"/>
|
<meta itemprop="about" content="<%= @neuigkeit.text_first_words %>"/>
|
||||||
<meta itemprop="sameAs" content="<%= neuigkeit_url(@neuigkeit,:theme=>nil)%>"/>
|
<meta itemprop="sameAs" content="<%= neuigkeit_url(@neuigkeit,:theme=>nil)%>"/>
|
||||||
<meta itemprop="url" content="<%= neuigkeit_url(@neuigkeit,:theme=>nil)%>"/>
|
<meta itemprop="url" content="<%= neuigkeit_url(@neuigkeit,:theme=>nil)%>"/>
|
||||||
|
|||||||
3
app/views/neuigkeiten/show.js.erb
Normal file
3
app/views/neuigkeiten/show.js.erb
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
$('#neuigkeit_<%= @neuigkeit.id %>').replaceWith("<%= escape_javascript( render partial:"neuigkeit_view", object: @neuigkeit )%>");
|
||||||
|
alert("reloaded<%= @neuigkeit.id %>");
|
||||||
|
|
||||||
Reference in New Issue
Block a user