1:
2: def formatBibliography(self,found):
3: ret=""
4: if found.id_institutsbibliographie and (not found.id_institutsbibliographie==''):
5: ret+=formatBiblHelp(self,found,table='institutsbiblio',id=found.id_institutsbibliographie)
6: else:
7: ret+=formatBiblHelp(self,found,table='bibliography',id=found.id_gen_bib)
8: return ret
9:
10: def getBib(value):
11: if value:
12: return value
13: else:
14: return ""
15: def formatBiblHelp(self,found,table,id,foundIB=None):
16: ret=""
17: if not foundIB:
18: try:
19: foundIB=self.ZSQLInlineSearch(_table=table,id=id)[0]
20:
21: except:
22: return ret
23:
24: if foundIB.reference_type.lower()=='journal article':
25:
26: ret+=getBib(foundIB.author_semi_colon)+". ""+getBib(foundIB.title)+". " "+"<i>%s</i>"%getBib(foundIB.secondary_title)+" "+getBib(foundIB.volume)+" ("
27: if not self.ZSQLisEmpty(foundIB.number):
28: ret+=foundIB.number+" "
29: ret+=foundIB.year+")"
30: if foundIB.pages and (not foundIB.pages)=='':
31: ret+=": "+foundIB.pages+"."
32:
33: elif foundIB.reference_type.lower()=='edited book':
34: ret+=foundIB.author_semi_colon+" (Editor/s). <i>"+foundIB.title+"</i>."
35: if foundIB.place_published and (not foundIB.place_published==''):
36: ret+=foundIB.place_published+": "
37: if foundIB.publisher and (not foundIB.publisher==''):
38: ret+=foundIB.publisher+", "
39: ret+=foundIB.year+"."
40:
41: elif foundIB.reference_type.lower()=='book section':
42: ret+=getBib(foundIB.author_semi_colon)+". ""+getBib(foundIB.title)+"." In <i>"+getBib(foundIB.secondary_title)+"</i>"
43: if (foundIB.secondary_author_semi_colon) and (not foundIB.secondary_author_semi_colon==''):
44: ret+=", eds.: "+foundIB.secondary_author_semi_colon
45: ret+=". "
46: if foundIB.pages and (not foundIB.pages)=='':
47: ret+=foundIB.pages+". "
48: if foundIB.place_published and (not foundIB.place_published==''):
49: ret+=foundIB.place_published+": "
50: if foundIB.publisher and (not foundIB.publisher==''):
51: ret+=foundIB.publisher+", "
52: ret+=foundIB.year+"."
53: elif foundIB.reference_type.lower()=='book':
54: ret+=foundIB.author_semi_colon+". <i>"+foundIB.title+"</i>. "
55: if foundIB.pages and (not foundIB.pages==''):
56: ret+=foundIB.pages+". "
57: if foundIB.place_published and (not foundIB.place_published==''):
58: ret+=foundIB.place_published+": "
59: if foundIB.publisher and (not foundIB.publisher==''):
60: ret+=foundIB.publisher+", "
61: ret+=foundIB.year+"."
62:
63: elif foundIB.reference_type.lower()=='newspaper article':
64: ret+=foundIB.author_semi_colon+". ""+foundIB.title+"." <i>"+foundIB.secondary_title+"</i>, "
65: ret+=foundIB.date+"."+foundIB.year+","
66: if foundIB.pages and (not foundIB.pages==''):
67: ret+=foundIB.pages+". "
68:
69:
70:
71:
72: return ret
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>