forked from bofh/fetsite
merge
This commit is contained in:
@@ -114,7 +114,6 @@ class Ability
|
||||
unless user.has_role?("fetadmin")
|
||||
cannot :delete, Rubrik
|
||||
cannot :delete, Neuigkeit
|
||||
|
||||
end
|
||||
# Calendar
|
||||
if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
|
||||
@@ -130,8 +129,6 @@ class Ability
|
||||
can [:show], Calentry
|
||||
|
||||
if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
|
||||
|
||||
|
||||
can [:show,:index], Calendar
|
||||
can [:edit, :update,:new,:create,:verwalten], Calendar
|
||||
can [:edit, :update,:new,:create,:verwalten,:delete], Calentry
|
||||
|
||||
@@ -30,8 +30,6 @@ include Rails.application.routes.url_helpers
|
||||
text :text
|
||||
text :title, :boost=>4.0
|
||||
end
|
||||
|
||||
|
||||
scope :outdated, -> {includes(:translations).where("thema_translations.updated_at<?",2.month.ago).where("thema_translations.locale"=>I18n.t.locale)
|
||||
}
|
||||
translates :title,:text, :versioning =>true, :fallbacks_for_empty_translations => true
|
||||
@@ -50,7 +48,6 @@ scope :outdated, -> {includes(:translations).where("thema_translations.updated_a
|
||||
"...."
|
||||
else
|
||||
words[0..100].join(" ")+ " ..." unless words.nil?
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -58,8 +55,6 @@ scope :outdated, -> {includes(:translations).where("thema_translations.updated_a
|
||||
full_url= URI.parse(root_url(:host=>host))
|
||||
self.text.gsub!(/src="[\.\/]*uploads\/attachment\/datei\/(\d+)\/thumb_big[^"]*"/){|s| full_url.path=Attachment.find($1.to_i).datei.thumb_big.url; 'src="'+full_url.to_s+'"'}
|
||||
self.text.gsub!(/src="[\.\/^"]*uploads\/attachment\/datei\/(\d+)\/[^"]*"/){|s| full_url.path=Attachment.find($1.to_i).datei.url; 'src="'+full_url.to_s+'"'}
|
||||
|
||||
self.text.gsub!(/href="[^"]*themen\/(\d+)[^"]*"/){|s| full_url.path=thema_path(Thema.find($1.to_i)); 'href="'+full_url.to_s+'"'}
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user