small fixes

This commit is contained in:
Andreas Stephanides
2013-02-28 09:57:54 +01:00
parent 748497ce98
commit 0de57e08a9
4 changed files with 13 additions and 9 deletions

View File

@@ -31,15 +31,15 @@ class Ability
# Rechteverwaltung f<>r Studien Modul # Rechteverwaltung f<>r Studien Modul
can :read, Modulgruppe can :read, Modulgruppe
if user.has_role? "newsadmin" can :manage, Modulgruppe
can :manage, Modulgruppe
can :addmoderator, Modulgruppe
can :addmoderator, Rubrik
end
# Rechteverwaltung fuer Neuigkeiten # Rechteverwaltung fuer Neuigkeiten
can :write, Neuigkeit if user.has_role?("newsmoderator", Neuigkeit.rubrik) if user.has_role? "newsadmin"
can :addmoderator, Rubrik
end
# can :write, Neuigkeit if user.has_role?("newsmoderator", Neuigkeit.rubrik)
end end
end end

View File

@@ -1,5 +1,6 @@
class Neuigkeit < ActiveRecord::Base class Neuigkeit < ActiveRecord::Base
attr_accessible :datum, :text, :title attr_accessible :datum, :text, :title
belongs_to :author, :class_name =>'User' belongs_to :author, :class_name =>'User'
belongs_to :rubrik, :class_name =>'Rubrik' belongs_to :rubrik, :class_name =>'Rubrik', :foreign_key => "rubrik_id"
end end

View File

@@ -1,5 +1,5 @@
<div style="border: solid 1px; padding:2px;margin-top:5px;"><p> <div style="border: solid 1px; padding:2px;margin-top:5px;"><p>
<b><%= link_to "Modul "+ modul.name , modul_path(modul) %> </b> <b><% if !modul.name.nil? %><%= link_to "Modul "+ modul.name , modul_path(modul) %> <%end%></b>
</p> </p>
<p > <p >
<%= raw(modul.desc) %> <%= raw(modul.desc) %>

View File

@@ -53,3 +53,6 @@ Versionsverfolgung
Tiny MCE Tiny MCE
http://rubydoc.info/gems/tinymce-rails/3.5.8/frames http://rubydoc.info/gems/tinymce-rails/3.5.8/frames
integrieren integrieren
Gollum WIKI Controller schreiben