Changeset 9984 for main/waeup.kofa/trunk/src/waeup/kofa
- Timestamp:
- 24 Feb 2013, 08:29:24 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r9900 r9984 651 651 grok.name('index') 652 652 grok.require('waeup.viewApplication') 653 form_fields = grok.AutoFields(IApplicantOnlinePayment) 653 form_fields = grok.AutoFields(IApplicantOnlinePayment).omit('p_item') 654 654 form_fields[ 655 655 'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') … … 696 696 grok.name('payment_slip.pdf') 697 697 grok.require('waeup.viewApplication') 698 form_fields = grok.AutoFields(IApplicantOnlinePayment) 698 form_fields = grok.AutoFields(IApplicantOnlinePayment).omit('p_item') 699 699 form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 700 700 form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantdisplaypage.pt
r9075 r9984 59 59 <td tal:content="python: layout.formatDatetime(value.payment_date)">PAYMENT DATE</td> 60 60 <td tal:content ="value/category">CATEGORY</td> 61 <td tal:content ="value/ p_item">ITEM</td>61 <td tal:content ="value/display_item">ITEM</td> 62 62 <td tal:content ="value/state">STATE</td> 63 63 </tr> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicanteditpage.pt
r8983 r9984 109 109 <td tal:content="python: layout.formatDatetime(cl.payment_date)">PAYMENT DATE</td> 110 110 <td tal:content ="cl/category">CATEGORY</td> 111 <td tal:content ="cl/ p_item">ITEM</td>111 <td tal:content ="cl/display_item">ITEM</td> 112 112 <td tal:content ="cl/state">STATE</td> 113 113 </tr> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/payment.py
r9733 r9984 75 75 return self.doAfterApplicantPaymentApproval() 76 76 77 ApplicantOnlinePayment = attrs_to_fields(ApplicantOnlinePayment) 77 ApplicantOnlinePayment = attrs_to_fields( 78 ApplicantOnlinePayment, omit=['display_item']) 78 79 79 80 class PaymentWebservice(grok.Adapter): -
main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
r9864 r9984 55 55 56 56 p_item = schema.TextLine( 57 title = _(u'Payment Item'),57 title = u'', 58 58 default = None, 59 59 required = False, 60 ) 61 62 display_item = schema.TextLine( 63 title = _(u'Payment Item'), 64 required = False, 65 readonly = True, 60 66 ) 61 67 -
main/waeup.kofa/trunk/src/waeup/kofa/payments/payment.py
r9769 r9984 65 65 return utils.PAYMENT_CATEGORIES[self.p_category] 66 66 67 @property 68 def display_item(self): 69 return self.p_item 70 67 71 class OnlinePayment(Payment): 68 72 """This is an online payment. … … 98 102 return 99 103 100 OnlinePayment = attrs_to_fields(OnlinePayment )104 OnlinePayment = attrs_to_fields(OnlinePayment, omit=['display_item']) -
main/waeup.kofa/trunk/src/waeup/kofa/students/accommodation.py
r9424 r9984 76 76 return None 77 77 78 @property 79 def display_coordinates(self): 80 return self.bed_coordinates 81 78 82 def writeLogMessage(self, view, message): 79 83 return self.__parent__.__parent__.writeLogMessage(view, message) … … 83 87 self.booking_session).title 84 88 85 BedTicket = attrs_to_fields(BedTicket) 89 BedTicket = attrs_to_fields(BedTicket, omit=['display_coordinates']) 90 86 91 87 92 # Bed tickets must be importable. So we might need a factory. -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r9969 r9984 1596 1596 grok.name('index') 1597 1597 grok.require('waeup.viewStudent') 1598 form_fields = grok.AutoFields(IStudentOnlinePayment) 1598 form_fields = grok.AutoFields(IStudentOnlinePayment).omit('p_item') 1599 1599 form_fields[ 1600 1600 'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') … … 1650 1650 grok.name('payment_slip.pdf') 1651 1651 grok.require('waeup.viewStudent') 1652 form_fields = grok.AutoFields(IStudentOnlinePayment) 1652 form_fields = grok.AutoFields(IStudentOnlinePayment).omit('p_item') 1653 1653 form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 1654 1654 form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') … … 1872 1872 self.context.writeLogMessage(self, 'booked: %s' % bed.bed_id) 1873 1873 self.flash(_('Bed ticket created and bed booked: ${a}', 1874 mapping = {'a':bedticket. bed_coordinates}))1874 mapping = {'a':bedticket.display_coordinates})) 1875 1875 self.redirect(self.url(self.context)) 1876 1876 return … … 1882 1882 grok.name('index') 1883 1883 grok.require('waeup.handleAccommodation') 1884 form_fields = grok.AutoFields(IBedTicket) 1884 form_fields = grok.AutoFields(IBedTicket).omit('bed_coordinates') 1885 1885 form_fields['booking_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 1886 1886 pnav = 4 … … 1897 1897 grok.name('bed_allocation_slip.pdf') 1898 1898 grok.require('waeup.handleAccommodation') 1899 form_fields = grok.AutoFields(IBedTicket) 1899 form_fields = grok.AutoFields(IBedTicket).omit('bed_coordinates') 1900 1900 form_fields['booking_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 1901 1901 prefix = 'form' … … 1993 1993 self.context.writeLogMessage(self, 'relocated: %s' % new_bed.bed_id) 1994 1994 self.flash(_('Student relocated: ${a}', 1995 mapping = {'a':self.context. bed_coordinates}))1995 mapping = {'a':self.context.display_coordinates})) 1996 1996 self.redirect(self.url(self.context)) 1997 1997 return -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/accommodationmanagepage.pt
r7811 r9984 22 22 <span tal:content="python: cl.getSessionString()">PID</span></a></td> 23 23 <td tal:content="python: layout.formatDatetime(cl.booking_date)">DATE</td> 24 <td tal:content="cl/ bed_coordinates">COORDINATES</td>24 <td tal:content="cl/display_coordinates">COORDINATES</td> 25 25 <td tal:content="cl/bed_type">TYPE</td> 26 26 </tr> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/paymentsmanagepage.pt
r9721 r9984 29 29 <td tal:content="python: layout.formatDatetime(cl.payment_date)">PAYMENT DATE</td> 30 30 <td nowrap tal:content ="cl/category">CATEGORY</td> 31 <td tal:content ="cl/ p_item">ITEM</td>31 <td tal:content ="cl/display_item">ITEM</td> 32 32 <td tal:content ="cl/amount_auth">AMOUNT</td> 33 33 <td tal:content ="cl/p_session">SESSION</td> -
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r9983 r9984 283 283 fields = tuple( 284 284 sorted(iface_names( 285 IStudentOnlinePayment, exclude_attribs=False))) + ( 286 'student_id','student_state','current_session') 285 IStudentOnlinePayment, exclude_attribs=False, 286 omit=['display_item']))) + ( 287 'student_id','student_state','current_session') 287 288 288 289 #: The title under which this exporter will be displayed … … 311 312 fields = tuple( 312 313 sorted(iface_names( 313 IBedTicket, exclude_attribs=False))) + ( 314 'student_id', 'actual_bed_type') 314 IBedTicket, exclude_attribs=False, 315 omit=['display_coordinates']))) + ( 316 'student_id', 'actual_bed_type') 315 317 316 318 #: The title under which this exporter will be displayed -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r9962 r9984 674 674 675 675 bed_coordinates = schema.TextLine( 676 title = u'', 677 required = True, 678 readonly = False, 679 ) 680 681 display_coordinates = schema.TextLine( 676 682 title = _(u'Allocated Bed'), 677 required = True,678 readonly = False,683 required = False, 684 readonly = True, 679 685 ) 680 686 -
main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py
r9733 r9984 139 139 140 140 141 StudentOnlinePayment = attrs_to_fields(StudentOnlinePayment) 141 StudentOnlinePayment = attrs_to_fields( 142 StudentOnlinePayment, omit=['display_item']) 142 143 143 144 class PaymentWebservice(grok.Adapter):
Note: See TracChangeset for help on using the changeset viewer.