#0001238: Web report: sort references for places and media

svn: r9049
This commit is contained in:
Brian Matherly 2007-10-01 03:33:08 +00:00
parent d05b0e142e
commit 7a653663dc
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2007-09-30 Brian Matherly <brian@gramps-project.org>
* src/plugins/NarrativeWeb.py: 0001238: Web report: sort references for
places and media
2007-09-30 Brian Matherly <brian@gramps-project.org>
* src/ReportBase/_ReportDialog.py: 0001253: Calendar report crashes without
margins entered.

View File

@ -38,6 +38,7 @@ import locale
import shutil
import codecs
import tarfile
import operator
from gettext import gettext as _
from cStringIO import StringIO
from textwrap import TextWrapper
@ -565,9 +566,11 @@ class BasePage:
of.write('<div id="references">\n')
of.write('<h4>%s</h4>\n' % _('References'))
of.write('<table class="infolist">\n')
sortlist = sorted(handlelist, key=operator.itemgetter(1))
index = 1
for (path,name,gid) in handlelist:
for (path,name,gid) in sortlist:
of.write('<tr><td class="field">%d. ' % index)
self.person_link(of,path,name,gid)
of.write('</td></tr>\n')