Ignore:
Timestamp:
31 Jul 2009, 09:52:45 (15 years ago)
Author:
uli
Message:

Add a delete column for certificate table in departments as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-rewrite/src/waeup/tables.py

    r4494 r4496  
    116116                data = tuple([data[x].title for x in data])),
    117117            )
     118
     119        delcol = Col(header='', sortable=False,
     120                     data = [
     121                '<form method="post">'
     122                '<input type="submit" name="delcert" value="Delete" />'
     123                '<input type="hidden" name="code" value="%s" />'
     124                '</form>' % (data[x].code)
     125                for x in data])
     126
     127        if checkPermission('waeup.manageUniversity', self.context.certificates):
     128            certcols = list(certcols)
     129            certcols.append(delcol)
     130            certcols = tuple(certcols)
     131
    118132        self.certtable = Table('Certificates', cols=certcols)
    119133        return (self.coursetable, self.certtable)
Note: See TracChangeset for help on using the changeset viewer.