Index: waeup_product/trunk/skins/waeup_student/create_jamb.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/create_jamb.pt	(revision 29)
+++ 	(revision )
@@ -1,26 +1,0 @@
-<html metal:use-macro="here/content_lib_master/macros/master">
-
-  <metal:block fill-slot="head_slot">
-    <tal:block tal:define="student here/getContent">
-    </tal:block>
-  </metal:block>
-
-  <metal:block fill-slot="css_slot">
-    <link rel="Stylesheet" type="text/css" href=""
-          tal:attributes="href string:${base_url}student.css" />
-  </metal:block>
-
-  <metal:block fill-slot="main"
-               tal:define="items here/contentValues"
-               >
-    <form action="content_create" tal:attributes="action string:${here_url}/content_create"
-          method="post" class="group">
-      <dt>
-        <input type="hidden" name="type_name" value="Jamb" /> 
-      <p>
-        <input id="objectTitle" type="text" name="title" value="JAMB" class="focus" size="40" />
-        <input type="submit" class="standalone searchButton" value="create" />
-      </p>
-    </form>
-  </metal:block>
-</html>
Index: waeup_product/trunk/skins/waeup_student/create_jamb.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 45)
+++ waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 45)
@@ -0,0 +1,70 @@
+##parameters=type_name, REQUEST=None, **kw
+# $Id$
+"""
+Create an object.
+
+FIXME: what are the parameters?
+"""
+
+from urllib import urlencode
+
+if REQUEST is not None:
+    kw.update(REQUEST.form)
+    # Use creation without empty object.
+    # XXX should find better
+    ti = getattr(context.portal_types, type_name)
+    # For cpsdocument
+    if ti.meta_type == 'CPS Flexible Type Information':
+        args = {'type_name': type_name}
+        # XXX pass prefilled title, a bit of a hack...
+        args['widget__Title'] = kw.get('title', '')
+
+        # Look for the create action on the ti
+        create_action_form = ti.getActionById('create', 'cpsdocument_create_form')
+
+        return REQUEST.RESPONSE.redirect('%s/%s?%s'
+                                         % (context.absolute_url(),
+                                            create_action_form,
+                                            urlencode(args)))
+
+if REQUEST and not kw.get('title'):
+    # Need a title before creating folders
+    if type_name in ('Section', 'Workspace'):
+        args = {'type_name': type_name}
+        return REQUEST.RESPONSE.redirect('%s/folder_edit_form?%s' %
+                                (context.absolute_url(), urlencode(args)))
+
+id = kw.get('title', 'my_' + type_name)
+id = context.computeId(compute_from=id)
+
+context.invokeFactory(type_name, id)
+ob = getattr(context, id)
+
+try:
+    doc = ob.getEditableContent()
+except AttributeError:
+    # not a proxy
+    doc = ob
+else:
+    try:
+        doc.edit(proxy=ob, **kw)
+    except:
+        # CMF Compatibility.
+        # type_name not necessarly and edit method
+        # for CMF types is not aware about that.
+        if kw.has_key('type_name'):
+            del kw['type_name']
+        doc.edit(**kw)
+
+context.portal_eventservice.notifyEvent('modify_object', context, {})
+context.portal_eventservice.notifyEvent('modify_object', ob, {})
+
+
+if REQUEST is not None:
+    psm = 'psm_content_created'
+    action_path = doc.getTypeInfo().immediate_view # getActionById('metadata')
+    REQUEST.RESPONSE.redirect('%s/%s?portal_status_message=%s' %
+                              (ob.absolute_url(), action_path,
+                               psm))
+
+return id
Index: waeup_product/trunk/skins/waeup_student/create_jamb_form.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/create_jamb_form.pt	(revision 45)
+++ waeup_product/trunk/skins/waeup_student/create_jamb_form.pt	(revision 45)
@@ -0,0 +1,26 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="items here/contentValues"
+               >
+    <form action="content_create" tal:attributes="action string:${here_url}/content_create"
+          method="post" class="group">
+      <dt>
+        <input type="hidden" name="type_name" value="Jamb" /> 
+      <p>
+        <input id="objectTitle" type="text" name="title" value="JAMB" class="focus" size="40" />
+        <input type="submit" class="standalone searchButton" value="create" />
+      </p>
+    </form>
+  </metal:block>
+</html>
Index: waeup_product/trunk/skins/waeup_student/create_student.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/create_student.pt	(revision 29)
+++ 	(revision )
@@ -1,30 +1,0 @@
-<html metal:use-macro="here/content_lib_master/macros/master">
-
-  <metal:block fill-slot="head_slot">
-    <tal:block tal:define="student here/getContent">
-    </tal:block>
-  </metal:block>
-
-  <metal:block fill-slot="css_slot">
-    <link rel="Stylesheet" type="text/css" href=""
-          tal:attributes="href string:${base_url}student.css" />
-  </metal:block>
-
-  <metal:block fill-slot="main"
-               tal:define="items here/contentValues"
-               >
-    <form action="content_create" tal:attributes="action string:${here_url}/content_create"
-          method="post" class="group">
-      <dt>
-        <input type="hidden" name="type_name" value="Student" /> 
-      <p>
-        <label for="objectTitle">
-          <strong>Studentname</strong>
-        </label>
-
-        <input id="objectTitle" type="text" name="title" class="focus" size="40" />
-        <input type="submit" class="standalone searchButton" value="create" />
-      </p>
-    </form>
-  </metal:block>
-</html>
Index: waeup_product/trunk/skins/waeup_student/create_student.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/create_student.py	(revision 45)
+++ waeup_product/trunk/skins/waeup_student/create_student.py	(revision 45)
@@ -0,0 +1,76 @@
+##parameters=type_name, REQUEST=None, **kw
+# $Id$
+"""
+Create an object.
+
+FIXME: what are the parameters?
+"""
+
+from urllib import urlencode
+
+##for k,v in kw.items():
+##    print k,v
+##return printed
+
+if REQUEST is not None:
+    kw.update(REQUEST.form)
+    # Use creation without empty object.
+    # XXX should find better
+    ti = getattr(context.portal_types, type_name)
+    # For cpsdocument
+    if ti.meta_type == 'CPS Flexible Type Information':
+        args = {'type_name': type_name}
+        # XXX pass prefilled title, a bit of a hack...
+        args['widget__Title'] = kw.get('title', '')
+
+        # Look for the create action on the ti
+        create_action_form = ti.getActionById('create', 'cpsdocument_create_form')
+
+        return REQUEST.RESPONSE.redirect('%s/%s?%s'
+                                         % (context.absolute_url(),
+                                            create_action_form,
+                                            urlencode(args)))
+
+
+if REQUEST and not kw.get('title'):
+    # Need a title before creating folders
+    if type_name in ('Section', 'Workspace'):
+        args = {'type_name': type_name}
+        return REQUEST.RESPONSE.redirect('%s/folder_edit_form?%s' %
+                                (context.absolute_url(), urlencode(args)))
+
+
+id = kw.get('title', 'my_sdfsdfdsf' + type_name)
+id = context.computeId(compute_from=id)
+
+context.invokeFactory(type_name, id)
+ob = getattr(context, id)
+
+try:
+    doc = ob.getEditableContent()
+except AttributeError:
+    # not a proxy
+    doc = ob
+else:
+    try:
+        doc.edit(proxy=ob, **kw)
+    except:
+        # CMF Compatibility.
+        # type_name not necessarly and edit method
+        # for CMF types is not aware about that.
+        if kw.has_key('type_name'):
+            del kw['type_name']
+        doc.edit(**kw)
+
+context.portal_eventservice.notifyEvent('modify_object', context, {})
+context.portal_eventservice.notifyEvent('modify_object', ob, {})
+
+
+if REQUEST is not None:
+    psm = 'psm_content_created'
+    action_path = doc.getTypeInfo().immediate_view # getActionById('metadata')
+    REQUEST.RESPONSE.redirect('%s/%s?portal_status_message=%s' %
+                              (ob.absolute_url(), action_path,
+                               psm))
+
+return id
Index: waeup_product/trunk/skins/waeup_student/create_student_form.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/create_student_form.pt	(revision 45)
+++ waeup_product/trunk/skins/waeup_student/create_student_form.pt	(revision 45)
@@ -0,0 +1,30 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="items here/contentValues"
+               >
+    <form action="content_create" tal:attributes="action string:${here_url}/create_student"
+          method="post" class="group">
+      <dt>
+        <input type="hidden" name="type_name" value="Student" /> 
+      <p>
+        <label for="objectTitle">
+          <strong>Studentname</strong>
+        </label>
+
+        <input id="objectTitle" type="text" name="title" class="focus" size="40" />
+        <input type="submit" class="standalone searchButton" value="create" />
+      </p>
+    </form>
+  </metal:block>
+</html>
Index: waeup_product/trunk/skins/waeup_student/student_view_main.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/student_view_main.pt	(revision 29)
+++ waeup_product/trunk/skins/waeup_student/student_view_main.pt	(revision 45)
@@ -13,22 +13,24 @@
 <metal:block fill-slot="main"
              tal:define="student here/getContent;
-             items here/contentValues">
-<span tal:condition="python: 0" tal:content="items" />
-<table cellspacing="0" cellpadding="0">
-    <tal:block condition="python: len(items)">
-      <tr tal:repeat="item items">
-        <td colspan="1"> 
-          <a href="jamb" 
-             tal:attributes="href item/absolute_url"
-             tal:content="item/title_or_id"></a>
-      </td>
+             items here/contentValues"
+             >
+    <span tal:condition="python: 0" tal:content="items" />
+    <tal:block tal:content="structure student/jamb_where_admitted" />
+    <table cellspacing="0" cellpadding="0">
+      <tal:block condition="python: len(items)">
+        <tr tal:repeat="item items">
+          <td colspan="1"> 
+            <a href="jamb" 
+               tal:attributes="href item/absolute_url"
+               tal:content="item/title_or_id"></a>
+          </td>
+        </tr>
+      </tal:block>
+      <tr tal:condition="python:not len(items)">
+        <td>
+          no Items yet !
+        </td>
       </tr>
-    </tal:block>
-    <tr tal:condition="python:not len(items)">
-      <td>
-        no Items yet !
-      </td>
-    </tr>
-  </table>
-</metal:block>
+    </table>
+  </metal:block>
 </html>
