def _write_event(self, event_handle): """ Generate a table row for this event record """ event = self.database.get_event_from_handle(event_handle) self.doc.start_row() self.doc.start_cell('TR-TableCell') self.doc.start_paragraph('TR-Normal') self.doc.write_text(event.get_gramps_id()) self.doc.end_paragraph() self.doc.end_cell() self.doc.start_cell('TR-TableCell') self.doc.start_paragraph('TR-Normal') date = gramps.gen.datehandler.get_date(event) if date: self.doc.write_text(date) else: self.doc.write_text(_("date: ") + _PLACEHOLDER) self.doc.end_paragraph() self.doc.end_cell() self.doc.start_cell('TR-TableCell') self.doc.start_paragraph('TR-Normal') place_handle = event.get_place_handle() place = ReportUtils.place_name(self.database, place_handle) if place: self.doc.write_text(place) else: self.doc.write_text(_("place: ") + _PLACEHOLDER) self.doc.end_paragraph() self.doc.end_cell() self.doc.start_cell('TR-TableCell') self.doc.start_paragraph('TR-Normal') descr = event.get_description() if descr: self.doc.write_text(descr) self.doc.end_paragraph() self.doc.end_cell() self.doc.end_row()
def _write_event(self, event_handle): """ Generate a table row for this event record """ event = self.database.get_event_from_handle(event_handle) self.doc.start_row() self.doc.start_cell("TR-TableCell") self.doc.start_paragraph("TR-Normal") self.doc.write_text(event.get_gramps_id()) self.doc.end_paragraph() self.doc.end_cell() self.doc.start_cell("TR-TableCell") self.doc.start_paragraph("TR-Normal") date = gramps.gen.datehandler.get_date(event) if date: self.doc.write_text(date) else: self.doc.write_text(_("date: ") + _PLACEHOLDER) self.doc.end_paragraph() self.doc.end_cell() self.doc.start_cell("TR-TableCell") self.doc.start_paragraph("TR-Normal") place_handle = event.get_place_handle() place = ReportUtils.place_name(self.database, place_handle) if place: self.doc.write_text(place) else: self.doc.write_text(_("place: ") + _PLACEHOLDER) self.doc.end_paragraph() self.doc.end_cell() self.doc.start_cell("TR-TableCell") self.doc.start_paragraph("TR-Normal") descr = event.get_description() if descr: self.doc.write_text(descr) self.doc.end_paragraph() self.doc.end_cell() self.doc.end_row()
def __get_place_keyname(dbase, handle): """ ... """ return utils.place_name(dbase, handle)