5155: Complete Individual Report always tries to include images
svn: r18181
This commit is contained in:
parent
9dce82ac00
commit
08470002b5
@ -159,7 +159,8 @@ class IndivCompleteReport(Report):
|
|||||||
The option class carries its number, and the function
|
The option class carries its number, and the function
|
||||||
returning the list of filters.
|
returning the list of filters.
|
||||||
cites - Whether or not to include source information.
|
cites - Whether or not to include source information.
|
||||||
sort - Whether ot not to sort events into chronological order.
|
sort - Whether or not to sort events into chronological order.
|
||||||
|
images - Whether or not to include images.
|
||||||
sections - Which event groups should be given separate sections.
|
sections - Which event groups should be given separate sections.
|
||||||
name_format - Preferred format to display names
|
name_format - Preferred format to display names
|
||||||
"""
|
"""
|
||||||
@ -173,6 +174,8 @@ class IndivCompleteReport(Report):
|
|||||||
|
|
||||||
self.sort = menu.get_option_by_name('sort').get_value()
|
self.sort = menu.get_option_by_name('sort').get_value()
|
||||||
|
|
||||||
|
self.use_images = menu.get_option_by_name('images').get_value()
|
||||||
|
|
||||||
filter_option = options_class.menu.get_option_by_name('filter')
|
filter_option = options_class.menu.get_option_by_name('filter')
|
||||||
self.filter = filter_option.get_filter()
|
self.filter = filter_option.get_filter()
|
||||||
self.bibli = None
|
self.bibli = None
|
||||||
@ -550,7 +553,7 @@ class IndivCompleteReport(Report):
|
|||||||
self.doc.start_paragraph("IDS-Normal")
|
self.doc.start_paragraph("IDS-Normal")
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
if len(media_list) > 0:
|
if self.use_images and len(media_list) > 0:
|
||||||
media_handle = media_list[0].get_reference_handle()
|
media_handle = media_list[0].get_reference_handle()
|
||||||
media = self.database.get_object_from_handle(media_handle)
|
media = self.database.get_object_from_handle(media_handle)
|
||||||
mime_type = media.get_mime_type()
|
mime_type = media.get_mime_type()
|
||||||
@ -704,6 +707,9 @@ class IndivCompleteOptions(MenuReportOptions):
|
|||||||
"Endnotes section. Only works if Include sources is selected."))
|
"Endnotes section. Only works if Include sources is selected."))
|
||||||
menu.add_option(category_name, "incsrcnotes", incsrcnotes)
|
menu.add_option(category_name, "incsrcnotes", incsrcnotes)
|
||||||
|
|
||||||
|
images = BooleanOption(_("Include Photo/Images from Gallery"), True)
|
||||||
|
images.set_help(_("Whether to include images."))
|
||||||
|
menu.add_option(category_name, "images", images)
|
||||||
|
|
||||||
################################
|
################################
|
||||||
category_name = SECTION_CATEGORY
|
category_name = SECTION_CATEGORY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user