diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb
index 43d2835..69829fe 100644
--- a/app/controllers/documents_controller.rb
+++ b/app/controllers/documents_controller.rb
@@ -156,7 +156,8 @@ class DocumentsController < ApplicationController
unless params['query'].nil? || params['query'].empty?
@results = Document.search do
fulltext params['query'] do
- highlight :name, :text
+ fields :name, :text, :meeting
+ highlight :text
end
end
@res=[]
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb
index 058b5f0..17fa2ca 100755
--- a/app/controllers/home_controller.rb
+++ b/app/controllers/home_controller.rb
@@ -26,7 +26,9 @@ class HomeController < ApplicationController
end
def treeview
authorize! :doadmin, User
- @themengruppen = Themengruppe.intern.order(:priority).reverse
+ @themengruppen = Themengruppe.order(:priority).reverse
+ @themengruppen += Themengruppe.intern.order(:priority).reverse
+
end
def intern
authorize! :seeintern, User
diff --git a/app/views/documents/_search_results.html.erb b/app/views/documents/_search_results.html.erb
index 8eb4055..9dc371f 100644
--- a/app/views/documents/_search_results.html.erb
+++ b/app/views/documents/_search_results.html.erb
@@ -1,13 +1,18 @@
<% unless search_results.nil? %>
<% search_results.each_hit_with_result do |hit,result| %>
- - <%= result.name %>
+
- <%= link_to result.parent.title+": " + result.name, document_path(result) %>
<% hit.highlights(:name).each do |hlgt| %>
- <%= hlgt.format{|word|"#{word}" } %>
+ <%= raw(hlgt.format{|word|"#{word}" } ) %>
<% end %>
+ <% %>
<% hit.highlights(:text).each do |hlgt| %>
<%= "text:" + raw(hlgt.format {|word| "*#{word}*" })%>
<% end %>
+ <% hit.highlights(:meeting).each do |hlgt| %>
+ <%= "text:" + raw(hlgt.format {|word| "*#{word}*" })%>
+ <% end %>
+
<% end %>
diff --git a/app/views/home/treeview.html.erb b/app/views/home/treeview.html.erb
index 4fccf31..1e6888b 100644
--- a/app/views/home/treeview.html.erb
+++ b/app/views/home/treeview.html.erb
@@ -1,4 +1,4 @@
-Intern
+
<% @themengruppen.each do |tg| %>
- <%= tg.title %>
diff --git a/app/views/themes/blue2/home/intern.html.erb b/app/views/themes/blue2/home/intern.html.erb
index fb6bbfd..2f5aab7 100644
--- a/app/views/themes/blue2/home/intern.html.erb
+++ b/app/views/themes/blue2/home/intern.html.erb
@@ -9,8 +9,11 @@
-
<%= link_to "Admin" , admin_home_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
+ -
+ <%= link_to "Treeview" , treeview_home_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
+
- Suche
+
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" %>
<% f.actions do %>