Changeset 622 for WAeUP_SRP/trunk


Ignore:
Timestamp:
8 Oct 2006, 14:46:25 (18 years ago)
Author:
joachim
Message:

added base files for accommodation-module,
renamed Accommodation to AccoHall?
accommodation to acco_hall
one can now add and view an accommodation-hall

Location:
WAeUP_SRP/trunk
Files:
7 added
1 deleted
10 edited
3 moved

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Accommodation.py

    r575 r622  
    7878###)
    7979
    80 class Accommodation(CPSDocument): ###(
     80class AccoHall(CPSDocument): ###(
    8181    """
    82     WAeUP Accommodation containing Departments
     82    WAeUP AccoHall containing Departments
    8383    """
    84     meta_type = 'Accommodation'
     84    meta_type = 'AccoHall'
    8585    portal_type = meta_type
    8686    security = ClassSecurityInfo()
     
    9797###)
    9898
    99 InitializeClass(Accommodation)
     99InitializeClass(AccoHall)
    100100
    101 def addAccommodation(container, id, REQUEST=None, **kw):
    102     """Add a Accommodation."""
    103     ob = Accommodation(id, **kw)
     101def addAccoHall(container, id, REQUEST=None, **kw):
     102    """Add a AccoHall."""
     103    ob = AccoHall(id, **kw)
    104104    return CPSBase_adder(container, ob, REQUEST=REQUEST)
    105105###)
  • WAeUP_SRP/trunk/__init__.py

    r580 r622  
    3636     ("Accommodation",
    3737        ("AccoFolder",
    38          "Accommodation",
     38         "AccoHall",
    3939         )
    4040     ),
  • WAeUP_SRP/trunk/profiles/default/layouts.xml

    r601 r622  
    22<object name="portal_layouts" meta_type="CPS Layouts Tool">
    33 <property name="title"></property>
    4  <object name="accommodation" meta_type="CPS Layout"/>
     4 <object name="acco_hall" meta_type="CPS Layout"/>
    55 <object name="academics_search" meta_type="CPS Layout"/>
    66 <object name="certificate" meta_type="CPS Layout"/>
  • WAeUP_SRP/trunk/profiles/default/layouts/acco_hall.xml

    r610 r622  
    4747  <property name="vocabulary">waeup_bed_letters</property>
    4848 </widget>
    49  <widget name="beds_per_room" meta_type="Select Widget">
     49 <widget name="beds_per_room" meta_type="Int Widget">
    5050  <property name="fields">
    5151   <element value="beds_per_room"/>
    5252  </property>
    53   <property name="is_required">True</property>
    54   <property name="label">Beds per Room</property>
    55   <property name="label_edit">Beds per Room</property>
    56   <property name="vocabulary">range10</property>
    57  </widget>
    58  <widget name="heading" meta_type="String Widget">
    59   <property name="fields">
    60    <element value="heading"/>
    61   </property>
     53    <property name="is_required">True</property>
     54    <property name="label">Beds per Room</property>
     55    <property name="label_edit">Beds per Room</property>
     56    <property name="is_limited">True</property>
     57    <property name="min_value">1</property>
     58    <property name="max_value">10</property>
     59  </widget>
     60<widget name="Title" meta_type="String Widget">
     61 <property name="title">Title</property>
     62 <property name="fields">
     63  <element value="Title"/>
     64 </property>
    6265  <property name="is_required">True</property>
    6366  <property name="label">Hall Name</property>
     
    6669  <property name="size_max">40</property>
    6770 </widget>
    68  <widget name="nr_of_blocks" meta_type="Select Widget">
    69   <property name="fields">
    70    <element value="nr_of_blocks"/>
    71   </property>
    72   <property name="is_required">True</property>
    73   <property name="label">Nr of Blocks</property>
    74   <property name="label_edit">Nr of Blocks</property>
    75   <property name="vocabulary">range10</property>
    76  </widget>
    77  <widget name="nr_of_floors" meta_type="Select Widget">
     71  <widget name="nr_of_blocks" meta_type="Int Widget">
     72    <property name="fields">
     73      <element value="nr_of_blocks"/>
     74    </property>
     75    <property name="is_required">True</property>
     76    <property name="label">Nr of Blocks</property>
     77    <property name="label_edit">Nr of Blocks</property>
     78    <property name="is_limited">True</property>
     79    <property name="min_value">1</property>
     80    <property name="max_value">10</property>
     81  </widget>
     82 <widget name="nr_of_floors" meta_type="Int Widget">
    7883  <property name="fields">
    7984   <element value="nr_of_floors"/>
     
    8287  <property name="label">Nr of Floors </property>
    8388  <property name="label_edit">Nr of Floors</property>
    84   <property name="vocabulary">range5</property>
     89    <property name="is_limited">True</property>
     90    <property name="min_value">1</property>
     91    <property name="max_value">5</property>
    8592 </widget>
    8693 <widget name="reserved_rooms" meta_type="String Widget">
     
    97104  <property name="hidden_readonly_layout_modes"/>
    98105 </widget>
    99  <widget name="rooms_per_floor" meta_type="Select Widget">
     106 <widget name="rooms_per_floor" meta_type="Int Widget">
    100107  <property name="fields">
    101108   <element value="rooms_per_floor"/>
     
    104111  <property name="label">Rooms per Floor</property>
    105112  <property name="label_edit">Rooms per Floor</property>
    106   <property name="vocabulary">range50</property>
     113    <property name="is_limited">True</property>
     114    <property name="min_value">1</property>
     115    <property name="max_value">50</property>
    107116 </widget>
    108117 <widget name="text" meta_type="Text Widget">
     
    129138 <table>
    130139  <row>
    131    <cell name="heading"/>
     140   <cell name="Title"/>
    132141  </row>
    133142  <row>
  • WAeUP_SRP/trunk/profiles/default/schemas.xml

    r600 r622  
    44 <object name="academics" meta_type="CPS Schema"/>
    55 <object name="academics_search" meta_type="CPS Schema"/>
    6  <object name="accommodation" meta_type="CPS Schema"/>
     6 <object name="acco_hall" meta_type="CPS Schema"/>
    77 <object name="certificate" meta_type="CPS Schema"/>
    88 <object name="certificate_course" meta_type="CPS Schema"/>
  • WAeUP_SRP/trunk/profiles/default/schemas/acco_hall.xml

    r610 r622  
    11<?xml version="1.0"?>
    22<object name="accommodation" meta_type="CPS Schema">
    3  <field name="beds_for_final" meta_type="CPS String List Field"/>
    4  <field name="beds_for_fresh" meta_type="CPS String List Field"/>
    5  <field name="beds_for_returning" meta_type="CPS String List Field"/>
    6  <field name="beds_per_room" meta_type="CPS Int Field"/>
    7  <field name="heading" meta_type="CPS String Field">
    8   <property name="is_searchabletext">True</property>
    9  </field>
    10  <field name="nr_of_blocks" meta_type="CPS Int Field"/>
    11  <field name="nr_of_floors" meta_type="CPS Int Field"/>
    12  <field name="reserved_rooms" meta_type="CPS String List Field"/>
    13  <field name="rooms_per_floor" meta_type="CPS Int Field"/>
     3  <field name="beds_for_final" meta_type="CPS String List Field"/>
     4  <field name="beds_for_fresh" meta_type="CPS String List Field"/>
     5  <field name="beds_for_returning" meta_type="CPS String List Field"/>
     6  <field name="beds_per_room" meta_type="CPS Int Field">
     7    <property name="default_expr">python:6</property>
     8  </field>
     9  <field name="nr_of_blocks" meta_type="CPS Int Field">
     10    <property name="default_expr">python:3</property>
     11  </field>
     12 <field name="nr_of_floors" meta_type="CPS Int Field">
     13    <property name="default_expr">python:3</property>
     14  </field>
     15 <field name="reserved_rooms" meta_type="CPS String List Field">
     16    <property name="default_expr"></property>
     17  </field>
     18  <field name="rooms_per_floor" meta_type="CPS Int Field">
     19    <property name="default_expr">python:20</property>
     20  </field>
    1421 <field name="study_courses" meta_type="CPS String List Field"/>
    1522 <field name="text" meta_type="CPS String Field">
    16   <property name="is_searchabletext">True</property>
     23  <property name="is_searchabletext">False</property>
    1724 </field>
    1825 <field name="which_sex" meta_type="CPS Boolean Field">
    19   <property name="is_searchabletext">True</property>
    2026 </field>
    2127</object>
  • WAeUP_SRP/trunk/profiles/default/skins.xml

    r502 r622  
    99 <object name="waeup_academics" meta_type="Filesystem Directory View"
    1010    directory="WAeUP_SRP/skins/waeup_academics"/>
     11 <object name="waeup_accommodation" meta_type="Filesystem Directory View"
     12    directory="WAeUP_SRP/skins/waeup_accommodation"/>
    1113 <object name="waeup_pins" meta_type="Filesystem Directory View"
    1214    directory="WAeUP_SRP/skins/waeup_pins"/>
     
    1921  <layer name="waeup_student" insert-after="waeup_custom"/>
    2022  <layer name="waeup_academics" insert-after="waeup_custom"/>
     23  <layer name="waeup_accommodation" insert-after="waeup_custom"/>
    2124 </skin-path>
    2225 <skin-path name="CPSSkins-macroless">
     
    2629  <layer name="waeup_student" insert-after="waeup_custom"/>
    2730  <layer name="waeup_academics" insert-after="waeup_custom"/>
     31  <layer name="waeup_accommodation" insert-after="waeup_custom"/>
    2832 </skin-path>
    2933</object>
  • WAeUP_SRP/trunk/profiles/default/types.xml

    r486 r622  
    44 <object name="AcademicsFolder" meta_type="CPS Flexible Type Information"/>
    55 <object name="AccoFolder" meta_type="CPS Flexible Type Information"/>
    6  <object name="Accommodation" meta_type="CPS Flexible Type Information"/>
     6 <object name="AccoHall" meta_type="CPS Flexible Type Information"/>
    77 <object name="CertificatesFolder" meta_type="CPS Flexible Type Information"/>
    88 <object name="Certificate" meta_type="CPS Flexible Type Information"/>
  • WAeUP_SRP/trunk/profiles/default/types/AccoFolder.xml

    r486 r622  
    2929 <property name="storage_methods"/>
    3030 <property name="cps_is_portlet">False</property>
    31  <alias from="(Default)" to="temporary_view_all"/>
    32  <alias from="view" to="temporary_view_all"/>
     31 <alias from="(Default)" to="accommodation_index"/>
     32 <alias from="view" to="accommodation_index"/>
    3333 <action title="View" action_id="view" category="object" condition_expr=""
    3434    url_expr="string:${object_url}/academics_contents" visible="True">
     
    3737 <action title="Add Accommodation Hall" action_id="new_entry"
    3838    category="object" condition_expr=""
    39     url_expr="string:${object_url}/content_create?type_name=Accommodation"
    40     visible="True">
    41   <permission value="Modify portal content"/>
    42  </action>
    43  <action title="action_metadata" action_id="metadata" category="object"
    44     condition_expr="" url_expr="string:${object_url}/cpsdocument_metadata"
    45     visible="True">
    46   <permission value="Modify portal content"/>
    47  </action>
    48  <action title="action_edit" action_id="edit" category="object"
    49     condition_expr="" url_expr="string:${object_url}/cpsdocument_edit_form"
     39    url_expr="string:${object_url}/content_create?type_name=AccoHall"
    5040    visible="True">
    5141  <permission value="Modify portal content"/>
  • WAeUP_SRP/trunk/profiles/default/types/AccoHall.xml

    r621 r622  
    11<?xml version="1.0"?>
    2 <object name="Accommodation" meta_type="CPS Flexible Type Information"
     2<object name="AccoHall" meta_type="CPS Flexible Type Information"
    33   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
    4  <property name="title">WAeUP Accommodation</property>
     4 <property name="title">WAeUP AccoHall</property>
    55 <property name="description"></property>
    66 <property name="content_icon">student.gif</property>
    7  <property name="content_meta_type">Accommodation</property>
     7 <property name="content_meta_type">AccoHall</property>
    88 <property name="product">WAeUP_SRP</property>
    9  <property name="factory">addAccommodation</property>
     9 <property name="factory">addAccoHall</property>
    1010 <property name="immediate_view">academics_contents</property>
    1111 <property name="global_allow">True</property>
     
    1919  <element value="metadata"/>
    2020  <element value="common"/>
    21   <element value="accommodation"/>
     21  <element value="acco_hall"/>
    2222 </property>
    2323 <property name="layouts">
    24   <element value="accommodation"/>
     24  <element value="acco_hall"/>
    2525 </property>
    2626 <property name="layout_clusters">
     
    3030 <property name="storage_methods"/>
    3131 <property name="cps_is_portlet">False</property>
    32  <alias from="(Default)" to="academics_contents"/>
    33  <alias from="view" to="academics_contents"/>
     32 <alias from="(Default)" to="accommodation_index"/>
     33 <alias from="view" to="accommodation_index"/>
    3434 <action title="View" action_id="view" category="object" condition_expr=""
    35     url_expr="string:${object_url}/academics_contents" visible="True">
     35    url_expr="string:${object_url}/accommodation_index" visible="True">
    3636  <permission value="View"/>
    3737 </action>
     
    4141  <permission value="Modify portal content"/>
    4242 </action>
    43  <action title="action_metadata" action_id="metadata" category="object"
    44     condition_expr="" url_expr="string:${object_url}/cpsdocument_metadata"
    45     visible="True">
    46   <permission value="Modify portal content"/>
    47  </action>
    48  <action title="Delegate" action_id="localroles" category="object"
    49     condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
    50     visible="False">
    51   <permission value="Modify portal content"/>
    52  </action>
    5343</object>
  • WAeUP_SRP/trunk/profiles/default/workflows.xml

    r533 r622  
    2525   <bound-workflow workflow_id="section_folder_wf"/>
    2626  </type>
    27   <type type_id="Accommodation">
     27  <type type_id="AccoHall">
    2828   <bound-workflow workflow_id="waeup_accommodation_wf"/>
    2929  </type>
  • WAeUP_SRP/trunk/skins/waeup_academics/searchAcademics.py

    r611 r622  
    2929        'search_string': ''
    3030        }
     31choosen_ids = request.get('ids',[])
    3132
    3233rend,psm,ds = lt.renderLayout(layout_id= 'academics_search',
     
    4445                             objects = items,
    4546                             is_manager = is_manager,
     47                             choosen_ids = choosen_ids,
    4648                             )
    47 what = ds.get('search_mode')
    48 state = ds.get('review_state')
    49 term = ds.get('search_string')
    50 if not term and not with_review:
    51     return context.academics_search_view(rendered = rend,
    52                              psm = "You must specify a search string",
    53                              #psm = "%s, %s" % (psm,ds),
    54                              objects = items,
    55                              is_manager = is_manager,
    56                              )
    57 with_review = state != "all"
    5849what = ds.get('search_mode')
    5950state = ds.get('review_state')
     
    7364                             students = items,
    7465                             is_manager = is_manager,
     66                             choosen_ids = choosen_ids,
    7567                             )
    7668with_review = state != "all"
     
    10698                             objects = objects,
    10799                             is_manager = is_manager,
    108                              choosen_ids = []
     100                             choosen_ids = choosen_ids,
    109101                             )
  • WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py

    r608 r622  
    7373onlyreview = with_review and not term
    7474if onlyreview:
    75     res = catalog(portal_type='Student',
     75    res = catalog(portal_type=portal_type_query,
    7676                  review_state=state)
    7777elif what == "student_id":
     
    9595    if with_review:
    9696        try:
    97             res = catalog(portal_type='Student',SearchableText=st,
     97            res = catalog(portal_type=pt,SearchableText=st,
    9898                          review_state=state)
    9999        except:
Note: See TracChangeset for help on using the changeset viewer.