Exemple #1
0
def historyToTable(history):
    transactions = sorted(list(DBtransactions.involvedTransactions(history)))
    table = """<table class="table table-bordered table-striped table-hover " style="width: 100%;">
  		<thead>
    			<tr><th>#</th>"""
    for t in transactions:
        table = table + "<th>" + transactionToString(t) + "</th>"
    table = table + "</thead><tbody>"
    for step, e in enumerate(history):
        table = table + "<tr><td>" + str(step) + "</td>"
        index = transactions.index(e.transaction)
        for i in range(len(transactions)):
            table = table + "<td>"
            if i == index:
                table = table + e.toString()
            table = table + "</td>"
        table = table + "</tr>"
    table = table + "</tbody></table>"
    return wrapInPanel("Historie H", table, 12)
Exemple #2
0
def historyToTable(history):
	transactions = sorted(list(DBtransactions.involvedTransactions(history)))
	table = """<table class="table table-bordered table-striped table-hover " style="width: 100%;">
  		<thead>
    			<tr><th>#</th>"""
	for t in transactions:
		table = table + "<th>"+transactionToString(t)+"</th>"
	table = table + "</thead><tbody>"
	for step, e in enumerate(history):
		table = table + "<tr><td>"+str(step)+"</td>"
		index = transactions.index(e.transaction)
		for i in range(len(transactions)):
			table = table + "<td>"
			if i == index:
				table = table + e.toString()
			table = table + "</td>"
		table = table + "</tr>"
	table = table + "</tbody></table>"
	return wrapInPanel("Historie H", table, 12)