linenumber="0"))
document.styles.addElement(tablecontents)
- bbb= Style(name="bbb", family="table-cell")
- bbb.addElement(TextProperties(fontweight="bold", fontsize="11", color="#1FA055"))
- document.automaticstyles.addElement(bbb)
+
+ # Création des styles de colonnes
+ width25 = Style(name="Wshort", family="table-column")
+ width25.addElement(TableColumnProperties(columnwidth="2.5cm"))
+ document.automaticstyles.addElement(width25)
+
+ width3 = Style(name="Wwide", family="table-column")
+ width3.addElement(TableColumnProperties(columnwidth="3cm"))
+ document.automaticstyles.addElement(width3)
+
+ width9 = Style(name="Wwide", family="table-column")
+ width9.addElement(TableColumnProperties(columnwidth="9cm"))
+ document.automaticstyles.addElement(width9)
+
+ #Création des styles de titres
+ titre1= Style(name="titre1", family="table-cell")
+ titre1.addElement(TextProperties(fontweight="bold", fontsize="11", color="#1FA055"))
+ document.automaticstyles.addElement(titre1)
+
+ titre2= Style(name="titre2", family="table-cell")
+ titre2.addElement(TextProperties(fontweight="bold", fontsize="10"))
+ document.automaticstyles.addElement(titre2)
#container_keys = ["name", "description", "target", "milestone"]
- task_keys = ['name', 'description', 'manday', 'priority', 'state',
+ task_keys = ['name', 'description', 'priority', 'state', 'manday',
'planned', 'milestone']
for c in containers:
table = Table(name=c['name'])
+
+ table.addElement(TableColumn(numbercolumnsrepeated=1,stylename=width3))
+ table.addElement(TableColumn(numbercolumnsrepeated=1,stylename=width9))
+ table.addElement(TableColumn(numbercolumnsrepeated=5,stylename=width25))
document.spreadsheet.addElement(table)
tasks = container_tasks[c['id']]
tr = TableRow()
table.addElement(tr)
- tr.addElement(create_cell("Name", "bbb"))
+ tr.addElement(create_cell("Name :", "titre1"))
tr.addElement(create_cell(c["name"]))
tr.addElement(create_cell(""))
- tr.addElement(create_cell("Target", "bbb"))
+ tr.addElement(create_cell("Target :", "titre1"))
tr.addElement(create_cell(c["target"]))
- tr.addElement(create_cell(""))
- tr.addElement(create_cell("Milestone", "bbb"))
+ tr.addElement(create_cell("Milestone :", "titre1"))
tr.addElement(create_cell(c["milestone"]))
tr = TableRow()
table.addElement(tr)
- tr.addElement(create_cell("Description", "bbb"))
+ tr.addElement(create_cell("Description :", "titre1"))
tr.addElement(create_cell(c["description"]))
if not tasks:
continue
+ #New line
+ table.addElement(TableRow())
+
tr = TableRow()
table.addElement(tr)
+ tr.addElement(create_cell("Tasks :", "titre1"))
tr = TableRow()
table.addElement(tr)
for k in task_keys:
- tc = TableCell(stylename="bbb")
+ tc = TableCell(stylename="titre2")
tr.addElement(tc)
tc.addElement(P(text=k.capitalize()))