show day as separate column, start and end columns contain only the time
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3122 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
		
							parent
							
								
									dc61f474c8
								
							
						
					
					
						commit
						88dea1544d
					
				
					 3 changed files with 14 additions and 11 deletions
				
			
		|  | @ -99,16 +99,18 @@ by calling the form controller's update method | ||||||
|     'created': ..., 'creator': '33', 'assigned': ..., |     'created': ..., 'creator': '33', 'assigned': ..., | ||||||
|     'start': 1230487200, 'duration': 4500, 'effort': 900}>] |     'start': 1230487200, 'duration': 4500, 'effort': 900}>] | ||||||
| 
 | 
 | ||||||
|   >>> from loops.organize.work.browser import WorkItemView |   >>> from loops.organize.work.browser import WorkItemView, WorkItemsView | ||||||
|   >>> wi01 = workItems['0000001'] |   >>> wi01 = workItems['0000001'] | ||||||
|   >>> view = WorkItemView(wi01, TestRequest()) |   >>> view = WorkItemView(wi01, TestRequest()) | ||||||
|   >>> view.taskUrl |   >>> view.taskUrl | ||||||
|   'http://127.0.0.1/loops/concepts/loops_dev/@@SelectedManagementView.html' |   'http://127.0.0.1/loops/concepts/loops_dev/@@SelectedManagementView.html' | ||||||
| 
 | 
 | ||||||
|  |   >>> itemsView = WorkItemsView(home, request) | ||||||
|  | 
 | ||||||
|   >>> from loops.organize.work.browser import WorkItemDetails |   >>> from loops.organize.work.browser import WorkItemDetails | ||||||
|   >>> view = WorkItemDetails(nodeView, wi01) |   >>> view = WorkItemDetails(itemsView, wi01) | ||||||
|   >>> view.start, view.end |   >>> view.day, view.start, view.end | ||||||
|   (u'08/12/28 19:00', u'20:15') |   (u'08/12/28', u'19:00', u'20:15') | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| Fin de partie | Fin de partie | ||||||
|  |  | ||||||
|  | @ -52,7 +52,7 @@ class BaseWorkItemsView(object): | ||||||
| 
 | 
 | ||||||
|     columns = set(['Task', 'User', 'Title', 'Start', 'End', 'Duration']) |     columns = set(['Task', 'User', 'Title', 'Start', 'End', 'Duration']) | ||||||
| 
 | 
 | ||||||
|     lastMonth = None |     lastMonth = lastDay = None | ||||||
| 
 | 
 | ||||||
|     def __init__(self, context, request): |     def __init__(self, context, request): | ||||||
|         self.context = context |         self.context = context | ||||||
|  | @ -73,7 +73,7 @@ class WorkItemsView(BaseWorkItemsView, NodeView): | ||||||
|     """ Standard view for showing work items for a node's target. |     """ Standard view for showing work items for a node's target. | ||||||
|     """ |     """ | ||||||
| 
 | 
 | ||||||
|     columns = set(['User', 'Title', 'Start', 'End', 'Duration']) |     columns = set(['User', 'Title', 'Day', 'Start', 'End', 'Duration']) | ||||||
| 
 | 
 | ||||||
|     @Lazy |     @Lazy | ||||||
|     def allWorkItems(self): |     def allWorkItems(self): | ||||||
|  | @ -91,7 +91,7 @@ class UserWorkItems(BaseWorkItemsView, ConceptView): | ||||||
|     """ A query view showing work items for a person, the query's parent. |     """ A query view showing work items for a person, the query's parent. | ||||||
|     """ |     """ | ||||||
| 
 | 
 | ||||||
|     columns = set(['Task', 'Title', 'Start', 'End', 'Duration']) |     columns = set(['Task', 'Title', 'Day', 'Start', 'End', 'Duration']) | ||||||
| 
 | 
 | ||||||
|     @property |     @property | ||||||
|     def macro(self): |     def macro(self): | ||||||
|  | @ -121,7 +121,7 @@ class WorkItemDetails(TrackDetails): | ||||||
| 
 | 
 | ||||||
|     @Lazy |     @Lazy | ||||||
|     def start(self): |     def start(self): | ||||||
|         return self.formatTimeStamp(self.track.start) |         return self.formatTimeStamp(self.track.start, 'time') | ||||||
| 
 | 
 | ||||||
|     @Lazy |     @Lazy | ||||||
|     def end(self): |     def end(self): | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ | ||||||
|     <table class="listing"> |     <table class="listing"> | ||||||
|       <tr> |       <tr> | ||||||
|         <tal:colheader repeat="column python: |         <tal:colheader repeat="column python: | ||||||
|                 ('Start', 'End', 'Duration', 'Task', 'User', 'Title')"> |                 ('Day', 'Start', 'End', 'Duration', 'Task', 'User', 'Title')"> | ||||||
|           <th tal:condition="python: column in work.columns" |           <th tal:condition="python: column in work.columns" | ||||||
|               tal:content="column" |               tal:content="column" | ||||||
|               i18n:translate="">Task</th> |               i18n:translate="">Task</th> | ||||||
|  | @ -27,8 +27,9 @@ | ||||||
|               tal:content="row/month">2009-01</td></tr> |               tal:content="row/month">2009-01</td></tr> | ||||||
|         <tr tal:attributes="class python: |         <tr tal:attributes="class python: | ||||||
|                                 repeat['row'].odd() and 'even' or 'odd'"> |                                 repeat['row'].odd() and 'even' or 'odd'"> | ||||||
|           <td class="nowrap center" tal:content="row/start">2007-03-30</td> |           <td class="nowrap center" tal:content="row/day">2007-03-30</td> | ||||||
|           <td class="nowrap center" tal:content="row/end">2007-03-30</td> |           <td class="nowrap center" tal:content="row/start">17:30</td> | ||||||
|  |           <td class="nowrap center" tal:content="row/end">20:00</td> | ||||||
|           <td class="nowrap center" tal:content="row/duration">2:30</td> |           <td class="nowrap center" tal:content="row/duration">2:30</td> | ||||||
|           <td tal:condition="python: 'Task' in work.columns"> |           <td tal:condition="python: 'Task' in work.columns"> | ||||||
|             <a tal:attributes="href row/objectData/url" |             <a tal:attributes="href row/objectData/url" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 helmutm
						helmutm