diff --git a/src/Simple/_SimpleAccess.py b/src/Simple/_SimpleAccess.py index 2cee37b92..508350d70 100644 --- a/src/Simple/_SimpleAccess.py +++ b/src/Simple/_SimpleAccess.py @@ -923,6 +923,9 @@ class SimpleAccess(object): return "%s: %s [%s]" % (_(object_class), self.title(obj), self.gid(obj)) + elif isinstance(obj, gen.lib.Citation): + return "%s: [%s]" % (_(object_class), + self.gid(obj)) elif isinstance(obj, gen.lib.Place): return "%s: %s [%s]" % (_(object_class), place_name(self.dbase, @@ -965,10 +968,10 @@ class SimpleAccess(object): return "%s and %s" % (mother_text, father_text) elif isinstance(obj, gen.lib.MediaObject): return obj.desc + elif isinstance(obj, gen.lib.Citation): + return obj.gramps_id elif isinstance(obj, gen.lib.Source): return self.title(obj) - elif isinstance(obj, gen.lib.Citation): - return self.page(obj) elif isinstance(obj, gen.lib.Place): return place_name(self.dbase, obj.handle) elif isinstance(obj, gen.lib.Repository): diff --git a/src/Simple/_SimpleTable.py b/src/Simple/_SimpleTable.py index 423323585..53adb7542 100644 --- a/src/Simple/_SimpleTable.py +++ b/src/Simple/_SimpleTable.py @@ -156,7 +156,7 @@ class SimpleTable(object): if (objclass == 'Filter' and handle[0] in ['Person', 'Family', 'Place', 'Event', 'Repository', 'Note', 'MediaObject', - 'Source']): + 'Citation', 'Source']): menu_item = gtk.MenuItem(_("See data not in Filter")) menu_item.connect("activate", lambda widget: self.show_not_in_filter(handle[0])) @@ -178,7 +178,7 @@ class SimpleTable(object): """ Handle events on tables. obj is a treeview """ - from gui.editors import (EditPerson, EditEvent, EditFamily, EditSource, + from gui.editors import (EditPerson, EditEvent, EditFamily, EditCitation, EditSource, EditPlace, EditRepository, EditNote, EditMedia) selection = obj.get_selection() store, paths = selection.get_selected_rows() @@ -219,6 +219,15 @@ class SimpleTable(object): return True # handled event except Errors.WindowActiveError: pass + elif objclass == 'Citation': + ref = self.access.dbase.get_citation_from_handle(handle) + if ref: + try: + EditCitation(self.simpledoc.doc.dbstate, + self.simpledoc.doc.uistate, [], ref) + return True # handled event + except Errors.WindowActiveError: + pass elif objclass == 'Source': ref = self.access.dbase.get_source_from_handle(handle) if ref: @@ -349,14 +358,14 @@ class SimpleTable(object): retval.append(self.access.describe(item)) if (self.__link_col == col or link is None): link = ('Family', item.handle) - elif isinstance(item, gen.lib.Source): - retval.append(self.access.describe(item)) - if (self.__link_col == col or link is None): - link = ('Source', item.handle) elif isinstance(item, gen.lib.Citation): retval.append(self.access.describe(item)) if (self.__link_col == col or link is None): link = ('Citation', item.handle) + elif isinstance(item, gen.lib.Source): + retval.append(self.access.describe(item)) + if (self.__link_col == col or link is None): + link = ('Source', item.handle) elif isinstance(item, gen.lib.Event): retval.append(self.access.describe(item)) if (self.__link_col == col or link is None): diff --git a/src/data/templates/view_person_detail.html b/src/data/templates/view_person_detail.html index 16d3ecc11..a681e3363 100644 --- a/src/data/templates/view_person_detail.html +++ b/src/data/templates/view_person_detail.html @@ -78,7 +78,7 @@