forked from bofh/fetsite
Merge remote-tracking branch 'origin/paginate' into extrafeature
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="shortcut icon" href="http://glonass.htu.tuwien.ac.at/favicon.ico">
|
||||
<!--<link rel="shortcut icon" href="http://www.fet.at/favicon.ico">-->
|
||||
<title>Fetsite</title>
|
||||
<link rel="shortcut icon" href="http://glonass.htu.tuwien.ac.at/favicon.ico">
|
||||
<!--<link rel="shortcut icon" href="http://www.fet.at/favicon.ico">-->
|
||||
<title>Fetsite</title>
|
||||
|
||||
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
|
||||
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
|
||||
<% theme_stylesheet_link_tag "test", :media => "all" %>
|
||||
<% theme_stylesheet_link_tag "mod", :media=>"all" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
<%= yield :header %>
|
||||
</head>
|
||||
|
||||
|
||||
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
|
||||
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
|
||||
<% theme_stylesheet_link_tag "test", :media => "all" %>
|
||||
<% theme_stylesheet_link_tag "mod", :media=>"all" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="maincontainer" class="container-fluid">
|
||||
<body>
|
||||
<div id="maincontainer" class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span1 "></div>
|
||||
<div class="span10 ">
|
||||
@@ -27,7 +27,6 @@
|
||||
<%= link_to home_index_path do %>
|
||||
<span class="feticon-fet_logo fa-4x color-1"> </span>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="menudiv" style="margin-top:12px">
|
||||
@@ -56,7 +55,7 @@
|
||||
<div class="span1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
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 %>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<h1>
|
||||
<%= @neuigkeit.title%>
|
||||
</h1>
|
||||
<%= raw(@neuigkeit.text) %>
|
||||
<h1>
|
||||
<%= @neuigkeit.title%>
|
||||
</h1>
|
||||
<%= image_tag @neuigkeit.picture.big_thumb.url %>
|
||||
<%= raw(@neuigkeit.text) %>
|
||||
<p> Eine Nachricht aus deiner Fachschaft! wenn du diese Neuigkeiten nicht mehr bekommen willst hast du leider Pech gehabt es gibt keine Möglichkeit aus der FET wieder auszutreten.</p>
|
||||
|
||||
@@ -12,12 +12,17 @@
|
||||
|
||||
<div class="span9">
|
||||
|
||||
<ul class="unstyled linkbox-list" style="max-width:70em">
|
||||
<ul class="unstyled linkbox-list" style="max-width:70em" id="neuigkeiten">
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
<li><%= render n if can?(:show, n) %> </li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div id="infinite-scrolling">
|
||||
<%= will_paginate @neuigkeiten %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="span3">
|
||||
<%= render 'calendars/calentries', :object=>@calentries %>
|
||||
</div>
|
||||
|
||||
@@ -19,16 +19,18 @@
|
||||
<div class="row-fluid">
|
||||
|
||||
<div class="span9">
|
||||
<% @neuigkeiten.each_slice(1) do |row| %>
|
||||
<ul class="unstyled" style="max-width:70em">
|
||||
<% row.each do |neuigkeit| %>
|
||||
<ul class="unstyled linkbox-list" style="max-width:70em" id="neuigkeiten">
|
||||
<% @neuigkeiten.each do |neuigkeit| %>
|
||||
|
||||
<li>
|
||||
<%= render neuigkeit %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<div id="infinite-scrolling">
|
||||
<%= will_paginate @neuigkeiten %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span3">
|
||||
<%= render 'calendars/calentries', :object=>@calentries %>
|
||||
|
||||
7
app/views/rubriken/show.js.erb
Normal file
7
app/views/rubriken/show.js.erb
Normal file
@@ -0,0 +1,7 @@
|
||||
$('#neuigkeiten').append('<%= j render @neuigkeiten, :locals => { :wrap_in => :li} %>');
|
||||
<% if @neuigkeiten.next_page %>
|
||||
$('.pagination').replaceWith('<%= j will_paginate @neuigkeiten %>');
|
||||
<% else %>
|
||||
$(window).off('scroll');
|
||||
$('.pagination').remove();
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user