예제 #1
0
    def _subjectdata(self, subject, action):
        td = BaseElement('td')

        font = BaseElement('font')
        font.setAttribute('color', 'gold')
        element = TextElement('b', subject)
        font.appendChild(element)
        td.appendChild(font)

        font = BaseElement('font')
        font.setAttribute('color', 'yellow')
        element = Text()
        font.appendChild(element)
        element.data = '(%s)' % action
        td.appendChild(font)
        return td
예제 #2
0
 def __init__(self, ticketid, title, author, created):
     BaseElement.__init__(self, 'div')
     self.setAttribute('id', 'ticket-%d' % ticketid)
     self.setAttribute('class', 'ticketinfo')
     self.title = TitleTable(title)
     #self.title = TextElement('h4', title)
     self.author = TextElement('h5', 'Author: %s' % author)
     self.created = TextElement('h5', 'Created: %s' % created)
     self.appendChild(self.title)
     self.appendChild(self.author)
     self.appendChild(self.created)
     self.anchor = Anchor('show.ticket.%d' % ticketid, 'show')
     self.assign = Anchor('assign.ticket.%d' % ticketid, 'assign')
     node = BaseElement('table')
     node.setAttribute('width', '100%')
     node.setAttribute('align', 'center')
     self.appendChild(node )
     row = BaseElement('tr')
     row.appendChild(TextElement('td', self.anchor))
     td  = TextElement('td', self.assign)
     td.setAttribute('align', 'right')
     row.appendChild(td)
     node.appendChild(row)
예제 #3
0
 def __init__(self, data):
     TextElement.__init__(self, 'p', data)