Cleanup in Narrative Web report.
svn: r10146
This commit is contained in:
		@@ -1,3 +1,7 @@
 | 
			
		||||
2008-02-27 Brian Matherly <brian@gramps-project.org>
 | 
			
		||||
	* src/plugins/NarrativeWeb.py:
 | 
			
		||||
	Cleanup.
 | 
			
		||||
 | 
			
		||||
2008-02-28 Jim Sack <jgsack@san.rr.com>
 | 
			
		||||
	* src/GrampsDbUtils/_GedcomParse.py minor: remove redundant
 | 
			
		||||
	counting of errors dating to r8912 patch, I think. I don't believe
 | 
			
		||||
 
 | 
			
		||||
@@ -528,15 +528,15 @@ class BasePage:
 | 
			
		||||
        of.write('</table>\n')
 | 
			
		||||
        of.write('</div>\n')
 | 
			
		||||
 | 
			
		||||
    def display_source_refs(self, of, db):
 | 
			
		||||
        if self.bibli.get_citation_count() == 0:
 | 
			
		||||
    def display_source_refs(self, of, db, bibli):
 | 
			
		||||
        if bibli.get_citation_count() == 0:
 | 
			
		||||
            return
 | 
			
		||||
        of.write('<div id="sourcerefs">\n')
 | 
			
		||||
        of.write('<h4>%s</h4>\n' % _('Source References'))
 | 
			
		||||
        of.write('<table class="infolist">\n')
 | 
			
		||||
 | 
			
		||||
        cindex = 0
 | 
			
		||||
        for citation in self.bibli.get_citation_list():
 | 
			
		||||
        for citation in bibli.get_citation_list():
 | 
			
		||||
            cindex += 1
 | 
			
		||||
            # Add this source to the global list of sources to be displayed
 | 
			
		||||
            # on each source page.
 | 
			
		||||
@@ -549,7 +549,7 @@ class BasePage:
 | 
			
		||||
                self.src_list[shandle] = [lnk]
 | 
			
		||||
                
 | 
			
		||||
            # Add this source and its references to the page
 | 
			
		||||
            source = self.db.get_source_from_handle(shandle)
 | 
			
		||||
            source = db.get_source_from_handle(shandle)
 | 
			
		||||
            title = source.get_title()
 | 
			
		||||
            of.write('<tr><td class="field">')
 | 
			
		||||
            of.write('<a name="sref%d"></a>%d.</td>' % (cindex, cindex))
 | 
			
		||||
@@ -571,7 +571,7 @@ class BasePage:
 | 
			
		||||
                        tmp.append("%s: %s" % (label, data))
 | 
			
		||||
                notelist = sref.get_note_list()
 | 
			
		||||
                for notehandle in notelist:
 | 
			
		||||
                    note = self.db.get_note_from_handle(notehandle)
 | 
			
		||||
                    note = db.get_note_from_handle(notehandle)
 | 
			
		||||
                    tmp.append("%s: %s" % (_('Text'), note.get(True)))
 | 
			
		||||
                if len(tmp) > 0:
 | 
			
		||||
                    of.write('\t<tr><td></td>')
 | 
			
		||||
@@ -1217,7 +1217,7 @@ class MediaPage(BasePage):
 | 
			
		||||
        self.bibli = Bibliography()
 | 
			
		||||
        for sref in photo.get_source_references():
 | 
			
		||||
            self.bibli.add_reference(sref)
 | 
			
		||||
        self.display_source_refs(of, db)
 | 
			
		||||
        self.display_source_refs(of, db, self.bibli)
 | 
			
		||||
 | 
			
		||||
    def display_attr_list(self, of,attrlist=None):
 | 
			
		||||
        if not attrlist:
 | 
			
		||||
@@ -1883,7 +1883,7 @@ class IndividualPage(BasePage):
 | 
			
		||||
            self.bibli.add_reference(sref)
 | 
			
		||||
        if self.bibli.get_citation_count() == 0:
 | 
			
		||||
            return
 | 
			
		||||
        self.display_source_refs(of, self.db)
 | 
			
		||||
        self.display_source_refs(of, self.db, self.bibli)
 | 
			
		||||
 | 
			
		||||
    def display_ind_pedigree(self, of):
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user