Ejemplo n.º 1
0
 def __init__(self, client):
     BaseElement.__init__(self, 'head')
     self.client = client
     #node = Text()
     #node.data = '%s:' % client
     node = TextElement('h1', client)
     self.appendChild(node)
     self.appendChild(BaseElement('hr'))
Ejemplo n.º 2
0
 def __init__(self, clientid, section, text):
     BaseElement.__init__(self, 'h2')
     node = Text()
     node.data = text
     self.appendChild(node)
     p = BaseElement('p')
     self.new = Anchor('new.%s.%s' % (section, clientid), 'new')
     p.appendChild(self.new)
     self.appendChild(p)
Ejemplo n.º 3
0
 def __init__(self, subject, action, author, posted):
     BaseElement.__init__(self, 'table')
     #self.app  = app
     self.setAttribute('border', '0')
     self.setAttribute('width', '100%')
     self.setAttribute('cellpadding', '2')
     self.setAttribute('cellspacing', '0')
     self.setAttribute('bgcolor', 'cornsilk4')
     row = BaseElement('tr')
     self.appendChild(row)
     td = self._subjectdata(subject, action)
     row.appendChild(td)
     
     row = BaseElement('tr')
     self.appendChild(row)
     row.setAttribute('bgcolor', 'bisque4')
     td = self._subjectdata(author, posted)
     row.appendChild(td)
Ejemplo n.º 4
0
 def __init__(self, ticketid, row):
     BaseElement.__init__(self, 'p')
     self.author = TextElement('h5', 'Author: %s' % row.author)
     self.created = TextElement('h5', 'Created: %s' % row.created)
     #node = TextElement('h2', row.title)
     #self.appendChild(node)
     self.appendChild(self.created)
     self.appendChild(self.author)
     p = BaseElement('p')
     refresh = Anchor('refresh.page.%d' % ticketid, 'refresh')
     assign = Anchor('assign.ticket.%d' % ticketid, 'assign')
     p.appendChild(refresh)
     p.appendChild(BaseElement('br'))
     p.appendChild(assign)
     self.appendChild(p)
Ejemplo n.º 5
0
 def __init__(self, ticketid):
     BaseElement.__init__(self, 'h3')
     self.respond = Anchor('new.action.none', 'respond')
     self.appendChild(self.respond)
Ejemplo n.º 6
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
Ejemplo n.º 7
0
 def __init__(self, ticketid):
     BaseElement.__init__(self, 'table')
     row = BaseElement('tr')
     self.anchor = Anchor('show.ticket.%d' % ticketid, 'show')
     self.assign = Anchor('assign.ticket.%d' % ticketid, 'assign')
Ejemplo n.º 8
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)
Ejemplo n.º 9
0
 def __init__(self, title):
     BaseElement.__init__(self, 'table')
     self.setAttribute('border', '1')
     #self.setAttribute('width', '100%')
     self.setAttribute('cellpadding', '2')
     self.setAttribute('cellspacing', '0')
     self.setAttribute('bgcolor', 'cornsilk4')
     row = BaseElement('tr')
     td = BaseElement('td')
     self.appendChild(row)
     row.appendChild(td)
     font = BaseElement('font')
     font.setAttribute('color', 'gold')
     td.appendChild(font)
     element = TextElement('b', title)
     font.appendChild(element)
Ejemplo n.º 10
0
 def __init__(self, db, tagname):
     BaseElement.__init__(self, tagname)
     self.db = db