From 3618db1376e960b56e9ef5cbc98a1d2a8fc154ed Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Mon, 15 Jun 2015 17:03:08 +0200 Subject: [PATCH] AutoCommit Mon Jun 15 17:03:08 CEST 2015 --- .../themes/blue2/application.css.scss | 26 +++++++++++++++++++ app/controllers/.#crawler_controller.rb | 1 + app/controllers/crawler_controller.rb | 10 ++++--- app/views/themes/blue2/home/intern.html.erb | 14 +++++----- config/routes.rb | 1 + 5 files changed, 42 insertions(+), 10 deletions(-) create mode 120000 app/controllers/.#crawler_controller.rb diff --git a/app/assets/stylesheets/themes/blue2/application.css.scss b/app/assets/stylesheets/themes/blue2/application.css.scss index 6276bbd..18fdadb 100755 --- a/app/assets/stylesheets/themes/blue2/application.css.scss +++ b/app/assets/stylesheets/themes/blue2/application.css.scss @@ -128,3 +128,29 @@ body { background: #FFF; //#EFEFEF; background-size:100%; } + +ul.linklist_block a.linkbox +{ +max-width:100%; +padding:0; +margin:5px; +width: 6em; +text-align:center; +} +ul.linklist_block a.linkbox:hover +{background:lighten($color_schema_1,40%); +} +ul.linklist_block li +{text-decoration: none; +list-style:none; +margin-bottom:2px; +float:left; +} +ul.linklist_block li a i{ +display:block; +vertical-align:middle; +margin-right:6px; +font-size:5em; +line-height:70px; +} +ul.linklist_block { clear:left; float:none;} diff --git a/app/controllers/.#crawler_controller.rb b/app/controllers/.#crawler_controller.rb new file mode 120000 index 0000000..038438c --- /dev/null +++ b/app/controllers/.#crawler_controller.rb @@ -0,0 +1 @@ +andreas@andreas-ThinkPad-S430.4992:1434372676 \ No newline at end of file diff --git a/app/controllers/crawler_controller.rb b/app/controllers/crawler_controller.rb index c5a9903..21304f2 100644 --- a/app/controllers/crawler_controller.rb +++ b/app/controllers/crawler_controller.rb @@ -20,14 +20,16 @@ class CrawlerController < ApplicationController end end def move_to_news - authorize! :doadmin, User - + authorize! :doadmin, User co=Crawlobject.find(params[:id]) if co.objtype == 5 || co.objtype==6 co.move_to_neuigkeit(User.find(Rails.configuration.crawlconfig[co.objtype]["user_id"]), Rubrik.find(Rails.configuration.crawlconfig[co.objtype]["rubrik_id"])) redirect_to co.something end - - + end + def do_crawl_news + Crawlobject.crawl_news(5) + Crawlobject.crawl_news(6) + redirect_to action: :index end end diff --git a/app/views/themes/blue2/home/intern.html.erb b/app/views/themes/blue2/home/intern.html.erb index ed26900..3fdfd18 100644 --- a/app/views/themes/blue2/home/intern.html.erb +++ b/app/views/themes/blue2/home/intern.html.erb @@ -2,21 +2,23 @@
-
+
Suche nach Protokollen <%= semantic_form_for :search,:remote=>true, :url=>search_documents_path, :html=>{:id=>"search_form",:class=>"", :method=>'get'} do |f| %> <%= f.input :query, :input_html => { :name => 'query' } , :label=>false, :class=>"search-query" %> diff --git a/config/routes.rb b/config/routes.rb index 75fc02b..197d4d5 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -21,6 +21,7 @@ resources :crawler, :only=>[] do collection do get :index + get :do_crawl_news end member do get :move_to_news