Annotation of MPIWGWeb/bibliography.py, revision 1.1

1.1     ! dwinter     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):
        !            16:     ret=""
        !            17:     try:
        !            18:         foundIB=self.ZSQLInlineSearch(_table=table,id=id)[0]
        !            19: 
        !            20:     except:
        !            21:         return ret
        !            22:     
        !            23:     if foundIB.reference_type.lower()=='journal article':
        !            24:         
        !            25:         ret+=getBib(foundIB.author_semi_colon)+". &quot;"+getBib(foundIB.title)+". &quot; "+"<i>%s</i>"%getBib(foundIB.secondary_title)+" "+getBib(foundIB.volume)+" ("
        !            26:         if not self.ZSQLisEmpty(foundIB.number):
        !            27:             ret+=foundIB.number+"&nbsp;"
        !            28:         ret+=foundIB.year+")"
        !            29:         if not foundIB.pages=='':
        !            30:             ret+=": "+foundIB.pages+"."
        !            31: 
        !            32:     elif foundIB.reference_type.lower()=='edited book':
        !            33:         ret+=foundIB.author_semi_colon+" (Editor/s). <i>"+foundIB.title+"</i>."
        !            34:         if not foundIB.place_published=='':
        !            35:             ret+=foundIB.place_published+": "
        !            36:         if not foundIB.publisher=='':
        !            37:             ret+=foundIB.publisher+", "
        !            38:         ret+=foundIB.year+"."
        !            39: 
        !            40:     elif foundIB.reference_type.lower()=='book section':
        !            41:         ret+=foundIB.author_semi_colon+". &quot;"+foundIB.title+".&quot; In <i>"+foundIB.secondary_title+"</i>"
        !            42:         if not foundIB.secondary_author_semi_colon=='':
        !            43:             ret+=", eds.: "+foundIB.secondary_author_semi_colon
        !            44:         ret+=". "
        !            45:         if not foundIB.pages=='':
        !            46:             ret+=foundIB.pages+". "
        !            47:         if not foundIB.place_published=='':
        !            48:             ret+=foundIB.place_published+": "
        !            49:         if not foundIB.publisher=='':
        !            50:             ret+=foundIB.publisher+", "
        !            51:         ret+=foundIB.year+"."
        !            52:     elif foundIB.reference_type.lower()=='book':
        !            53:         ret+=foundIB.author_semi_colon+". <i>"+foundIB.title+"</i>. "
        !            54:         if not foundIB.pages=='':
        !            55:             ret+=foundIB.pages+". "
        !            56:         if not foundIB.place_published=='':
        !            57:             ret+=foundIB.place_published+": "
        !            58:         if not foundIB.publisher=='':
        !            59:             ret+=foundIB.publisher+", "
        !            60:         ret+=foundIB.year+"."
        !            61: 
        !            62:     elif foundIB.reference_type.lower()=='newspaper article':
        !            63:         ret+=foundIB.author_semi_colon+". &quot;"+foundIB.title+".&quot; <i>"+foundIB.secondary_title+"</i>, "
        !            64:         ret+=foundIB.date+"."+foundIB.year+","
        !            65:         if not foundIB.pages=='':
        !            66:             ret+=foundIB.pages+". "
        !            67: 
        !            68: 
        !            69:             
        !            70:             
        !            71:     return ret

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>