Upgraded Source and Citation reference Quick Views to work with citations (actually, for citationtreeview, this is a source_or_citation reference, to avoid having to change the way listview calls the pop up menu items).

Also minimal changes to SimpleAccess and SimpleTable to support these references views.

svn: r18447
This commit is contained in:
Tim G L Lyons
2011-11-15 12:08:43 +00:00
parent a73075f881
commit 4a69d45fe6
10 changed files with 61 additions and 8 deletions

View File

@@ -41,6 +41,8 @@ def get_ref(db, objclass, handle):
ref = db.get_event_from_handle(handle)
elif objclass == 'Source':
ref = db.get_source_from_handle(handle)
elif objclass == 'Citation':
ref = db.get_citation_from_handle(handle)
elif objclass == 'Place':
ref = db.get_place_from_handle(handle)
elif objclass == 'Note':
@@ -83,6 +85,9 @@ run_person = lambda db, doc, obj: run(db, doc, obj, 'person', _("Person"))
run_family = lambda db, doc, obj: run(db, doc, obj, 'family', _("Family"))
run_event = lambda db, doc, obj: run(db, doc, obj, 'event', _("Event"))
run_source = lambda db, doc, obj: run(db, doc, obj, 'source', _("Source"))
run_citation = lambda db, doc, obj: run(db, doc, obj, 'citation', _("Citation"))
run_source_or_citation = lambda db, doc, obj: run(db, doc, obj,
'source or citation', _("Source or Citation"))
run_place = lambda db, doc, obj: run(db, doc, obj, 'place', _("Place"))
run_media = lambda db, doc, obj: run(db, doc, obj, 'media', _("Media"))
run_note = lambda db, doc, obj: run(db, doc, obj, 'note', _("Note"))

View File

@@ -202,6 +202,9 @@ refitems = [(CATEGORY_QR_PERSON, 'person', _("Person")),
(CATEGORY_QR_PLACE, 'place', _("Place")),
(CATEGORY_QR_MEDIA, 'media', _("Media")),
(CATEGORY_QR_NOTE, 'note', _("Note")),
(CATEGORY_QR_CITATION, 'citation', _("Citation")),
(CATEGORY_QR_SOURCE_OR_CITATION, 'source or citation',
_("Source or Citation"))
]
for (category, item, trans) in refitems: