Ignore:
Timestamp:
6 Dec 2011, 07:34:26 (13 years ago)
Author:
Henrik Bettermann
Message:

Align passport image with data table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py

    r7272 r7276  
    683683
    684684    def render(self):
     685        # To recall the table coordinate system:
     686        # (0,0),(-1,-1) = whole table
     687        # (0,0),(0,-1) = first column
     688        # (-1,0),(-1,-1) = last column
     689        # (0,0),(-1,0) = first row
     690        # (0,-1),(-1,-1) = last row
     691
    685692        SLIP_STYLE = TableStyle(
    686693            [('VALIGN',(0,0),(-1,-1),'TOP')]
     
    711718            story.append(Paragraph(f_msg, style["Normal"]))
    712719        story.append(Spacer(1, 24))
    713 
    714 
    715         # insert passport photograph
     720        # Setup table data
     721        data = []
     722        # Insert passport photograph
    716723        img = getUtility(IExtFileStore).getFileByContext(self.context)
    717724        if img is None:
    718725            img = open(DEFAULT_PASSPORT_IMAGE_PATH, 'rb')
    719726        doc_img = Image(img.name, width=4*cm, height=3*cm, kind='bound')
    720         story.append(doc_img)
    721         story.append(Spacer(1, 18))
    722 
    723         # render widget fields
    724         data = []
     727        data.append([doc_img])
     728        data.append([Spacer(1, 18)])
     729        # Render widget fields
    725730        self.setUpWidgets()
    726731        for widget in self.widgets:
     
    735740        f_text = Paragraph(f_text, style["Normal"])
    736741        data.append([f_label,f_text])
     742        # Create table
    737743        table = Table(data,style=SLIP_STYLE)
    738744        story.append(table)
Note: See TracChangeset for help on using the changeset viewer.