AutoCommit Mon Jun 8 17:03:02 CEST 2015
This commit is contained in:
@@ -6,8 +6,10 @@
|
|||||||
div.sticker
|
div.sticker
|
||||||
{
|
{
|
||||||
width: 90%;
|
width: 90%;
|
||||||
|
border-radius: 5px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 5px
|
padding: 5px;
|
||||||
|
margin:auto;
|
||||||
}
|
}
|
||||||
div.sticker-red
|
div.sticker-red
|
||||||
{ background: red;
|
{ background: red;
|
||||||
|
|||||||
@@ -104,6 +104,8 @@ class NeuigkeitenController < ApplicationController
|
|||||||
def edit
|
def edit
|
||||||
@neuigkeit = Neuigkeit.find(params[:id])
|
@neuigkeit = Neuigkeit.find(params[:id])
|
||||||
@neuigkeit.no_fallbacks=true
|
@neuigkeit.no_fallbacks=true
|
||||||
|
@rubrik=@neuigkeit.rubrik
|
||||||
|
|
||||||
@calentries= @neuigkeit.calentries
|
@calentries= @neuigkeit.calentries
|
||||||
@calentries<< Calentry.new
|
@calentries<< Calentry.new
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
module CalentriesHelper
|
module CalentriesHelper
|
||||||
|
def render_calentries_for(p)
|
||||||
|
calentry_list=p.calentries
|
||||||
|
render(partial: "calentries/calentry_list", object: calentry_list, locals:{parent: p})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -89,12 +89,16 @@ end
|
|||||||
ApplicationController.helpers.fa_icon("calendar 2x") + self.text
|
ApplicationController.helpers.fa_icon("calendar 2x") + self.text
|
||||||
end
|
end
|
||||||
def text
|
def text
|
||||||
if (self.start.to_date - self.ende.to_date) < 1.day
|
if self.start.nil? || self.ende.nil?
|
||||||
format=:timeonly
|
"error"
|
||||||
else
|
else
|
||||||
format =:default
|
if (self.start.to_date - self.ende.to_date) < 1.day
|
||||||
|
format=:timeonly
|
||||||
|
else
|
||||||
|
format =:default
|
||||||
|
end
|
||||||
|
I18n.l(self.start) +" "+ I18n.t("cal.bis")+" "+ I18n.l(self.ende, :format=>format)
|
||||||
end
|
end
|
||||||
I18n.l(self.start) +" "+ I18n.t("cal.bis")+" "+ I18n.l(self.ende, :format=>format)
|
|
||||||
end
|
end
|
||||||
scope :public, -> { where(:public => :true) }
|
scope :public, -> { where(:public => :true) }
|
||||||
# scope :upcoming, -> { where("start >= ?" , Time.now).where("start <= ?", 28.days.from_now) }
|
# scope :upcoming, -> { where("start >= ?" , Time.now).where("start <= ?", 28.days.from_now) }
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
$("#<%= Attachment.parent_attachment_list_id(@parent) %>").replaceWith("<%= escape_javascript ( render partial:"attachments/attachment_list", object:@attachments, locals: {editor: true, parent: @parent} ) %>")
|
$("#<%= Attachment.parent_attachment_list_id(@parent) %>").replaceWith("<%= escape_javascript ( render partial:"attachments/attachment_list", object:@attachments, locals: {editor: true, parent: @parent} ) %>")
|
||||||
|
<% if @parent.is_a?(Neuigkeit) %>
|
||||||
|
<% @neuigkeit=@parent; @rubrik=@neuigkeit.rubrik %>
|
||||||
|
<%= render "neuigkeiten/show", object: @neuigkeit %>
|
||||||
|
<% end %>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<div class="contentbox" id="calentry_<%= calentry.id%>">
|
<div class="contentbox" id="calentry_<%= calentry.id%>">
|
||||||
<% image_tag("/iconnavy/time.png") %>
|
|
||||||
<%= calentry.icon_text %>
|
<%= calentry.icon_text %>
|
||||||
<% if !(defined? manage) || manage %>
|
<% if !(defined? manage) || manage %>
|
||||||
<%= link_to "edit", edit_calentry_path(calentry),:remote=>true if can? :edit, calentry %>
|
<%= link_to "edit", edit_calentry_path(calentry),:remote=>true if can? :edit, calentry %>
|
||||||
|
|||||||
6
app/views/calentries/_calentry_list.html.erb
Normal file
6
app/views/calentries/_calentry_list.html.erb
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<div id="calentries_<%= parent.class.to_s + "_" + parent.id.to_s %>">
|
||||||
|
<% calentry_list.each do |ce|%>
|
||||||
|
<%= render ce unless ce.nil? %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div id="calentry_new_<%= parent.class.to_s + "_" + parent.id.to_s %>" ><%= link_to "new Calentry", new_calentry_path(:object_id=>@neuigkeit.id, :object_type=>"Neuigkeit"), :remote=>true if can? :edit, @neuigkeit %></div>
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
$("#calentry_new").replaceWith("<div id=\"calentry_new\"><%=escape_javascript( render :partial=>"nested_form" ,:object=>@calentry) %></div>");
|
$("#calentry_new_<%= @calentry.object.class.to_s + "_" + @calentry.object.id.to_s %>").replaceWith("<div id=\"calentry_new_<%= @calentry.object.class.to_s + "_" + @calentry.object.id.to_s %>\"><%=escape_javascript( render :partial=>"nested_form" ,:object=>@calentry) %></div>");
|
||||||
$('.datetimepicker').datetimepicker({format: 'd.m.Y H:i', startDate: (!($(this).attr("value")==undefined))? $(this).attr("value"): ""})
|
$('.datetimepicker').datetimepicker({format: 'd.m.Y H:i', startDate: (!($(this).attr("value")==undefined))? $(this).attr("value"): ""})
|
||||||
|
|
||||||
1
app/views/neuigkeiten/.#_neuigkeit_view.html.erb
Symbolic link
1
app/views/neuigkeiten/.#_neuigkeit_view.html.erb
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
andreas@andreas-ThinkPad-S430.3674:1433770009
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
<div id="neuigkeit_<%= neuigkeit_edit.id%>" class="contentbox" itemscope itemtype="http://schema.org/Article">
|
<div id="neuigkeit_<%= neuigkeit_edit.id%>" class="contentbox" itemscope itemtype="http://schema.org/Article">
|
||||||
<div id="toolBar" ></div>
|
<div id="toolBar" ></div>
|
||||||
<%= semantic_form_for [@neuigkeit.rubrik,@neuigkeit] do |f| %>
|
<%= semantic_form_for [@neuigkeit.rubrik,@neuigkeit] do |f| %>
|
||||||
@@ -6,7 +7,7 @@
|
|||||||
<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)%>"/>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="media">
|
||||||
<span itemprop="articleSection">
|
<span itemprop="articleSection">
|
||||||
<%= ff_icon(@neuigkeit.rubrik.icon) unless @neuigkeit.rubrik.icon.nil? or @neuigkeit.rubrik.icon.empty? %> <%= @neuigkeit.rubrik.name %>
|
<%= ff_icon(@neuigkeit.rubrik.icon) unless @neuigkeit.rubrik.icon.nil? or @neuigkeit.rubrik.icon.empty? %> <%= @neuigkeit.rubrik.name %>
|
||||||
</span>
|
</span>
|
||||||
@@ -33,23 +34,28 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h1 itemprop="name">
|
<h1 itemprop="name" class="editable_simple" data-target="#neuigkeit_title">
|
||||||
<%= @neuigkeit.title%> edit
|
<%= @neuigkeit.title%>
|
||||||
</h1>
|
</h1>
|
||||||
<div itemprop="articleBody" class="editable" data-target="#neuigkeit_text">
|
<div itemprop="articleBody" class="editable" data-target="#neuigkeit_text">
|
||||||
<%= raw(@neuigkeit.text) %>
|
<%= raw(@neuigkeit.text) %>
|
||||||
</div>
|
</div>
|
||||||
<%= f.input :text, :as=> :hidden %>
|
<%= f.input :text, :as=> :hidden %>
|
||||||
|
<%= f.input :title, :as=> :hidden %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="calentries">
|
<div id="calentries">
|
||||||
<% unless @calentries1.nil? %>
|
<% unless neuigkeit_edit.calentries.nil? || neuigkeit_edit.calentries.empty? %>
|
||||||
<% @calentries1.each do |ce|%>
|
<% neuigkeit_edit.calentries.each do |ce|%>
|
||||||
<%= render ce unless ce.nil? %>
|
<%= render ce , object: ce unless ce.nil? %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
<%= f.actions do %>
|
||||||
|
<%= f.action :submit, :as => :input %>
|
||||||
|
<% 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>
|
<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? %>
|
<% unless @neuigkeit.meeting.nil? %>
|
||||||
<%= render @neuigkeit.meeting %>
|
<%= render @neuigkeit.meeting %>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<div id="neuigkeit_<%= neuigkeit_view.id%>" class="contentbox" itemscope itemtype="http://schema.org/Article">
|
<div id="neuigkeit_<%= neuigkeit_view.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)%>"/>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="media">
|
||||||
<span itemprop="articleSection">
|
<span itemprop="articleSection">
|
||||||
<%= ff_icon(@neuigkeit.rubrik.icon) unless @neuigkeit.rubrik.icon.nil? or @neuigkeit.rubrik.icon.empty? %> <%= @neuigkeit.rubrik.name %>
|
<%= ff_icon(@neuigkeit.rubrik.icon) unless @neuigkeit.rubrik.icon.nil? or @neuigkeit.rubrik.icon.empty? %> <%= @neuigkeit.rubrik.name %>
|
||||||
</span>
|
</span>
|
||||||
@@ -31,30 +31,23 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h1 itemprop="name">
|
<h1 itemprop="name">
|
||||||
<%= @neuigkeit.title%>
|
<%= @neuigkeit.title%> <%= link_to fa_icon("edit"), edit_rubrik_neuigkeit_path(@neuigkeit), remote: true if can? :edit, @neuigkeit %>
|
||||||
</h1>
|
</h1>
|
||||||
<div itemprop="articleBody">
|
<div itemprop="articleBody">
|
||||||
<%= raw(@neuigkeit.text) %>
|
<%= raw(@neuigkeit.text) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="calentries">
|
<%= render_calentries_for(@neuigkeit)%>
|
||||||
<% @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>
|
<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? %>
|
<% unless @neuigkeit.meeting.nil? %>
|
||||||
<%= render @neuigkeit.meeting %>
|
<%= render @neuigkeit.meeting %>
|
||||||
<% end%>
|
<% 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_attachments_for(@neuigkeit) %>
|
||||||
|
|
||||||
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
<%= 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>
|
</div>
|
||||||
|
|||||||
1
app/views/neuigkeiten/_show.js.erb
Normal file
1
app/views/neuigkeiten/_show.js.erb
Normal file
@@ -0,0 +1 @@
|
|||||||
|
$('#neuigkeit_<%= @neuigkeit.id %>').replaceWith("<%= escape_javascript( render partial:"neuigkeiten/neuigkeit_view", object: @neuigkeit )%>");
|
||||||
@@ -1,29 +1,29 @@
|
|||||||
<%= content_for :header do %>
|
<%= content_for :header do %>
|
||||||
<title>Fetsite - <%= @neuigkeit.title %> (<%= @neuigkeit.rubrik.name %>)</title>
|
<title>Fetsite - <%= @neuigkeit.title %> (<%= @neuigkeit.rubrik.name %>)</title>
|
||||||
<% set_meta_tags :author => fetprofile_path(@neuigkeit.author.fetprofile) unless @neuigkeit.author.fetprofile.nil? %>
|
<% set_meta_tags :author => fetprofile_path(@neuigkeit.author.fetprofile) unless @neuigkeit.author.fetprofile.nil? %>
|
||||||
<% unless @neuigkeit.picture_robust.url.nil?
|
<% unless @neuigkeit.picture_robust.url.nil? %>
|
||||||
picture_url=URI(root_url)
|
<% picture_url=URI(root_url)
|
||||||
picture_url.path=@neuigkeit.picture_robust.url(:locale=>nil, :theme=>nil)
|
picture_url.path=@neuigkeit.picture_robust.url(:locale=>nil, :theme=>nil) %>
|
||||||
end
|
<% end %>
|
||||||
%>
|
<% set_meta_tags :og =>
|
||||||
<% set_meta_tags :og => {
|
{
|
||||||
:image => picture_url.to_s,
|
:image => picture_url.to_s,
|
||||||
:title => @neuigkeit.title.to_s + " (" + @neuigkeit.rubrik.name.to_s + ")",
|
:title => @neuigkeit.title.to_s + " (" + @neuigkeit.rubrik.name.to_s + ")",
|
||||||
:type => "article",
|
:type => "article",
|
||||||
:description =>@neuigkeit.text_first_words,
|
:description =>@neuigkeit.text_first_words,
|
||||||
:url=>neuigkeit_url(:theme=>nil)
|
:url=>neuigkeit_url(:theme=>nil)
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<%= display_meta_tags %>
|
||||||
<%= display_meta_tags %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render 'rubriken/tabs' %>
|
<%= render 'rubriken/tabs' %>
|
||||||
|
|
||||||
<div id="fb-root"></div>
|
<div id="fb-root"></div>
|
||||||
<script>(function(d, s, id) {
|
<script>(function(d, s, id) {
|
||||||
var js, fjs = d.getElementsByTagName(s)[0];
|
var js, fjs = d.getElementsByTagName(s)[0];
|
||||||
if (d.getElementById(id)) return;
|
if (d.getElementById(id)) return;
|
||||||
js = d.createElement(s); js.id = id;
|
js = d.createElement(s); js.id = id;
|
||||||
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&appId=120379864660921&version=v2.0";
|
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&appId=120379864660921&version=v2.0";
|
||||||
@@ -31,96 +31,43 @@ 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 "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 id ="neuigkeit_<%= @neuigkeit.id %>"class="contentbox" itemscope itemtype="http://schema.org/Article">
|
<%= render partial: "neuigkeit_view", object: @neuigkeit %>
|
||||||
<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>
|
|
||||||
<p></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="calentries">
|
|
||||||
<% @calentries1.each do |ce|%>
|
|
||||||
<%= render ce unless ce.nil? %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</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 %>
|
|
||||||
</div>
|
</div>
|
||||||
<%= render partial: 'nlink_list_whole', :object=>@neuigkeit.nlinks %>
|
<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 %>
|
<% if can? :find_link , @neuigkeit %>
|
||||||
<a id="findlink-open" href="#"><%= fa_icon("link")%> Neue Verknüpfungen </a>
|
<a id="findlink-open" href="#"><%= fa_icon("link")%> Neue Verknüpfungen </a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
<%= render partial: 'neuigkeiten/nlink_list_whole', :object=>@neuigkeit.nlinks %>
|
||||||
|
|
||||||
|
|
||||||
<div id="findlink-body"class="ui-dialog" style="">
|
<div id="findlink-body"class="ui-dialog" style="">
|
||||||
<% if can? :find_link, @neuigkeit %>
|
<% if can? :find_link, @neuigkeit %>
|
||||||
Nach Element suchen:
|
Nach Element suchen:
|
||||||
<%= semantic_form_for :find_link, :url=>find_link_rubrik_neuigkeit_path(@rubrik,@neuigkeit), :html=>{:id=>"search_form", :method=>'get'} , :remote=> true do |f| %>
|
<%= semantic_form_for :find_link, :url=>find_link_rubrik_neuigkeit_path(@rubrik,@neuigkeit), :html=>{:id=>"search_form", :method=>'get'} , :remote=> true do |f| %>
|
||||||
<%= f.input :query, :input_html => { :name => 'query' },:label=>false %>
|
<%= f.input :query, :input_html => { :name => 'query' },:label=>false %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= render partial: 'nlink_list_search_whole', object: @nlink_search %>
|
<%= render partial: 'nlink_list_search_whole', object: @nlink_search %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function(){
|
$(function(){
|
||||||
dialog = $( "#findlink-body" ).dialog({
|
dialog = $( "#findlink-body" ).dialog({
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
width: 350,
|
width: 350,
|
||||||
modal: true,
|
modal: true,
|
||||||
title: "Neue Verknüpfung hinzufügen",
|
title: "Neue Verknüpfung hinzufügen",
|
||||||
buttons: {
|
buttons: {
|
||||||
"Fertig": function() {
|
"Fertig": function() {
|
||||||
dialog.dialog( "close" );
|
dialog.dialog( "close" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#findlink-open").on("click",function(){dialog.dialog("open")})
|
$("#findlink-open").on("click",function(){dialog.dialog("open")})
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
$('#neuigkeit_<%= @neuigkeit.id %>').replaceWith("<%= escape_javascript( render partial:"neuigkeit_view", object: @neuigkeit )%>");
|
<%= render "show" %>
|
||||||
alert("reloaded<%= @neuigkeit.id %>");
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user