ActiveRecord::Base
# File app/models/meeting.rb, line 120 def agenda_text unless self.agenda.nil? t= self.agenda.text else t= "" end t end
# File app/models/meeting.rb, line 84 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 end
# File app/models/meeting.rb, line 38 def create_announcement(user) if self.neuigkeit.nil? n = Neuigkeit.new n.title=self.text n.text ="Agenda im Anhang" n.rubrik = self.meetingtyp.rubrik n.author=user n.datum=Date.today n.save self.neuigkeit= n end end
# File app/models/meeting.rb, line 77 def create_calentry if self.calentry.nil? ce =Calentry.new ce.typ=2 self.calentry=ce end end
# File app/models/meeting.rb, line 64 def create_protocol if self.protocol.nil? d=Document.new d.typ=10 d.name="Protokoll" unless self.meetingtyp.protocol.nil? d.text=self.meetingtyp.protocol.text end d.save self.protocol=d end end
# File app/models/meeting.rb, line 109 def divid "meeting_"+self.id.to_s end
# File app/models/meeting.rb, line 57 def fix_calentry self.calentry.object=self unless self.calentry.nil? self.calentry.calendar = self.meetingtyp.rubrik.calendar end
# File app/models/meeting.rb, line 128 def protocol_text unless self.protocol.nil? t= self.protocol.text else t= "" end t end
# File app/models/meeting.rb, line 61 def public? ! (self.intern) end
# File app/models/meeting.rb, line 26 def text unless self.meetingtyp.try(:name).to_s.empty? t = self.meetingtyp.name.to_s+", " else t="" t = parent.title.to_s + ", " if self.name.empty? end t= t+ self.name.to_s # t = t + " " + I18n.l(self.calentry.start) unless self.calentry.nil? t = t +" "+ I18n.t("date.am")+" "+ self.calentry.text unless self.calentry.nil? t end
# File app/models/meeting.rb, line 51 def update_announcement n=self.neuigkeit n.title=self.text n.save end
# File app/models/meeting.rb, line 113 def update_time_from_protocol st= /Beginn[\s:]*([^<>]*)/.match(self.protocol.text)[1].to_s st= /Anfang[\s:]*([^<>]*)/.match(self.protocol.text)[1].to_s if st.empty? self.calentry.start=(self.calentry.start.to_date.to_s + " " +st).to_datetime unless st.empty? st= /Ende[\s:]*([^<>]*)/.match(self.protocol.text)[1].to_s self.calentry.ende=(self.calentry.ende.to_date.to_s + " " +st).to_datetime unless st.empty? end
Generated with the Darkfish Rdoc Generator 2.