Last change
on this file since 124 was
71,
checked in by joachim, 19 years ago
|
=search for jamb addmission
|
-
Property svn:keywords set to
Id
|
File size:
1.0 KB
|
Line | |
---|
1 | ##parameters= |
---|
2 | # $Id: admission_status.py 71 2005-10-21 12:02:05Z joachim $ |
---|
3 | """ |
---|
4 | search for admitted students |
---|
5 | return html renderer + psm |
---|
6 | """ |
---|
7 | ##type_name = 'Jamb' |
---|
8 | ##ti = context.portal_types[type_name] |
---|
9 | ## |
---|
10 | ##context.REQUEST.set('type_name',type_name) |
---|
11 | ## |
---|
12 | ##validate = REQUEST.has_key("cpsdocument_edit_button") |
---|
13 | |
---|
14 | request = context.REQUEST |
---|
15 | lt = context.portal_layouts |
---|
16 | catalog = context.portal_catalog |
---|
17 | |
---|
18 | rendered,psm,ds = lt.renderLayout(layout_id= 'admission_status', |
---|
19 | schema_id= 'jamb', |
---|
20 | context=context, |
---|
21 | mapping=request, |
---|
22 | ob={}, |
---|
23 | layout_mode='create', |
---|
24 | ) |
---|
25 | qs = ds.get('quick_search') |
---|
26 | list = [] |
---|
27 | if qs: |
---|
28 | res = catalog(SearchableText = "%s*" % qs) |
---|
29 | if res: |
---|
30 | for i in res: |
---|
31 | o = i.getObject() |
---|
32 | if o.portal_type == 'Jamb': |
---|
33 | list.append(o) |
---|
34 | return context.admission_status_form(rendered = rendered, |
---|
35 | psm = '', |
---|
36 | list = list, |
---|
37 | ds = ds |
---|
38 | ) |
---|
Note: See
TracBrowser for help on using the repository browser.