forked from bofh/fetsite
Merge branch 'master' of https://github.com/fetsite/fetsite
This commit is contained in:
@@ -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 do
|
||||
@results = Sunspot.search Neuigkeit,Rubrik, Fetprofile, Thema, Themengruppe, Lva, Studium, Modul, Modulgruppe, Gremium do
|
||||
fulltext params['query']
|
||||
end
|
||||
@neuigkeiten=[];
|
||||
@@ -42,6 +42,11 @@ class HomeController < ApplicationController
|
||||
else
|
||||
# @neuigkeiten =Neuigkeit.search(params['query']).public
|
||||
end
|
||||
@res=[]
|
||||
@results.results.each do |r|
|
||||
@res << r if can?(:show,r)
|
||||
end
|
||||
|
||||
# @fetprofiles = Fetprofile.search(params['query'])
|
||||
@fetprofiles=[]
|
||||
# if can?(:showintern, Neuigkeit)
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
class MeetingsController < ApplicationController
|
||||
|
||||
|
||||
|
||||
|
||||
load_and_authorize_resource
|
||||
def index
|
||||
parent=params[:parent_type].constantize.find(params[:parent_id])
|
||||
|
||||
@@ -120,10 +120,13 @@ class Ability
|
||||
# Calendar
|
||||
|
||||
if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
|
||||
can :manage, Document
|
||||
can [:edit, :update,:new,:create], Document
|
||||
can :manage, Meeting
|
||||
can :manage, Meetingtyp
|
||||
end
|
||||
if user.has_role?("fetadmin")
|
||||
can :manage, Document
|
||||
end
|
||||
if loggedin
|
||||
end
|
||||
can :show, Document, :typ=>11
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
<% unless @results.nil? %>
|
||||
<ul class="unstyled linkbox-list">
|
||||
<% @results.results.each do |res| %>
|
||||
<% @res.each do |res| %>
|
||||
<% if can?(:show, res) %>
|
||||
<li>
|
||||
<%= link_to res, :class=>:linkbox do %>
|
||||
@@ -13,44 +13,4 @@
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<% unless @neuigkeiten.empty? %>
|
||||
<h2>Neuigkeiten</h2>
|
||||
<% end %>
|
||||
<% @neuigkeiten.each do |neuigkeit| %>
|
||||
<ul class="unstyled linkbox-list" style="max-width:70em">
|
||||
<li>
|
||||
<%= render neuigkeit %>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<% unless @fetprofiles.empty? %>
|
||||
<h2>Mitarbeiter</h2>
|
||||
<% end %>
|
||||
|
||||
<% @fetprofiles.each do |fetprofile| %>
|
||||
<ul class="unstyled linkbox-list" style="max-width:70em">
|
||||
<li>
|
||||
<%= render fetprofile %>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<% unless @fetprofiles.empty? %>
|
||||
<h2>Themen</h2>
|
||||
<% end %>
|
||||
|
||||
<ul class="unstyled content-list" style="max-width:70em">
|
||||
|
||||
<% @themen.each do |thema| %>
|
||||
<% if can? :show, thema %>
|
||||
<li><%= link_to thema.title,thema %>
|
||||
<div class="contentbox">
|
||||
<%= render :partial=>"themen/small", :object=>thema %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= @res %>
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
<li>
|
||||
<%= link_to 'Intern' , intern_home_index_path %>
|
||||
</li><% end %>
|
||||
|
||||
</ul>
|
||||
<ul class="nav nav-pills nav-stacked pull-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= image_tag("/flaggen/png/"+I18n.locale.to_s+".png") + " " +I18n.t('sprache',:scope=>'home')%><b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<%= render :partial=>"neuigkeiten/compact",:locals=> {:neuigkeit=> nlink} %>
|
||||
|
||||
<h2> <%= nlink.title %> </h2>
|
||||
<h2> <% nlink.title %> </h2>
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<h2><%= fa_icon("info-circle 2x")+" "+ nlink.title %></h2>
|
||||
<h2><%= fa_icon("info 2x")+" "+ nlink.title %></h2>
|
||||
<p><%= raw(nlink.text_first_words) %></p>
|
||||
|
||||
Reference in New Issue
Block a user