meetingtyp management

This commit is contained in:
Andreas Stephanides
2015-02-09 15:38:21 +01:00
parent 6c39c40403
commit f1a149908d
15 changed files with 148 additions and 17 deletions

View File

@@ -50,26 +50,32 @@ class Meeting < ActiveRecord::Base
end
def create_protocol
if self.protocol.nil?
d=Document.new
d.typ=10
d=Document.new
d.typ=10
d.name="Protokoll"
d.save
self.protocol=d
end
unless self.meetingtyp.protocol.nil?
d.text=self.meetingtyp.protocol.text
end
d.save
self.protocol=d
end
end
def create_calentry
if self.calentry.nil?
ce =Calentry.new
ce.typ=2
self.calentry=ce
end
end
ce =Calentry.new
ce.typ=2
self.calentry=ce
end
end
def create_agenda
if self.agenda.nil?
d=Document.new
d.typ=11
d.name="Agenda"
unless self.meetingtyp.agenda.nil?
d.text=self.meetingtyp.agenda.text
end
d.save
self.agenda=d
end