force column layout by explicitly specifying widths; define Section elements in report
This commit is contained in:
		
							parent
							
								
									c0b68ace67
								
							
						
					
					
						commit
						953e150e0f
					
				
					 2 changed files with 39 additions and 18 deletions
				
			
		|  | @ -19,30 +19,32 @@ | ||||||
| </div> | </div> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <div metal:define-macro="document" | <metal:doc define-macro="document" | ||||||
|      tal:define="item nocall:view; |      tal:define="item nocall:view; | ||||||
|                  report item/reportInstance; |                  report item/reportInstance; | ||||||
|                  reportView nocall:item; |                  reportView nocall:item; | ||||||
|                  results reportView/results; |                  results reportView/results; | ||||||
|                  fields results/context/fields"> |                  fields results/context/fields"> | ||||||
|   <metal:page use-macro="item/macros/page_header" /> |   <metal:page use-macro="item/macros/page_header" /> | ||||||
|  |   <div class ="Section2"> | ||||||
|     <table class="report" width="100%" |     <table class="report" width="100%" | ||||||
|            tal:define="showCheckboxes nothing"> |            tal:define="showCheckboxes nothing"> | ||||||
|       <metal:header use-macro="item/macros/header" /> |       <metal:header use-macro="item/macros/header" /> | ||||||
|       <metal:header use-macro="item/macros/rows" /> |       <metal:header use-macro="item/macros/rows" /> | ||||||
|     </table> |     </table> | ||||||
| </div> |   </div> | ||||||
|  | </metal:doc> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <div metal:define-macro="page_header"> | <metal:page define-macro="page_header"> | ||||||
|   <table width="100%"> |   <table width="100%"> | ||||||
|     <tr> |     <tr> | ||||||
|       <td> </td> |       <td> </td> | ||||||
|       <td><h1 i18n:translate="">Meeting Minutes</h1></td> |       <td><h1 i18n:translate="">Meeting Minutes</h1></td> | ||||||
|       <td><span i18n:translate="">Page</span> </td> |       <td><span i18n:translate="">Page</span> </td> | ||||||
|     </tr> |     </tr> | ||||||
|   <table> |   </table> | ||||||
| </div> | </metal:page> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <metal:header define-macro="header" | <metal:header define-macro="header" | ||||||
|  | @ -91,6 +93,12 @@ | ||||||
|               i18n:translate="" |               i18n:translate="" | ||||||
|               style="border: 1px solid grey">Copy Agenda Items</th> |               style="border: 1px solid grey">Copy Agenda Items</th> | ||||||
|       </tr> |       </tr> | ||||||
|  |       <tr> | ||||||
|  |         <td style="width: 15%"> </td> | ||||||
|  |         <td style="width: 53%"> </td> | ||||||
|  |         <td style="width: 20%"> </td> | ||||||
|  |         <td style="width: 12%"> </td> | ||||||
|  |       </tr> | ||||||
|       <tal:task repeat="row results"> |       <tal:task repeat="row results"> | ||||||
|           <tr> |           <tr> | ||||||
|             <td tal:condition="showCheckboxes" |             <td tal:condition="showCheckboxes" | ||||||
|  | @ -115,7 +123,7 @@ | ||||||
|                   tal:content="col/title" |                   tal:content="col/title" | ||||||
|                   i18n:translate=""></td> |                   i18n:translate=""></td> | ||||||
|               <td colspan="3" |               <td colspan="3" | ||||||
|                   style="border: 1px solid grey" |                   style="border: 1px solid grey; width: 85%" | ||||||
|                   tal:attributes="class col/cssClass"> |                   tal:attributes="class col/cssClass"> | ||||||
|                 <metal:column use-macro="python: |                 <metal:column use-macro="python: | ||||||
|                                 reportView.getColumnRenderer(col)" /> |                                 reportView.getColumnRenderer(col)" /> | ||||||
|  | @ -126,7 +134,7 @@ | ||||||
|             <th style="border: 1px solid grey"  |             <th style="border: 1px solid grey"  | ||||||
|                 tal:condition="showCheckboxes"></th> |                 tal:condition="showCheckboxes"></th> | ||||||
|             <th colspan="2" |             <th colspan="2" | ||||||
|                 style="border: 1px solid grey" |                 style="border: 1px solid grey; width: 68%" | ||||||
|                 i18n:translate="">header_workitems</th> |                 i18n:translate="">header_workitems</th> | ||||||
|             <th style="border: 1px solid grey; width: 20%" |             <th style="border: 1px solid grey; width: 20%" | ||||||
|                 i18n:translate="">header_responsible</th> |                 i18n:translate="">header_responsible</th> | ||||||
|  | @ -144,15 +152,27 @@ | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <metal:sub define-macro="subreport" | <metal:sub define-macro="subreport" | ||||||
|      tal:define="results python:col.getValue(row)"> |      tal:define="results python:col.getValue(row); | ||||||
|  |                  fields results/displayedColumns"> | ||||||
|       <tr class="listing" tal:repeat="row results"> |       <tr class="listing" tal:repeat="row results"> | ||||||
|         <td tal:condition="showCheckboxes" |         <td tal:condition="showCheckboxes" | ||||||
|             style="border: 1px solid grey" /> |             style="border: 1px solid grey" /> | ||||||
|         <td tal:repeat="col results/displayedColumns" |         <td colspan="2" | ||||||
|             tal:attributes="class col/cssClass; |             tal:define="col fields/title" | ||||||
|                             colspan python: |             tal:attributes="class col/cssClass" | ||||||
|                                 col.name == 'title' and '2' or None" |             style="border: 1px solid grey; width: 68%"> | ||||||
|             style="border: 1px solid grey"> |           <metal:column use-macro="python: | ||||||
|  |                             reportView.getColumnRenderer(col)" /> | ||||||
|  |         </td> | ||||||
|  |         <td tal:define="col fields/userName" | ||||||
|  |             tal:attributes="class col/cssClass" | ||||||
|  |             style="border: 1px solid grey; width: 20%"> | ||||||
|  |           <metal:column use-macro="python: | ||||||
|  |                             reportView.getColumnRenderer(col)" /> | ||||||
|  |         </td> | ||||||
|  |         <td tal:define="col fields/deadline" | ||||||
|  |             tal:attributes="class col/cssClass" | ||||||
|  |             style="border: 1px solid grey; width: 12%"> | ||||||
|           <metal:column use-macro="python: |           <metal:column use-macro="python: | ||||||
|                             reportView.getColumnRenderer(col)" /> |                             reportView.getColumnRenderer(col)" /> | ||||||
|         </td> |         </td> | ||||||
|  |  | ||||||
|  | @ -66,6 +66,7 @@ class MeetingMinutes(ResultsConceptView): | ||||||
| class MeetingMinutesDocument(WordDocument, MeetingMinutes): | class MeetingMinutesDocument(WordDocument, MeetingMinutes): | ||||||
| 
 | 
 | ||||||
|     isToplevel = True |     isToplevel = True | ||||||
|  |     omitSectionElement = True | ||||||
| 
 | 
 | ||||||
|     def __init__(self, context, request): |     def __init__(self, context, request): | ||||||
|         MeetingMinutes.__init__(self, context, request) |         MeetingMinutes.__init__(self, context, request) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue