Changeset 1412 for WAeUP_SRP/trunk
- Timestamp:
- 13 Feb 2007, 14:14:44 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 11 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/doc/srp_documentation.mm
r1405 r1412 34 34 <node CREATED="1171014630747" ID="Freemind_Link_21788009" MODIFIED="1171014635284" TEXT="Imports"/> 35 35 </node> 36 <node CREATED="1170082138244" ID="Freemind_Link_1354366927" MODIFIED="1170082146391" TEXT="Students">36 <node CREATED="1170082138244" FOLDED="true" ID="Freemind_Link_1354366927" MODIFIED="1170082146391" TEXT="Students"> 37 37 <node CREATED="1170082147831" ID="Freemind_Link_115332414" MODIFIED="1170082160733" TEXT="n * Student"> 38 <node CREATED="1170082164451" FOLDED="true" ID="Freemind_Link_1627718074" MODIFIED="1170082180091" TEXT="Application"> 38 <node CREATED="1171114205479" ID="Freemind_Link_1051911128" LINK="../profiles/default/types/Student.xml" MODIFIED="1171353141707" TEXT="Type: Student"/> 39 <node CREATED="1171124926993" ID="Freemind_Link_1838352082" LINK="../profiles/default/schemas/student.xml" MODIFIED="1171353152905" TEXT="Schema: student"/> 40 <node CREATED="1171124982312" ID="Freemind_Link_1037588671" LINK="../profiles/default/layouts/student.xml" MODIFIED="1171353165422" TEXT="Layout: student"/> 41 <node CREATED="1171353188624" ID="Freemind_Link_1032185087" LINK="../profiles/default/workflows/waeup_student_wf/definition.xml" MODIFIED="1171353319663" TEXT="Workflow: waeup_student_wf"/> 42 <node CREATED="1170082164451" ID="Freemind_Link_1627718074" MODIFIED="1170082180091" TEXT="Application"> 39 43 <node CREATED="1170083733194" ID="Freemind_Link_1398132513" MODIFIED="1170862024807" TEXT="Id: application"/> 40 44 <node CREATED="1170083603042" ID="Freemind_Link_4951906" LINK="../profiles/default/types/StudentApplication.xml" MODIFIED="1171009517689" TEXT="Type: StudentApplication"/> … … 70 74 <node CREATED="1171014603296" ID="Freemind_Link_592162547" MODIFIED="1171014611096" TEXT="Imports"/> 71 75 </node> 72 <node CREATED="1170082502675" FOLDED="true" ID="Freemind_Link_1051871348" MODIFIED="1170082511430" TEXT="Accommodation"> 73 <node CREATED="1170082513362" ID="Freemind_Link_579142716" MODIFIED="1170082530016" TEXT="n * Hall"/> 76 <node CREATED="1170082502675" ID="Freemind_Link_1051871348" MODIFIED="1170082511430" TEXT="Accommodation"> 77 <node CREATED="1171114205479" ID="Freemind_Link_685193459" LINK="../profiles/default/types/AccoFolder.xml" MODIFIED="1171360542032" TEXT="Type: AccoFolder"/> 78 <node CREATED="1170082513362" ID="Freemind_Link_579142716" MODIFIED="1170082530016" TEXT="n * Hall"> 79 <node CREATED="1171114205479" ID="Freemind_Link_913388948" LINK="../profiles/default/types/AccoHall.xml" MODIFIED="1171360892599" TEXT="Type: AccoHall"/> 80 <node CREATED="1171124926993" ID="Freemind_Link_108322260" LINK="../profiles/default/schemas/acco_hall.xml" MODIFIED="1171361085015" TEXT="Schema: acco_hall"/> 81 <node CREATED="1171124982312" ID="Freemind_Link_378355401" LINK="../profiles/default/layouts/acco_hall.xml" MODIFIED="1171361118597" TEXT="Layout: acco_hall"/> 82 <node CREATED="1171362437684" ID="Freemind_Link_1642729597" MODIFIED="1171362486789" TEXT="UserInterface"> 83 <node CREATED="1171362489012" ID="Freemind_Link_550352037" MODIFIED="1171362509942" TEXT="book_reserved_bed"> 84 <node CREATED="1171362515581" ID="Freemind_Link_213666573" LINK="../skins/waeup_accommodation/book_reserved_bed.py" MODIFIED="1171362598179" TEXT="Script: book_reserved_bed"/> 85 <node CREATED="1171362924343" ID="Freemind_Link_1340566317" LINK="../skins/waeup_accommodation/book_reserved_bed_form.pt" MODIFIED="1171363012800" TEXT="PT: book_reserved_bed_form"/> 86 <node CREATED="1171124926993" ID="Freemind_Link_320666824" LINK="../profiles/default/schemas/acco_bed_booking.xml" MODIFIED="1171362834619" TEXT="Schema: acco_bed_booking"/> 87 <node CREATED="1171124982312" ID="Freemind_Link_1520138434" LINK="../profiles/default/layouts/acco_bed_booking.xml" MODIFIED="1171362901153" TEXT="Layout: acco_bed_booking"/> 88 </node> 89 </node> 90 </node> 74 91 </node> 75 92 <node CREATED="1170082542534" ID="Freemind_Link_243354429" MODIFIED="1170082550976" TEXT="Pins"> -
WAeUP_SRP/trunk/profiles/default/layouts/acco_bed_booking.xml
r1393 r1412 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="acco_bed_reservation" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> 4 5 <property name="layout_edit_method"></property> 5 6 <property name="layout_view_method"></property> 6 <property name="style_prefix">layout_w o_object</property>7 <property name="style_prefix">layout_waeup_</property> 7 8 <property name="flexible_widgets"/> 8 9 <property name="validate_values_expr"></property> 9 <widget name="bed " meta_type="Select Widget">10 <property name="title">Bed </property>10 <widget name="bed_letter" meta_type="Select Widget"> 11 <property name="title">Bed Letter</property> 11 12 <property name="fields"> 12 <element value="bed "/>13 <element value="bed_letter"/> 13 14 </property> 14 15 <property name="is_required">True</property> 15 <property name="label">Bed </property>16 <property name="label_edit">Bed </property>16 <property name="label">Bed Letter</property> 17 <property name="label_edit">Bed Letter</property> 17 18 <property name="readonly_layout_modes"/> 18 19 <property name="hidden_layout_modes"/> … … 49 50 <table> 50 51 <row> 51 <cell name="block_ floor_room"/>52 <cell name="block_room"/> 52 53 </row> 53 54 <row> 54 <cell name="bed "/>55 <cell name="bed_letter"/> 55 56 </row> 56 57 <row> -
WAeUP_SRP/trunk/profiles/default/layouts/acco_hall.xml
r1041 r1412 1 1 <?xml version="1.0"?> 2 <object name="accommodation" meta_type="CPS Layout"> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 3 <object name="acco_hall" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> 4 5 <property name="layout_edit_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/layout.xsl
r1403 r1412 13 13 <body> 14 14 <xsl:for-each select="object"> 15 <h1> <xsl:value-of select="@name"/></h1>15 <h1>Layout: <xsl:value-of select="@name"/></h1> 16 16 </xsl:for-each> 17 17 <h1>Layout</h1> … … 39 39 <h1>Properties</h1> 40 40 <table> 41 <tr> 42 <th>Id</th> 43 <th>Text</th> 44 </tr> 41 45 <xsl:for-each select="object/property"> 42 46 <xsl:variable name="color"> … … 61 65 </table> 62 66 <h1>Widgets</h1> 63 <table> 64 <xsl:for-each select="object/widget"> 65 <xsl:variable name="color"> 66 <xsl:choose> 67 <xsl:when test="position() mod 2 = 0"> 68 <xsl:text>#ffffff</xsl:text> 69 </xsl:when> 70 <xsl:otherwise> 71 <xsl:text>#eeeeee</xsl:text> 72 </xsl:otherwise> 73 </xsl:choose> 74 </xsl:variable> 75 <tr style="background-color:{$color}"> 76 <th> 77 <xsl:value-of select="@name"/> 78 </th> 79 <td colspan="2"> 80 <xsl:value-of select="@meta_type"/> 81 </td> 82 </tr> 67 <xsl:for-each select="object/widget"> 68 <xsl:variable name="color"> 69 <xsl:choose> 70 <xsl:when test="position() mod 2 = 0"> 71 <xsl:text>#ffffff</xsl:text> 72 </xsl:when> 73 <xsl:otherwise> 74 <xsl:text>#eeeeee</xsl:text> 75 </xsl:otherwise> 76 </xsl:choose> 77 </xsl:variable> 78 <h3><xsl:value-of select="@name"/> Meta Type: <xsl:value-of select="@meta_type"/></h3> 79 <table> 83 80 <tr style="background-color:{$color}"> 84 81 <th colspan="3"> … … 101 98 </tr> 102 99 </xsl:for-each> 103 </ xsl:for-each>104 </ table>100 </table> 101 </xsl:for-each> 105 102 </body> 106 103 </html> -
WAeUP_SRP/trunk/profiles/default/schemas/acco_hall.xml
r1399 r1412 1 1 <?xml version="1.0"?> 2 2 <?xml-stylesheet type="text/xsl" href="schema.xsl"?> 3 <object name="acco mmodation" meta_type="CPS Schema">3 <object name="acco_hall" meta_type="CPS Schema"> 4 4 <field name="beds_for_final" meta_type="CPS String List Field"/> 5 5 <field name="beds_for_fresh" meta_type="CPS String List Field"/> -
WAeUP_SRP/trunk/profiles/default/schemas/schema.xsl
r1404 r1412 14 14 <xsl:for-each select="object"> 15 15 <h2> 16 <xsl:value-of select="@name"/>16 Schema: <xsl:value-of select="@name"/> 17 17 </h2> 18 18 </xsl:for-each> 19 19 <h1>Fields</h1> 20 20 <table> 21 <tr> 22 <th>Id</th> 23 <th>Type</th> 24 <th>default</th> 25 </tr> 21 26 <xsl:for-each select="object/field"> 22 27 <xsl:sort select="@name" -
WAeUP_SRP/trunk/profiles/default/types/AccoFolder.xml
r941 r1412 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="AccoFolder" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> … … 12 13 <property name="filter_content_types">True</property> 13 14 <property name="allowed_content_types"> 14 <element value="Acco mmodation"/>15 <element value="AccoHall"/> 15 16 </property> 16 17 <property name="allow_discussion">False</property> … … 19 20 <property name="cps_display_as_document_in_listing">True</property> 20 21 <property name="schemas"> 21 <element value="metadata"/>22 <element value="common"/>23 22 </property> 24 23 <property name="layouts"/> 25 24 <property name="layout_clusters"> 26 <element value="metadata:metadata"/>27 25 </property> 28 26 <property name="flexible_layouts"/> -
WAeUP_SRP/trunk/profiles/default/types/AccoHall.xml
r873 r1412 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="AccoHall" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> -
WAeUP_SRP/trunk/profiles/default/types/Student.xml
r1225 r1412 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="Student" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> -
WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml
r1286 r1412 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="../definition.xsl"?> 2 3 <cps-workflow workflow_id="waeup_student_wf" 3 4 title="CPS Workflow Definition" -
WAeUP_SRP/trunk/skins/waeup_accommodation/book_reserved_bed.py
r1410 r1412 16 16 17 17 mode = 'create' 18 validate = REQUEST.has_key("cpsdocument_edit_button") 18 validate = REQUEST.has_key("cpsdocument_edit_button") and\ 19 REQUEST.get("cpsdocument_edit_button").startswith('reserve') 19 20 d = {} 20 re s,psm,ds = lt.renderLayout(layout_id= 'acco_bed_booking',21 rendered,psm,ds = lt.renderLayout(layout_id= 'acco_bed_booking', 21 22 schema_id= 'acco_bed_booking', 22 23 context=context, … … 28 29 if psm == 'invalid': 29 30 psm = "Please correct your input." 30 return context.book_reserved_bed_form(rendered = re s,31 return context.book_reserved_bed_form(rendered = rendered, 31 32 psm = psm, 32 33 #psm = "%s, %s" % (psm,ds), … … 37 38 ) 38 39 elif psm == '': 39 return context.book_reserved_bed_form(rendered = re s,40 return context.book_reserved_bed_form(rendered = rendered, 40 41 psm = psm, 41 42 mode = mode, … … 46 47 elif psm == 'valid': 47 48 pass 49 #from Products.zdb import set_trace;set_trace() 48 50 hall_id = context.getId() 49 51 doc = context.getContent() … … 61 63 break 62 64 bed_brain = res[0] 65 already = acco_cat(student=sid) 66 if already: 67 psm = "Student %s already reserved bed %s" % (sid, already[0].bed) 68 break 63 69 if not bed_brain.bed_type.endswith("reserved"): 64 70 psm = "Not a reserved bed %s" % bid … … 72 78 break 73 79 if psm != '': 74 return context.book_reserved_bed_form(rendered = re s,80 return context.book_reserved_bed_form(rendered = rendered, 75 81 psm = psm, 76 82 mode = mode, … … 80 86 ) 81 87 acco_cat.modifyRecord(bed = bid, student = sid) 82 logger.info('"%s","booked reserved bed %s for","%s"' % (member,b ed,sid))83 return context.book_reserved_bed_form(rendered = res,88 logger.info('"%s","booked reserved bed %s for","%s"' % (member,bid,sid)) 89 return context.book_reserved_bed_form(rendered = "", 84 90 psm = "Bed reserved for %s %s" % (sid,student.name), 85 91 mode = mode, 86 92 formaction = "book_reserved_bed", 87 button = " reserve bed",93 button = "next reservation", 88 94 ds = ds, 89 95 ) -
WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_accommodation.py
r1411 r1412 77 77 pin = str(ds.get('acco_res_sc_pin')) 78 78 pa = context.portal_accommodation 79 code,bed = pa.searchAndReserveBed(s_id,"%s" % (info['student_status'])) 80 #code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status'))) 81 if code == -1: 82 return context.accommodation_pin_edit_form(rendered = res, 83 psm = "%s" % bed, 84 mode = mode, 85 ds = ds, 86 ) 87 elif code == -2: 88 return context.accommodation_pin_edit_form(rendered = res, 89 psm = "No bed available. Your category is already fully booked.", 90 mode = mode, 91 ds = ds, 92 ) 79 already = pa(student=s_id) 80 if not already: 81 code,bed = pa.searchAndReserveBed(s_id,"%s" % (info['student_status'])) 82 #code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status'))) 83 if code == -1: 84 return context.accommodation_pin_edit_form(rendered = res, 85 psm = "%s" % bed, 86 mode = mode, 87 ds = ds, 88 ) 89 elif code == -2: 90 return context.accommodation_pin_edit_form(rendered = res, 91 psm = "No bed available. Your category is already fully booked.", 92 mode = mode, 93 ds = ds, 94 ) 95 else: 96 bed = already[0].bed 93 97 student.invokeFactory('StudentAccommodation',acco_id) 94 98 acco = getattr(student,acco_id)
Note: See TracChangeset for help on using the changeset viewer.