changed infoscreen layout

This commit is contained in:
peter
2017-05-31 12:35:30 +02:00
parent 5660cd7748
commit 14e563ef95
2 changed files with 30 additions and 20 deletions

View File

@@ -8,7 +8,7 @@ class HomeController < ApplicationController
params[:month]= Date.today.month if params[:month].nil?
params[:year]= Date.today.year if params[:year].nil?
@calentries= (@rubriken.map {|r| r.calendar}).collect(&:calentries).flatten.select {|c| c.object !=nil}
@starttopic= @themen = Thema.where(:id=>t).first
@@ -21,7 +21,7 @@ class HomeController < ApplicationController
end
def infoscreen
authorize! :infoscreen, User
#authorize! :infoscreen, User #disabled for testing, pet
@neuigkeiten = Neuigkeit.accessible_by(current_ability, :show).where(flag_infoscreen: true)
render layout: false
end
@@ -29,7 +29,7 @@ class HomeController < ApplicationController
t=YAML.load_file("#{::Rails.root.to_s}/config/contact_topic.yml")
@themen = Thema.where(:id=>t)
end
def treeview
def treeview
authorize! :doadmin, User
@themengruppen = Themengruppe.order(:priority).reverse
@themengruppen += Themengruppe.intern.order(:priority).reverse
@@ -54,7 +54,7 @@ class HomeController < ApplicationController
else
@logs = `tail -n #{lines} log/development.log | grep -v 'actionpack\\|railties\\|activesupport\\|::Translation'`
end
end
def startdev
render 'setup_fetsite_dev'
@@ -64,7 +64,7 @@ class HomeController < ApplicationController
end
def search
unless params['query'].nil? || params['query'].empty?
@results = Sunspot.search Neuigkeit,Rubrik, Fetprofile, Thema, Themengruppe, Lva, Studium, Modul, Modulgruppe, Gremium, Document do
fulltext params['query']
@@ -88,7 +88,7 @@ class HomeController < ApplicationController
# @themen=Thema.search(params['query']).public
# end
@themen=[]
else
@neuigkeiten=[]
@fetprofiles=[]
@@ -110,10 +110,10 @@ class HomeController < ApplicationController
unless params[:themen].nil?
t=([t].flatten+params[:themen]).uniq
end
unless params[:rmthema].nil?
unless params[:rmthema].nil?
t=t-[params[:rmthema]]
end
File.open("config/contact_topic.yml",'w'){|f| f.write(t.to_yaml)}
File.open("config/contact_topic.yml",'w'){|f| f.write(t.to_yaml)}
redirect_to admin_home_index_path
end