forked from bofh/fetsite
pagination bootstrap update layout
This commit is contained in:
0
app/views/neuigkeiten/_find_link.js.erb
Normal file
0
app/views/neuigkeiten/_find_link.js.erb
Normal file
@@ -1,5 +1,20 @@
|
||||
<% if defined?(wrap_in) && !wrap_in.blank? %>
|
||||
<%= content_tag wrap_in do %>
|
||||
www
|
||||
<% c =[:linkbox] %>
|
||||
<% c << "color-"+neuigkeit.rubrik.color.to_s+"-dark" unless neuigkeit.rubrik.color.nil? %>
|
||||
<%= link_to [neuigkeit.rubrik,neuigkeit], {class: c} do %>
|
||||
<%= render :partial=>"neuigkeiten/compact",:locals=> {:neuigkeit=> neuigkeit} %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<% else %>
|
||||
|
||||
<% c =[:linkbox] %>
|
||||
<% c << "color-"+neuigkeit.rubrik.color.to_s+"-dark" unless neuigkeit.rubrik.color.nil? %>
|
||||
<%= link_to [neuigkeit.rubrik,neuigkeit], {class: c} do %>
|
||||
<%= render :partial=>"neuigkeiten/compact",:locals=> {:neuigkeit=> neuigkeit} %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<li>
|
||||
|
||||
<%= link_to nlink_list.link do %>
|
||||
<div class="contentbox" >
|
||||
<div class="contentbox" style="height:9em">
|
||||
<% p = nlink_list.link_type.downcase.pluralize+"/nlink" %>
|
||||
<%= raw(strip_links(render :partial=>p, :object=>nlink_list.link )) %>
|
||||
</div>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
5
app/views/neuigkeiten/_nlink_list_search_whole.html.erb
Normal file
5
app/views/neuigkeiten/_nlink_list_search_whole.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<div id="nlink_list_search">
|
||||
<ul class="unstyled">
|
||||
<%= render partial: "nlink_list_search", collection: nlink_list_search_whole %>
|
||||
</ul>
|
||||
</div>
|
||||
15
app/views/neuigkeiten/_nlink_list_whole.html.erb
Normal file
15
app/views/neuigkeiten/_nlink_list_whole.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
<div id="nlink_list">
|
||||
<%= I18n.t("neuigkeit.sieheauch") %>
|
||||
<div class="container-fluid">
|
||||
<% nlink_list_whole.each_slice(2) do |row| %>
|
||||
<div class="row-fluid">
|
||||
<% row.each do |nl| %>
|
||||
<div class="span6">
|
||||
<%= render partial: "nlink_list", object: nl %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,2 +1,2 @@
|
||||
$('#nlink_list_search').html("");
|
||||
$('#nlink_list').html("<%= escape_javascript( render partial:"nlink_list", collection: @nlinks )%>");
|
||||
$('#nlink_list').replaceWith("<%= escape_javascript( render partial:"nlink_list_whole", object: @nlinks )%>");
|
||||
1
app/views/neuigkeiten/find_link.js.erb
Normal file
1
app/views/neuigkeiten/find_link.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$('#nlink_list_search').replaceWith("<%= escape_javascript( render partial:"nlink_list_search_whole", object: @nlink_search )%>");
|
||||
@@ -27,18 +27,10 @@
|
||||
<% end %>
|
||||
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
||||
</div>
|
||||
|
||||
<%= I18n.t("neuigkeit.sieheauch") %>
|
||||
<ul class="unstyled">
|
||||
<div id="nlink_list">
|
||||
<%= render partial: "nlink_list", collection: @neuigkeit.nlinks %>
|
||||
</div>
|
||||
<div id="nlink_list_search">
|
||||
<%= render partial: "nlink_list_search", collection: @nlink_search %>
|
||||
</div>
|
||||
</ul>
|
||||
<%= render partial: 'nlink_list_whole', :object=>@neuigkeit.nlinks %>
|
||||
<%= render partial: 'nlink_list_search_whole', object: @nlink_search %>
|
||||
<% if can? :find_link, @neuigkeit %>
|
||||
<%= semantic_form_for :find_link, :url=>find_link_rubrik_neuigkeit_path(@rubrik,@neuigkeit), :html=>{:id=>"search_form", :method=>'get'} 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 %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user