fix document searchable
This commit is contained in:
@@ -45,7 +45,6 @@ class DocumentsController < ApplicationController
|
||||
|
||||
ether=Document.ether
|
||||
author = Document.ether.author("fetsite_"+current_user.uid, :name => current_user.text)
|
||||
author = Document.ether.author("author_1")
|
||||
session[:ep_sessions]={} if session[:ep_sessions].nil?
|
||||
group=@document.ep_group
|
||||
|
||||
@@ -58,9 +57,9 @@ author = Document.ether.author("author_1")
|
||||
session[:ep_sessions][group.id] = sess.id
|
||||
# Set the EtherpadLite session cookie. This will automatically be picked up by the jQuery plugin's iframe.
|
||||
|
||||
cookies[:sessionID] = {:value => sess.id, :domain => "www.fet.at"}
|
||||
cookies[:sessionID] = {value: sess.id.to_s, domain: %w(.fet.at), expires: 1.hour.from_now}
|
||||
#cookies[:sessionID] = {:value => sess.id}
|
||||
cookies[:sessionID1]=sess.id
|
||||
cookies[:sessionID]= {value: sess.id, expires: 1.hour.from_now}
|
||||
# cookies[:sdf]=sess.id
|
||||
# pad=ether.pad(@document.etherpadkey)
|
||||
# redirect_to "http://www.fet.at/etherpad/p/"+@document.ep_pad.id
|
||||
|
||||
@@ -33,7 +33,7 @@ class HomeController < ApplicationController
|
||||
def search
|
||||
|
||||
unless params['query'].nil? || params['query'].empty?
|
||||
@results = Sunspot.search Neuigkeit,Rubrik, Fetprofile, Thema, Themengruppe, Lva, Studium, Modul, Modulgruppe, Gremium do
|
||||
@results = Sunspot.search Neuigkeit,Rubrik, Fetprofile, Thema, Themengruppe, Lva, Studium, Modul, Modulgruppe, Gremium, Document do
|
||||
fulltext params['query']
|
||||
end
|
||||
@neuigkeiten=[];
|
||||
|
||||
@@ -9,6 +9,13 @@ class Document < ActiveRecord::Base
|
||||
validate :parent, :presence=>true
|
||||
has_paper_trail
|
||||
TYPS = { 1=>"fet_docs", 10=>"protocol", 11=> "agenda"}
|
||||
def long_name
|
||||
if self.parent.class=="Meeting"
|
||||
"<b>"+self.parent.text+ "</b>"+ self.name
|
||||
else
|
||||
"<b>" + self.parent.title + ":</b>"+ self.name
|
||||
end
|
||||
end
|
||||
def self.new_divid_for(parent)
|
||||
"document_new_parent_" + parent.class.to_s + "_" + parent.id.to_s
|
||||
end
|
||||
@@ -41,7 +48,7 @@ class Document < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
def read_from_etherpad
|
||||
self.text=strip_control_chars(self.ep_pad.html)
|
||||
self.text=ApplicationController.helpers.strip_control_chars(self.ep_pad.html)
|
||||
|
||||
end
|
||||
def ep_pad
|
||||
|
||||
2
app/views/documents/_nlink.html.erb
Normal file
2
app/views/documents/_nlink.html.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
<%= raw(nlink.long_name) %>
|
||||
|
||||
Reference in New Issue
Block a user