- Timestamp:
- 20 May 2010, 10:03:40 (15 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_pins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_pins/pins_view.pt
r3079 r5199 65 65 tal:attributes="class python:test(repeat['line'].even(), 'even ajaxtd', 'odd ajaxtd')"> 66 66 <span tal:repeat="row line"> 67 <td align="left" valign="middle" style="width: 5px;" >67 <td align="left" valign="middle" style="width: 5px;" tal:define="id python:row['id']"> 68 68 <input type="checkbox" name="ids:list" value="" id="" class="noborder" 69 tal:define="id row"69 70 70 tal:condition="archive_allowed" 71 71 tal:attributes="value id; … … 74 74 /> 75 75 </td> 76 <td><a href="view" tal:attributes="href string:${context/absolute_url}/${row}"> 77 <strong tal:content="row" /></a> </td> 76 <td width="8pt"><span tal:content="python:row['date_str']" /></td> 77 <td><a href="view" tal:attributes="href python:row['url']"> 78 <strong tal:content="python:row['id']" /></a> 79 </td> 78 80 </span> 79 81 </tr> -
WAeUP_SRP/trunk/skins/waeup_pins/search_pins.py
r4203 r5199 17 17 def set_trace(): 18 18 pass 19 20 import datetime 19 21 20 22 request = REQUEST … … 117 119 view = context.batch_view 118 120 elif context.portal_type == "ScratchCardBatchesFolder": 119 batches = context.objectIds() 120 batches.sort() 121 122 batches = [] 123 for id, object in context.objectItems(): 124 batch = {} 125 batch['id'] = id 126 batch['date'] = object.creation_date 127 batch['url'] = object.absolute_url() 128 batch['date_str'] = object.creation_date.strftime("%d/%m/%y") 129 batches.append(batch) 130 batches.sort(cmp=lambda x,y: cmp(x['id'].lower(), y['id'].lower())) 131 #batches.sort(cmp=lambda x,y: cmp(x['date'], y['date'])) 132 133 #from Products.zdb import set_trace;set_trace() 134 #batches = context.objectIds() 135 #batches.sort() 121 136 l = [] 122 cols = 6137 cols = 4 123 138 rows,rest = divmod(len(batches),cols) 124 139 bis = 0
Note: See TracChangeset for help on using the changeset viewer.