Logo Search packages:      
Sourcecode: zope-cmfbibliographyat version File versions  Download package

def CMFBibliographyAT::content::base::BaseEntry::citationLabel (   self,
  join_two = 'and',
  et_al = 'et al.' 
)

a short label for inline citations like
"Ritz, 1995" or "Ritz and Herz, 2004" or
"Ritz et al., 2005"

Definition at line 433 of file base.py.

00433                                                            :
        """
        a short label for inline citations like
        "Ritz, 1995" or "Ritz and Herz, 2004" or
        "Ritz et al., 2005"
        """
        authors = self.getAuthorList()
        nofa = len(authors)
        year = self.getField('publication_year').get(self)

        if nofa == 0:
            return "Anonymous, %s" % year

        if nofa == 1:
            return "%s, %s" % (authors[0].get('lastname', ''),
                               year)        
        if nofa == 2:
            return "%s %s %s, %s" % (authors[0].get('lastname', ''),
                                     join_two,
                                     authors[1].get('lastname', ''),
                                     year)
        return "%s %s, %s" % (authors[0].get('lastname', ''),
                              et_al,
                              year) 
                              year) 


Generated by  Doxygen 1.6.0   Back to index