--- MPIWGWeb/bibliography.py 2005/10/11 13:14:01 1.7.2.2
+++ MPIWGWeb/bibliography.py 2009/02/18 15:42:00 1.7.2.11
@@ -18,34 +18,40 @@ def getBib(value):
return value
else:
return ""
+
def formatBiblHelp(self,found,table,id,foundIB=None):
ret=""
if not foundIB:
try:
- foundIB=self.ZSQLInlineSearch(_table=table,id=id)[0]
+ foundIB=self.ZSQLInlineSearch(_table=table,id=id,_op_id="eq")[0]
except:
return ret
if foundIB.reference_type.lower()=='journal article':
-
ret+=getBib(CRListToSemicolon(foundIB.author))+". ""+getBib(foundIB.title)+". " "+"%s"%getBib(foundIB.secondary_title)+" "+getBib(foundIB.volume)+" ("
if not self.ZSQLisEmpty(foundIB.number):
ret+=foundIB.number+" "
- ret+=foundIB.year+")"
+
+ if foundIB.year:
+ ret+=getattr(foundIB,'year','')
+ ret+=")"
if foundIB.pages and (not foundIB.pages)=='':
ret+=": "+foundIB.pages+"."
elif foundIB.reference_type.lower()=='edited book':
- ret+=CRListToSemicolon(foundIB.author)+" (Editor/s). "+foundIB.title+"."
+ if foundIB.author:
+ ret+=CRListToSemicolon(foundIB.author)+" (Editor/s). "
+ if foundIB.title and (not foundIB.title==""):
+ ret+=""+foundIB.title+". "
if foundIB.place_published and (not foundIB.place_published==''):
ret+=foundIB.place_published+": "
if foundIB.publisher and (not foundIB.publisher==''):
ret+=foundIB.publisher+", "
- ret+=foundIB.year+"."
+ ret+=getBib(foundIB.year)+"."
- elif foundIB.reference_type.lower()=='book section':
- ret+=getBib(CRListToSemicolon(foundIB.author))+". ""+getBib(foundIB.title)+"." In "+getBib(foundIB.secondary_title)+""
+ elif foundIB.reference_type.lower()=='book section' or foundIB.reference_type.lower()=='in book':
+ ret+=getBib(CRListToSemicolon(foundIB.author))+". ""+getBib(foundIB.title)+"." In: "+getBib(foundIB.secondary_title)+""
if (CRListToSemicolon(foundIB.secondary_author)) and (not CRListToSemicolon(foundIB.secondary_author)==''):
ret+=", eds.: "+CRListToSemicolon(foundIB.secondary_author)
ret+=". "
@@ -55,11 +61,13 @@ def formatBiblHelp(self,found,table,id,f
ret+=foundIB.place_published+": "
if foundIB.publisher and (not foundIB.publisher==''):
ret+=foundIB.publisher+", "
- ret+=foundIB.year+"."
+ ret+=getBib(foundIB.year)+"."
+
+
elif foundIB.reference_type.lower()=='book':
ret+=getBib(CRListToSemicolon(foundIB.author))+". "+getBib(foundIB.title)+". "
- if foundIB.pages and (not foundIB.pages==''):
- ret+=foundIB.pages+". "
+# if foundIB.pages and (not foundIB.pages==''):
+#% ret+=foundIB.pages+". "
if foundIB.place_published and (not foundIB.place_published==''):
ret+=foundIB.place_published+": "
if foundIB.publisher and (not foundIB.publisher==''):
@@ -71,6 +79,15 @@ def formatBiblHelp(self,found,table,id,f
ret+=foundIB.date+"."+foundIB.year+","
if foundIB.pages and (not foundIB.pages==''):
ret+=foundIB.pages+". "
+ elif foundIB.reference_type.lower()=='magazine article':
+ ret+=CRListToSemicolon(foundIB.author)+". ""+foundIB.title+"." "+foundIB.secondary_title+", "
+ if foundIB.date:
+ ret+=foundIB.date+"."
+ if foundIB.year:
+ ret+=foundIB.year+","
+ if foundIB.pages and (not foundIB.pages==''):
+ ret+=foundIB.pages+". "
+