forked from bofh/fetsite
Merge branch 'master' of https://github.com/fetsite/fetsite
This commit is contained in:
1
app/controllers/.#crawler_controller.rb
Symbolic link
1
app/controllers/.#crawler_controller.rb
Symbolic link
@@ -0,0 +1 @@
|
||||
andreas@andreas-ThinkPad-S430.4992:1434372676
|
||||
@@ -51,6 +51,6 @@ def current_ability
|
||||
@current_ability ||= Ability.new(current_user, request, params[:key])
|
||||
end
|
||||
def default_url_options
|
||||
{locale: I18n.locale, theme: nil , ansicht: nil}
|
||||
{locale: nil, theme: nil , ansicht: nil} # I18n.locale
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,6 +3,7 @@ class BeispieleController < ApplicationController
|
||||
|
||||
load_and_authorize_resource
|
||||
include LikeVoteable
|
||||
acts_as_flagable
|
||||
def index
|
||||
@beispiele = Beispiel.all
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ class CrawlerController < ApplicationController
|
||||
authorize! :doadmin, User
|
||||
|
||||
@crawlobjs=Crawlobject.where(:objtype=>5).order(:published_at).reverse_order
|
||||
@crawlobjs_etit=Crawlobject.where(:objtype=>6).order(:published_at).reverse_order
|
||||
|
||||
end
|
||||
def load_attachments
|
||||
authorize! :doadmin, User
|
||||
@@ -18,12 +20,17 @@ 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.move_to_neuigkeit(User.find(Rails.configuration.crawlconfig[5]["user_id"]), Rubrik.find(Rails.configuration.crawlconfig[5]["rubrik_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
|
||||
|
||||
@@ -47,6 +47,10 @@ class LvasController < ApplicationController
|
||||
def show
|
||||
@lva = Lva.find_by_id(params[:id])
|
||||
@beispiel=Beispiel.new
|
||||
@beispiele_all=@lva.beispiele.order(:datum).accessible_by(current_ability, :show)
|
||||
@beispiele = @lva.beispiele.not_flag_badquality.not_flag_delete.order(:datum).accessible_by(current_ability, :show)
|
||||
@beispiele_badQ = @lva.beispiele.flag_badquality.not_flag_delete.order(:datum).accessible_by(current_ability, :show)
|
||||
@beispiele_deleted = @lva.beispiele.flag_delete.order(:datum).accessible_by(current_ability, :show)
|
||||
@toolbar_elements =[]
|
||||
@toolbar_elements<<{:hicon=>'icon-pencil', :icon=>:pencil,:text =>I18n.t('common.manage'),:path => verwalten_lva_path(@lva)} if can? :verwalten, @lva
|
||||
@crawlobjects = @lva.crawlobjects.roots.accessible_by(current_ability)
|
||||
|
||||
Reference in New Issue
Block a user