Next / Previous / Contents / TCC Help System / NM Tech homepage

12.8. FormPhotoSet._addThumbnail(): Add the thumbnail cell

This method generates the first column of the table, containing the image thumbnail; see Section 4.3, “XHTML for the form page”.

# - - -   F o r m P h o t o S e t . _ _ a d d T h u m b n a i l

    def _addThumbnail(self, tr, archImage):
        '''Add a thumbnail image cell

          [ (tr is an et.Element) and
            (archImage is an archx.ArchImage) ->
              tr  :=  tr with a new td added containing the
                      thumbnail for archImage ]
        #-- 1
        url = "{0}{1}.jpg".format(THUMB_URL, archImage.original.catNo)
                E.img(src=url, alt="Thumbnail")))