Fixed class SourcePage where information would not be created if 'Suppress Gramps IDs' was selected.
svn: r15124
This commit is contained in:
parent
38eff3382c
commit
e2f6a57f74
@ -28,6 +28,7 @@ gdir_PYTHON = \
|
|||||||
Bookmarks.py\
|
Bookmarks.py\
|
||||||
config.py\
|
config.py\
|
||||||
const.py\
|
const.py\
|
||||||
|
constfunc.py\
|
||||||
DateEdit.py\
|
DateEdit.py\
|
||||||
Date.py\
|
Date.py\
|
||||||
DbState.py\
|
DbState.py\
|
||||||
|
@ -3100,11 +3100,11 @@ class SourceListPage(BasePage):
|
|||||||
|
|
||||||
class SourcePage(BasePage):
|
class SourcePage(BasePage):
|
||||||
|
|
||||||
def __init__(self, report, title, handle, src_list):
|
def __init__(self, report, title, handle, src_list, gid = None):
|
||||||
db = report.database
|
db = report.database
|
||||||
|
|
||||||
source = db.get_source_from_handle(handle)
|
source = db.get_source_from_handle(handle)
|
||||||
BasePage.__init__(self, report, title, source.gramps_id)
|
BasePage.__init__(self, report, title, gid)
|
||||||
|
|
||||||
of = self.report.create_file(source.get_handle(), "src")
|
of = self.report.create_file(source.get_handle(), "src")
|
||||||
self.up = True
|
self.up = True
|
||||||
@ -3130,13 +3130,15 @@ class SourcePage(BasePage):
|
|||||||
table += tbody
|
table += tbody
|
||||||
|
|
||||||
grampsid = None
|
grampsid = None
|
||||||
if not self.noid:
|
if not self.noid and gid:
|
||||||
grampsid = source.gramps_id
|
grampsid = gid
|
||||||
|
|
||||||
for (label, val) in [(GRAMPSID, grampsid),
|
for (label, val) in [
|
||||||
|
(GRAMPSID, grampsid),
|
||||||
(_("Author"), source.author),
|
(_("Author"), source.author),
|
||||||
(_("Publication information"), source.pubinfo),
|
(_("Publication information"), source.pubinfo),
|
||||||
(_("Abbreviation"), source.abbrev) ]:
|
(_("Abbreviation"), source.abbrev) ]:
|
||||||
|
|
||||||
if val:
|
if val:
|
||||||
trow = Html("tr") + (
|
trow = Html("tr") + (
|
||||||
Html("td", label, class_ = "ColumnAttribute"),
|
Html("td", label, class_ = "ColumnAttribute"),
|
||||||
@ -3150,15 +3152,14 @@ class SourcePage(BasePage):
|
|||||||
section += sourcemedia
|
section += sourcemedia
|
||||||
|
|
||||||
# additional notes
|
# additional notes
|
||||||
notelist = source.get_note_list()
|
notelist = self.display_note_list( source.get_note_list() )
|
||||||
if notelist:
|
if notelist is not None:
|
||||||
notelist = self.display_note_list(notelist)
|
|
||||||
section += notelist
|
section += notelist
|
||||||
|
|
||||||
# references
|
# references
|
||||||
src_references = self.display_references(src_list[source.handle])
|
references = self.display_references(src_list[source.handle])
|
||||||
if src_references is not None:
|
if references is not None:
|
||||||
section += src_references
|
section += references
|
||||||
|
|
||||||
# add clearline for proper styling
|
# add clearline for proper styling
|
||||||
# add footer section
|
# add footer section
|
||||||
|
Loading…
Reference in New Issue
Block a user