Changeset 7254
- Timestamp:
- 3 Dec 2011, 05:09:21 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r7252 r7254 490 490 return '' 491 491 492 def formatDatetime(self,datetimeobj):493 if isinstance(datetimeobj, datetime):494 return datetimeobj.strftime("%Y-%m-%d %H:%M:%S")495 else:496 return None497 498 492 class AcceptanceFeePaymentAddPage(grok.View): 499 493 """ Page to add an online payment ticket … … 889 883 return 890 884 891 def formatDatetime(self,datetimeobj):892 if isinstance(datetimeobj, datetime):893 return datetimeobj.strftime("%Y-%m-%d %H:%M:%S")894 else:895 return None896 897 885 def unremovable(self, ticket): 898 886 usertype = getattr(self.request.principal, 'user_type', None) -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantdisplaypage.pt
r7250 r7254 59 59 <td> <a tal:attributes="href value/__name__"> 60 60 <span tal:content="value/p_id">PID</span></a></td> 61 <td tal:content="python: view.formatDatetime(value.creation_date)">CREATION DATE</td>62 <td tal:content="python: view.formatDatetime(value.payment_date)">PAYMENT DATE</td>61 <td tal:content="python: layout.formatDatetime(value.creation_date)">CREATION DATE</td> 62 <td tal:content="python: layout.formatDatetime(value.payment_date)">PAYMENT DATE</td> 63 63 <td tal:content ="value/category">CATEGORY</td> 64 64 <td tal:content ="value/p_item">ITEM</td> -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicanteditpage.pt
r7250 r7254 127 127 <td> <a tal:attributes="href cl/__name__"> 128 128 <span tal:content="cl/p_id">PID</span></a></td> 129 <td tal:content="python: view.formatDatetime(cl.creation_date)">CREATION DATE</td>130 <td tal:content="python: view.formatDatetime(cl.payment_date)">PAYMENT DATE</td>129 <td tal:content="python: layout.formatDatetime(cl.creation_date)">CREATION DATE</td> 130 <td tal:content="python: layout.formatDatetime(cl.payment_date)">PAYMENT DATE</td> 131 131 <td tal:content ="cl/category">CATEGORY</td> 132 132 <td tal:content ="cl/p_item">ITEM</td> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/layout.py
r7243 r7254 20 20 import os 21 21 import grok 22 from datetime import date, datetime 22 23 import grokcore.view 23 24 from hurry.resource import mode … … 202 203 return 203 204 205 def formatDatetime(self,datetimeobj): 206 if isinstance(datetimeobj, datetime): 207 return datetimeobj.strftime("%Y-%m-%d %H:%M:%S") 208 else: 209 return None 210 204 211 def update(self): 205 212 """Include the resources required by the chosen skin/theme. -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7253 r7254 959 959 # pnav = 4 960 960 961 # def formatDatetime(self,datetimeobj):962 # if isinstance(datetimeobj, datetime):963 # return datetimeobj.strftime("%Y-%m-%d %H:%M:%S")964 # else:965 # return None966 967 961 # @property 968 962 # def label(self): … … 991 985 return False 992 986 return (self.request.principal.user_type == 'student' and ticket.r_code) 993 994 def formatDatetime(self,datetimeobj):995 if isinstance(datetimeobj, datetime):996 return datetimeobj.strftime("%Y-%m-%d %H:%M:%S")997 else:998 return None999 987 1000 988 @property … … 1258 1246 pnav = 4 1259 1247 officers_only_actions = ['Remove selected'] 1260 1261 def formatDatetime(self,datetimeobj):1262 if isinstance(datetimeobj, datetime):1263 return datetimeobj.strftime("%Y-%m-%d %H:%M:%S")1264 else:1265 return None1266 1248 1267 1249 @property -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/accommodationmanagepage.pt
r7240 r7254 34 34 <td> <a tal:attributes="href cl/__name__"> 35 35 <span tal:content="python: cl.getSessionString()">PID</span></a></td> 36 <td tal:content="python: view.formatDatetime(cl.booking_date)">DATE</td>36 <td tal:content="python: layout.formatDatetime(cl.booking_date)">DATE</td> 37 37 <td tal:content="cl/bed_coordinates">COORDINATES</td> 38 38 <td tal:content="cl/bed_type">TYPE</td> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/paymentsmanagepage.pt
r6940 r7254 37 37 <td> <a tal:attributes="href cl/__name__"> 38 38 <span tal:content="cl/p_id">PID</span></a></td> 39 <td tal:content="python: view.formatDatetime(cl.creation_date)">CREATION DATE</td>40 <td tal:content="python: view.formatDatetime(cl.payment_date)">PAYMENT DATE</td>39 <td tal:content="python: layout.formatDatetime(cl.creation_date)">CREATION DATE</td> 40 <td tal:content="python: layout.formatDatetime(cl.payment_date)">PAYMENT DATE</td> 41 41 <td tal:content ="cl/category">CATEGORY</td> 42 42 <td tal:content ="cl/p_item">ITEM</td> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/paymentspage.pt
r6869 r7254 19 19 <td> <a tal:attributes="href value/__name__"> 20 20 <span tal:content="value/p_id">PID</span></a></td> 21 <td tal:content="python: view.formatDatetime(value.creation_date)">CREATION DATE</td>22 <td tal:content="python: view.formatDatetime(value.payment_date)">PAYMENT DATE</td>21 <td tal:content="python: layout.formatDatetime(value.creation_date)">CREATION DATE</td> 22 <td tal:content="python: layout.formatDatetime(value.payment_date)">PAYMENT DATE</td> 23 23 <td tal:content ="value/category">CATEGORY</td> 24 24 <td tal:content ="value/p_item">ITEM</td>
Note: See TracChangeset for help on using the changeset viewer.